diff options
| author | David S. Miller <davem@sunset.davemloft.net> | 2006-05-12 15:45:50 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2006-05-12 15:45:50 -0400 |
| commit | 06a1be167ea77c436657587e26cd4d7d6401784c (patch) | |
| tree | 1d9ed9094496a1e02bfe551631b03495db337a89 | |
| parent | 1f8aa2f66b7253d1a42ead0142c7a00d2df5ac89 (diff) | |
[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>
| -rw-r--r-- | arch/sparc/kernel/module.c | 1 | ||||
| -rw-r--r-- | arch/sparc64/defconfig | 3 | ||||
| -rw-r--r-- | arch/sparc64/kernel/module.c | 5 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index 787d5f1347ec..598682f31ebf 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
| @@ -113,6 +113,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
| 113 | 113 | ||
| 114 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 114 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
| 115 | case R_SPARC_32: | 115 | case R_SPARC_32: |
| 116 | case R_SPARC_UA32: | ||
| 116 | location[0] = v >> 24; | 117 | location[0] = v >> 24; |
| 117 | location[1] = v >> 16; | 118 | location[1] = v >> 16; |
| 118 | location[2] = v >> 8; | 119 | location[2] = v >> 8; |
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 22ca69fc865c..f09a70b8aabd 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.17-rc3 | 3 | # Linux kernel version: 2.6.17-rc3 |
| 4 | # Mon May 8 15:12:53 2006 | 4 | # Fri May 12 12:43:49 2006 |
| 5 | # | 5 | # |
| 6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
| 7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
| @@ -1309,6 +1309,7 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
| 1309 | # CONFIG_DEBUG_INFO is not set | 1309 | # CONFIG_DEBUG_INFO is not set |
| 1310 | CONFIG_DEBUG_FS=y | 1310 | CONFIG_DEBUG_FS=y |
| 1311 | # CONFIG_DEBUG_VM is not set | 1311 | # CONFIG_DEBUG_VM is not set |
| 1312 | # CONFIG_UNWIND_INFO is not set | ||
| 1312 | CONFIG_FORCED_INLINING=y | 1313 | CONFIG_FORCED_INLINING=y |
| 1313 | # CONFIG_RCU_TORTURE_TEST is not set | 1314 | # CONFIG_RCU_TORTURE_TEST is not set |
| 1314 | # CONFIG_DEBUG_STACK_USAGE is not set | 1315 | # CONFIG_DEBUG_STACK_USAGE is not set |
diff --git a/arch/sparc64/kernel/module.c b/arch/sparc64/kernel/module.c index 6c83e372f75d..579871527699 100644 --- a/arch/sparc64/kernel/module.c +++ b/arch/sparc64/kernel/module.c | |||
| @@ -143,6 +143,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
| 143 | location[3] = v >> 0; | 143 | location[3] = v >> 0; |
| 144 | break; | 144 | break; |
| 145 | 145 | ||
| 146 | case R_SPARC_DISP32: | ||
| 147 | v -= (Elf64_Addr) location; | ||
| 148 | *loc32 = v; | ||
| 149 | break; | ||
| 150 | |||
| 146 | case R_SPARC_WDISP30: | 151 | case R_SPARC_WDISP30: |
| 147 | v -= (Elf64_Addr) location; | 152 | v -= (Elf64_Addr) location; |
| 148 | *loc32 = (*loc32 & ~0x3fffffff) | | 153 | *loc32 = (*loc32 & ~0x3fffffff) | |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6ecc180beb71..ccb0c1fdf1b5 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -189,7 +189,7 @@ config FRAME_POINTER | |||
| 189 | config UNWIND_INFO | 189 | config UNWIND_INFO |
| 190 | bool "Compile the kernel with frame unwind information" | 190 | bool "Compile the kernel with frame unwind information" |
| 191 | depends on !IA64 | 191 | depends on !IA64 |
| 192 | depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || SPARC64 || V850) | 192 | depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || V850) |
| 193 | help | 193 | help |
| 194 | If you say Y here the resulting kernel image will be slightly larger | 194 | If you say Y here the resulting kernel image will be slightly larger |
| 195 | but not slower, and it will give very useful debugging information. | 195 | but not slower, and it will give very useful debugging information. |
