bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Wed, 13 Feb 2013 14:08:58 +0000 (14:08 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Wed, 13 Feb 2013 14:08:58 +0000 (14:08 +0000)
commit13db6b44eaf75fce5624b518185d98f81a48e603
treeaff93f9b46f4f6ebbc51459271510e53bc3b9f46
parent1d3ffd6bfef1e9c7ceabba65a1d4cb0e7000c3aa
bfd/
* elfxx-mips.c (mips_got_page_ref): New structure.
(mips_got_page_entry): Use a section rather than a (bfd, symndx)
pair to represent the anchor point.
(mips_got_info): Add a got_page_refs field.
(mips_elf_link_hash_table): Add a sym_cache field.
(mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
(mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
new anchor representation.
(mips_elf_create_got_info): Create got_page_refs rather than
got_page_entries.
(mips_elf_record_got_page_ref): New function.
(mips_elf_pages_for_range): Move further down file.
(mips_elf_record_got_page_entry): Likewise.  Take a got as argument.
Use a section rather than a (bfd, symndx) pair to represent the
anchor point.
(mips_elf_resolve_got_page_ref): New function.
(mips_elf_resolve_final_got_entries): Use it to populate
got_page_entries.
(_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
rather than mips_elf_record_got_page_entry.  Only nullify h
afterwards.
(mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
earlier.

ld/testsuite/
* ld-mips-elf/mips16-pic-2.dd,
ld-mips-elf/mips16-pic-2.gd: Remove 3 unused local GOT entries.
* ld-mips-elf/got-page-4a.s, ld-mips-elf/got-page-4b.s,
ld-mips-elf/got-page-4a.d, ld-mips-elf/got-page-4a.got,
ld-mips-elf/got-page-4b.d, ld-mips-elf/got-page-4b.got,
ld-mips-elf/got-page-5.s, ld-mips-elf/got-page-5.d,
ld-mips-elf/got-page-5.got, ld-mips-elf/got-page-6.s,
ld-mips-elf/got-page-6.d, ld-mips-elf/got-page-6.got,
ld-mips-elf/got-page-7a.s, ld-mips-elf/got-page-7b.s,
ld-mips-elf/got-page-7c.s, ld-mips-elf/got-page-7d.s,
ld-mips-elf/got-page-7e.s, ld-mips-elf/got-page-7.d,
ld-mips-elf/got-page-7.got: New tests.
* ld-mips-elf/mips-elf.exp: Run them.
25 files changed:
bfd/ChangeLog
bfd/elfxx-mips.c
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/got-page-4a.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-4a.got [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-4a.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-4b.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-4b.got [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-4b.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-5.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-5.got [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-5.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-6.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-6.got [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-6.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7.got [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7a.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7b.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7c.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7d.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/got-page-7e.s [new file with mode: 0644]
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/mips16-pic-2.dd
ld/testsuite/ld-mips-elf/mips16-pic-2.gd