提交 dfa520af 编写于 作者: A Andreas Larsson 提交者: David S. Miller

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: NAndreas Larsson <andreas@gaisler.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c46de226
...@@ -116,6 +116,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, ...@@ -116,6 +116,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
v = sym->st_value + rel[i].r_addend; v = sym->st_value + rel[i].r_addend;
switch (ELF_R_TYPE(rel[i].r_info) & 0xff) { switch (ELF_R_TYPE(rel[i].r_info) & 0xff) {
case R_SPARC_DISP32:
v -= (Elf_Addr) location;
*loc32 = v;
break;
#ifdef CONFIG_SPARC64 #ifdef CONFIG_SPARC64
case R_SPARC_64: case R_SPARC_64:
location[0] = v >> 56; location[0] = v >> 56;
...@@ -128,11 +132,6 @@ int apply_relocate_add(Elf_Shdr *sechdrs, ...@@ -128,11 +132,6 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
location[7] = v >> 0; location[7] = v >> 0;
break; break;
case R_SPARC_DISP32:
v -= (Elf_Addr) location;
*loc32 = v;
break;
case R_SPARC_WDISP19: case R_SPARC_WDISP19:
v -= (Elf_Addr) location; v -= (Elf_Addr) location;
*loc32 = (*loc32 & ~0x7ffff) | *loc32 = (*loc32 & ~0x7ffff) |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册