mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
5108fc1bc9
* elfxx-mips.c (mips_elf_link_hash_table): Add function_stub_size. (STUB_ORI): New macro. (STUB_LI16U): Fix formatting. (MIPS_FUNCTION_STUB_SIZE): Delete. (MIPS_FUNCTION_STUB_MAX_SIZE): Likewise. (MIPS_FUNCTION_STUB_NORMAL_SIZE): New macro. (MIPS_FUNCTION_STUB_BIG_SIZE): Likewise. (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->function_stub_size instead of MIPS_FUNCTION_STUB_SIZE. (count_section_dynsyms): New function, split out from _bfd_mips_elf_final_link. (_bfd_mips_elf_always_size_sections): Get a worst-case estimate of the number of dynamic symbols needed and use it to set up function_stub_size. Use function_stub_size rather than MIPS_FUNCTION_STUB_SIZE to determine the size of the stub section. Use 16-byte stubs for 0x10000 dynamic symbols. (_bfd_mips_elf_size_dynamic_sections): Use htab->function_stub_size instead of MIPS_FUNCTION_STUB_SIZE. Fix formatting. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Change the size of the stub buffer from MIPS_FUNCTION_STUB_MAX_SIZE to MIPS_FUNCTION_STUB_BIG_SIZE. Tweak the check for unhandled dynindxes. Use MIPS_FUNCTION_STUB_BIG_SIZE rather than a hard-coded 20. Use STUB_ORI rather than STUB_LI16U for big stubs. (_bfd_mips_elf_link_hash_table_create): Initialize function_stub_size. (_bfd_mips_elf_final_link): Use count_section_dynsyms. ld/testsuite/ * ld-mips-elf/stub-dynsym-1.s, * ld-mips-elf/stub-dynsym-1.ld, * ld-mips-elf/stub-dynsym-1-7fff.d, * ld-mips-elf/stub-dynsym-1-8000.d, * ld-mips-elf/stub-dynsym-1-fff0.d, * ld-mips-elf/stub-dynsym-1-10000.d, * ld-mips-elf/stub-dynsym-1-2fe80.d: New test. * ld-mips-elf/mips-elf.exp: Run it.
19 lines
357 B
Makefile
19 lines
357 B
Makefile
|
|
.*: file format elf32-tradbigmips
|
|
|
|
Disassembly of section \.MIPS\.stubs:
|
|
|
|
.* <\.MIPS.stubs>:
|
|
.*: 8f998010 lw t9,-32752\(gp\)
|
|
.*: 03e07821 move t7,ra
|
|
.*: 3c180001 lui t8,0x1
|
|
.*: 0320f809 jalr t9
|
|
.*: 37180000 ori t8,t8,0x0
|
|
.*: 00000000 nop
|
|
.*: 00000000 nop
|
|
.*: 00000000 nop
|
|
.*: 00000000 nop
|
|
.*: 00000000 nop
|
|
Disassembly of section .text:
|
|
#pass
|