diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-04-20 11:10:21 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-20 11:10:38 -0700 |
commit | 338c190a92871c063847caef51bdc066372d4550 (patch) | |
tree | de16361f5e3786665f3e4d55473860224f784656 /bfd/ChangeLog | |
parent | 6c739336e5aadd6670909059fba889f50caa9cea (diff) | |
download | gdb-338c190a92871c063847caef51bdc066372d4550.zip gdb-338c190a92871c063847caef51bdc066372d4550.tar.gz gdb-338c190a92871c063847caef51bdc066372d4550.tar.bz2 |
Check run-time R_X86_64_32 relocation overflow
Since elf_x86_64_check_relocs is called after opening all input files,
we can detect dynamic R_X86_64_32 relocation overflow there.
bfd/
PR ld/19969
* elf64-x86-64.c (check_relocs_failed): New.
(elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
Support relocation agaist local symbol. Set check_relocs_failed.
(elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
R_X86_64_32 relocation overflow.
(elf_x86_64_relocate_section): Skip if check_relocs failed.
Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
ld/
PR ld/19969
* testsuite/ld-x86-64/pr19969.d: New file.
* testsuite/ld-x86-64/pr19969a.S: Likewise.
* testsuite/ld-x86-64/pr19969b.S: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr19969 tests.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 46ee8fd..73b0b4d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,16 @@ 2016-04-20 H.J. Lu <hongjiu.lu@intel.com> + PR ld/19969 + * elf64-x86-64.c (check_relocs_failed): New. + (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. + Support relocation agaist local symbol. Set check_relocs_failed. + (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check + R_X86_64_32 relocation overflow. + (elf_x86_64_relocate_section): Skip if check_relocs failed. + Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. + +2016-04-20 H.J. Lu <hongjiu.lu@intel.com> + * elf32-i386.c (elf_i386_check_relocs): Call _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. |