mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
bc696fd5af
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. |
||
---|---|---|
.. | ||
config | ||
ld-aarch64 | ||
ld-alpha | ||
ld-arm | ||
ld-auto-import | ||
ld-avr | ||
ld-bootstrap | ||
ld-cdtest | ||
ld-checks | ||
ld-cris | ||
ld-crx | ||
ld-cygwin | ||
ld-d10v | ||
ld-discard | ||
ld-elf | ||
ld-elfcomm | ||
ld-elfvers | ||
ld-elfvsb | ||
ld-elfweak | ||
ld-fastcall | ||
ld-frv | ||
ld-gc | ||
ld-h8300 | ||
ld-i386 | ||
ld-ia64 | ||
ld-ifunc | ||
ld-libs | ||
ld-linkonce | ||
ld-m68hc11 | ||
ld-m68k | ||
ld-mep | ||
ld-metag | ||
ld-mips-elf | ||
ld-misc | ||
ld-mmix | ||
ld-mn10300 | ||
ld-nds32 | ||
ld-nios2 | ||
ld-pe | ||
ld-pie | ||
ld-plugin | ||
ld-powerpc | ||
ld-s390 | ||
ld-scripts | ||
ld-selective | ||
ld-sh | ||
ld-shared | ||
ld-size | ||
ld-sparc | ||
ld-spu | ||
ld-srec | ||
ld-tic6x | ||
ld-tilegx | ||
ld-tilepro | ||
ld-undefined | ||
ld-unique | ||
ld-v850 | ||
ld-vax-elf | ||
ld-versados | ||
ld-visium | ||
ld-vxworks | ||
ld-x86-64 | ||
ld-xc16x | ||
ld-xstormy16 | ||
ld-xtensa | ||
lib | ||
ChangeLog | ||
ChangeLog-2004 | ||
ChangeLog-2005 | ||
ChangeLog-2006 | ||
ChangeLog-2007 | ||
ChangeLog-2008 | ||
ChangeLog-2009 | ||
ChangeLog-2010 | ||
ChangeLog-2011 | ||
ChangeLog-2012 | ||
ChangeLog-2013 | ||
ChangeLog-9303 |