bfd/
commitc3df8962e12a25390a616de848c12e2c18d119cb
authorRichard Sandiford <rsandifo@nildram.co.uk>
Mon, 13 Aug 2007 21:16:39 +0000 (13 21:16 +0000)
committerRichard Sandiford <rsandifo@nildram.co.uk>
Mon, 13 Aug 2007 21:16:39 +0000 (13 21:16 +0000)
tree56664bbdc1f36b4372c2bc8edeaa4c1d0ddac0a4
parent24bf10a465f7b7e1fe9eebc9b7d2853e32d096b0
bfd/
* elfxx-mips.c (mips_elf_link_hash_table): Add computed_got_sizes.
(mips_elf_record_global_got_symbol): Increment local_gotno for
each forced-local symbol.
(_bfd_mips_elf_check_relocs): Pass forced-local call symbols to
mips_elf_record_global_got_symbol for VxWorks too.
(_bfd_mips_elf_always_size_sections): Set computed_got_sizes
to true after computing the GOT size.
(_bfd_mips_elf_hide_symbol): Increase local_gotno whenever
got.offset == 1.  Only adjust global_gotno if computed_got_sizes.
For VxWorks, add a local entry when hiding a symbol that needs a
plt but has not been marked as needing a global got entry.
(_bfd_mips_elf_link_hash_table_create): Set computed_got_sizes to
false.

ld/testsuite/
* ld-mips-elf/vxworks-forced-local-1.d,
* ld-mips-elf/vxworks-forced-local-1.s,
* ld-mips-elf/vxworks-forced-local-1.ver: New test.
* ld-mips-elf/mips-elf.exp: Run it.
* ld-mips-elf/tlsdyn-o32-2.d: Adjust for removal of unnecessary
local GOT entry.
* ld-mips-elf/tlsdyn-o32-2.got: Likewise.
* ld-mips-elf/tlsdyn-o32-3.d: Likewise.
* ld-mips-elf/tlsdyn-o32-3.got: Likewise.
* ld-mips-elf/vxworks1-lib.dd: Likewise.
* ld-mips-elf/vxworks1-lib.rd: Likewise.
13 files changed:
bfd/ChangeLog
bfd/elfxx-mips.c
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d
ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got
ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d
ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got
ld/testsuite/ld-mips-elf/vxworks-forced-local-1.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/vxworks-forced-local-1.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/vxworks-forced-local-1.ver [new file with mode: 0644]
ld/testsuite/ld-mips-elf/vxworks1-lib.dd
ld/testsuite/ld-mips-elf/vxworks1-lib.rd