Skip to content

Commit 06a1be1

Browse files
author
David S. Miller
committed
[SPARC]: Handle UNWIND_INFO properly.
For sparc32 we need R_SPARC_UA32 relocation support, for sparc64 we need the handle R_SPARC_DISP32 relocations. Based upon reports and initial patch by Martin Habets. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1f8aa2f commit 06a1be1

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎arch/sparc/kernel/module.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
113113

114114
switch (ELF32_R_TYPE(rel[i].r_info)) {
115115
case R_SPARC_32:
116+
case R_SPARC_UA32:
116117
location[0] = v >> 24;
117118
location[1] = v >> 16;
118119
location[2] = v >> 8;

‎arch/sparc64/defconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Automatically generated make config: don't edit
33
# Linux kernel version: 2.6.17-rc3
4-
# Mon May 8 15:12:53 2006
4+
# Fri May 12 12:43:49 2006
55
#
66
CONFIG_SPARC=y
77
CONFIG_SPARC64=y
@@ -1309,6 +1309,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
13091309
# CONFIG_DEBUG_INFO is not set
13101310
CONFIG_DEBUG_FS=y
13111311
# CONFIG_DEBUG_VM is not set
1312+
# CONFIG_UNWIND_INFO is not set
13121313
CONFIG_FORCED_INLINING=y
13131314
# CONFIG_RCU_TORTURE_TEST is not set
13141315
# CONFIG_DEBUG_STACK_USAGE is not set

‎arch/sparc64/kernel/module.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
143143
location[3] = v >> 0;
144144
break;
145145

146+
case R_SPARC_DISP32:
147+
v -= (Elf64_Addr) location;
148+
*loc32 = v;
149+
break;
150+
146151
case R_SPARC_WDISP30:
147152
v -= (Elf64_Addr) location;
148153
*loc32 = (*loc32 & ~0x3fffffff) |

‎lib/Kconfig.debug‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ config FRAME_POINTER
189189
config UNWIND_INFO
190190
bool "Compile the kernel with frame unwind information"
191191
depends on !IA64
192-
depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || SPARC64 || V850)
192+
depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || V850)
193193
help
194194
If you say Y here the resulting kernel image will be slightly larger
195195
but not slower, and it will give very useful debugging information.

0 commit comments

Comments
 (0)