diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-03-09 16:28:38 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-03-09 16:28:38 +0000 |
commit | 56b8aada47fa75b378cfa821857730d4e3400318 (patch) | |
tree | 075cc5b3032a9ba7ac977fd639c66e83f2a2fa33 /bfd/elf64-x86-64.c | |
parent | 05b8a7895afd8252854ff3b2892090b63b4d8d36 (diff) | |
download | gdb-56b8aada47fa75b378cfa821857730d4e3400318.zip gdb-56b8aada47fa75b378cfa821857730d4e3400318.tar.gz gdb-56b8aada47fa75b378cfa821857730d4e3400318.tar.bz2 |
Restore R_386_IRELATIVE and R_X86_64_IRELATIVE
bfd/
2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13817
* bfd/elf32-i386.c (elf_i386_relocate_section): Restore
R_386_IRELATIVE.
* * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
R_X86_64_IRELATIVE.
ld/testsuite/
2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13817
* ld-i386/pr13302.d: Updated.
* ld-x86-64/pr13082-5b.d: Likewise.
* ld-x86-64/pr13082-6a.d: Likewise.
* ld-x86-64/pr13082-6b.d: Likewise.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 81ed866..47f1295 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -3156,7 +3156,6 @@ elf_x86_64_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; asection *sreloc; - bfd_boolean relocate; /* Need a dynamic relocation to get the real function address. */ @@ -3176,15 +3175,15 @@ elf_x86_64_relocate_section (bfd *output_bfd, || info->executable) { /* This symbol is resolved locally. */ - outrel.r_info = htab->r_info (0, R_X86_64_RELATIVE); - outrel.r_addend = relocation; - relocate = TRUE; + outrel.r_info = htab->r_info (0, R_X86_64_IRELATIVE); + outrel.r_addend = (h->root.u.def.value + + h->root.u.def.section->output_section->vma + + h->root.u.def.section->output_offset); } else { outrel.r_info = htab->r_info (h->dynindx, r_type); outrel.r_addend = 0; - relocate = FALSE; } sreloc = htab->elf.irelifunc; @@ -3195,8 +3194,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, we need to include the symbol value so that it becomes an addend for the dynamic reloc. For an internal symbol, we have updated addend. */ - if (! relocate) - continue; + continue; } /* FALLTHROUGH */ case R_X86_64_PC32: |