8275b357ad
* 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.
17 lines
965 B
R
17 lines
965 B
R
|
|
Relocation section '\.rela\.dyn' at offset .* contains .* entries:
|
|
Offset Info Type Sym\.Value Sym\. Name \+ Addend
|
|
00080c0c .*05 R_MIPS_HI16 00000000 __GOTT_BASE__ \+ 0
|
|
00080c10 .*06 R_MIPS_LO16 00000000 __GOTT_BASE__ \+ 0
|
|
00080c14 .*01 R_MIPS_16 00000000 __GOTT_INDEX__ \+ 0
|
|
0008141c 00000002 R_MIPS_32 00080c5c
|
|
00081800 00000002 R_MIPS_32 00080c5c
|
|
00081804 00000002 R_MIPS_32 00081800
|
|
00081808 .*02 R_MIPS_32 00081808 dglobal \+ 0
|
|
0008180c .*02 R_MIPS_32 00000000 dexternal \+ 0
|
|
00081420 .*02 R_MIPS_32 00081c00 x \+ 0
|
|
|
|
Relocation section '\.rela\.plt' at offset .* contains 2 entries:
|
|
Offset Info Type Sym\.Value Sym\. Name \+ Addend
|
|
00081400 .*7f R_MIPS_JUMP_SLOT 00000000 sexternal \+ 0
|
|
00081404 .*7f R_MIPS_JUMP_SLOT 00080c64 sglobal \+ 0
|