summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Larsson <andreas@gaisler.com>2012-09-17 19:59:52 +0000
committerDavid S. Miller <davem@davemloft.net>2012-09-21 12:14:19 -0700
commitdfa520af2c20aa3c75f0497d49165561212a1c6f (patch)
tree74128cbf99e50ca31e5c07b4f25a0656ec49e588
parentc46de2263f42fb4bbde411b9126f471e9343cb22 (diff)
downloadlinux-3.10-dfa520af2c20aa3c75f0497d49165561212a1c6f.tar.gz
linux-3.10-dfa520af2c20aa3c75f0497d49165561212a1c6f.tar.bz2
linux-3.10-dfa520af2c20aa3c75f0497d49165561212a1c6f.zip
sparc32: Enable the relocation target R_SPARC_DISP32 for sparc32
GNU Binutils 2.20.1 generates .eh_frame sections that uses R_SPARC_DISP32. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc/kernel/module.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c
index 15e0a169397..bae6ab600b7 100644
--- a/arch/sparc/kernel/module.c
+++ b/arch/sparc/kernel/module.c
@@ -116,6 +116,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
v = sym->st_value + rel[i].r_addend;
switch (ELF_R_TYPE(rel[i].r_info) & 0xff) {
+ case R_SPARC_DISP32:
+ v -= (Elf_Addr) location;
+ *loc32 = v;
+ break;
#ifdef CONFIG_SPARC64
case R_SPARC_64:
location[0] = v >> 56;
@@ -128,11 +132,6 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
location[7] = v >> 0;
break;
- case R_SPARC_DISP32:
- v -= (Elf_Addr) location;
- *loc32 = v;
- break;
-
case R_SPARC_WDISP19:
v -= (Elf_Addr) location;
*loc32 = (*loc32 & ~0x7ffff) |