bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Mon, 11 Feb 2013 17:55:27 +0000 (17:55 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Mon, 11 Feb 2013 17:55:27 +0000 (17:55 +0000)
commitab361d499aa3839fd24f857da77d989122e20ba0
tree39ed02a84b96c285961ad6e4e61169b75f07c374
parente641e783fb4c8eb4e150ce660297ebf5691de1fa
bfd/
* elfxx-mips.c (mips_got_info): Add relocs field.
(mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
with...
(mips_elf_traverse_got_arg): ...this new structure.
(mips_elf_count_local_tls_relocs): Delete.
(mips_elf_count_global_tls_relocs): Likewise.
(mips_elf_count_got_entry): New function.
(mips_elf_count_local_got_entries): Likewise.
(mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
rather than a mips_elf_count_tls_arg.  Count both relocs and entries.
(mips_elf_record_local_got_symbol): Don't count got entries here.
(mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
(mips_elf_set_global_got_offset): Split into...
(mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
new functions.  Take a mips_elf_traverse_got_arg rather than a
mips_elf_set_global_got_offset_arg.  Don't count TLS relocs here.
Use g->relocs to record the number of relocs needed for global GOT
entries.
(mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
mips_elf_set_global_got_offset_arg.  Use the relocs field to count
relocations.  Update for above function split.
(mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
to count both the number of GOT entries and the number of TLS
relocs required by local entries.  Likewise
mips_elf_count_global_tls_entries and global entries.
Remove uses of mips_elf_count_local_tls_relocs and
mips_elf_count_global_tls_relocs.
bfd/ChangeLog
bfd/elfxx-mips.c