diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-06-24 13:37:05 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-06-24 13:47:37 -0700 |
commit | 7c1e8d3ed5e48b3339d60450fdb5b29ae54edebe (patch) | |
tree | ce3e0e7af01292717cbefddead2daf16038c4b74 /bfd/ChangeLog | |
parent | f91ca6bc00c1e3c70c1d2f4527d4297b76e2eaca (diff) | |
download | gdb-7c1e8d3ed5e48b3339d60450fdb5b29ae54edebe.zip gdb-7c1e8d3ed5e48b3339d60450fdb5b29ae54edebe.tar.gz gdb-7c1e8d3ed5e48b3339d60450fdb5b29ae54edebe.tar.bz2 |
Keep .plt section and DT_PLTGOT for prelink
Since the .plt section and DT_PLTGOT are used by prelink to undo
prelinking for dynamic relocations, we must keep them even if there is
no PLT relocation. This patch reverted commit a3747075a.
bfd/
* elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
space for the first .plt entry.
(elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
there are PLT relocations.
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
allocate space for the first .plt entry.
(elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
.plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
there are PLT relocations.
ld/testsuite/
* ld-i386/i386.exp: Run pltgot-2 for Linux targets.
* ld-x86-64/x86-64.exp: Likewise.
* ld-i386/pltgot-1.d: Updated.
* ld-x86-64/pltgot-1.d: Likewise.
* ld-i386/pltgot-2.d: New file.
* ld-x86-64/pltgot-2.d: Likewise.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8918851..49303b3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,18 @@ 2015-06-24 H.J. Lu <hongjiu.lu@intel.com> + * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate + space for the first .plt entry. + (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt + section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if + there are PLT relocations. + * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always + allocate space for the first .plt entry. + (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for + .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if + there are PLT relocations. + +2015-06-24 H.J. Lu <hongjiu.lu@intel.com> + PR ld/18591 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation |