diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-12-13 23:37:22 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-12-13 23:39:56 -0800 |
commit | bc696fd5af08fa199750abfca092894ab54206c7 (patch) | |
tree | 9e6e0d2996eea892e68cebda85f2148706a68a0c /bfd/ChangeLog | |
parent | 94ec908766bbe8c146798754261bcce83572b00f (diff) | |
download | gdb-bc696fd5af08fa199750abfca092894ab54206c7.zip gdb-bc696fd5af08fa199750abfca092894ab54206c7.tar.gz gdb-bc696fd5af08fa199750abfca092894ab54206c7.tar.bz2 |
Handle weak alias for PIE with copy reloc
When there is a weak symbol with a real definition, the processor
independent code will have arranged for us to see the real definition
first. We need to copy the needs_copy bit from the real definition and
check it when allowing copy reloc in PIE.
bfd/
PR ld/17689
* elf64-x86-64.c (elf_x86_64_link_hash_entry): Add needs_copy.
Change has_bnd_reloc to bit field.
(elf_x86_64_link_hash_newfunc): Initialize needs_copy and
has_bnd_reloc to 0.
(elf_x86_64_check_relocs): Set has_bnd_reloc to 1 instead
of TRUE.
(elf_x86_64_adjust_dynamic_symbol): Copy needs_copy from the
real definition to a weak symbol.
(elf_x86_64_allocate_dynrelocs): Also check needs_copy of a
weak symbol for PIE when discarding space for relocs against
symbols which turn out to need copy relocs.
(elf_x86_64_relocate_section): Also check needs_copy of a
weak symbol for PIE with copy reloc.
ld/testsuite/
PR ld/17689
* ld-x86-64/pr17689.out: New file.
* ld-x86-64/pr17689.rd: Likewise.
* ld-x86-64/pr17689a.c: Likewise.
* ld-x86-64/pr17689b.S: Likewise.
* ld-x86-64/x86-64.exp: Run PR ld/17689 tests.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d783e3e..23e4ba5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,20 @@ +2014-12-13 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/17689 + * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add needs_copy. + Change has_bnd_reloc to bit field. + (elf_x86_64_link_hash_newfunc): Initialize needs_copy and + has_bnd_reloc to 0. + (elf_x86_64_check_relocs): Set has_bnd_reloc to 1 instead + of TRUE. + (elf_x86_64_adjust_dynamic_symbol): Copy needs_copy from the + real definition to a weak symbol. + (elf_x86_64_allocate_dynrelocs): Also check needs_copy of a + weak symbol for PIE when discarding space for relocs against + symbols which turn out to need copy relocs. + (elf_x86_64_relocate_section): Also check needs_copy of a + weak symbol for PIE with copy reloc. + 2014-12-12 Alan Modra <amodra@gmail.com> PR 15228 |