aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf/mips-elf.exp
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2006-06-11 08:33:27 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2006-06-11 08:33:27 +0000
commit5108fc1bc95e59df3b7e56fa4144d8f438dfdbdc (patch)
treeb858bef6b05cca3be6f6e7258c0f1056835af232 /ld/testsuite/ld-mips-elf/mips-elf.exp
parentdbed2504e9706bb9b5c4486b294bffb8b483b23b (diff)
downloadgdb-5108fc1bc95e59df3b7e56fa4144d8f438dfdbdc.zip
gdb-5108fc1bc95e59df3b7e56fa4144d8f438dfdbdc.tar.gz
gdb-5108fc1bc95e59df3b7e56fa4144d8f438dfdbdc.tar.bz2
bfd/
* 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.
Diffstat (limited to 'ld/testsuite/ld-mips-elf/mips-elf.exp')
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp27
1 files changed, 27 insertions, 0 deletions
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 645b7e0..b5ddaef 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -137,6 +137,33 @@ if $has_newabi {
run_dump_test "emit-relocs-1"
}
+if {[istarget mips*-*-linux*]} {
+ # The number of symbols that are always included in the symbol table
+ # for these tests. The 5 are:
+ #
+ # the null symbol entry
+ # the .MIPS.stubs section symbol
+ # the .text section symbol
+ # _gp
+ # _GLOBAL_OFFSET_TABLE_
+ set base_syms 5
+ foreach dynsym { 7fff 8000 fff0 10000 2fe80 } {
+ run_ld_link_tests \
+ [list [list \
+ "Stub for dynsym 0x$dynsym" \
+ "-shared -melf32btsmip -T stub-dynsym-1.ld" \
+ [concat \
+ "-EB -march=mips1 -32 -KPIC" \
+ "--defsym base_syms=$base_syms" \
+ "--defsym dynsym=0x$dynsym"] \
+ [list "stub-dynsym-1.s"] \
+ [list [list \
+ "objdump" "-dz" \
+ "stub-dynsym-1-$dynsym.d"]] \
+ "stub-dynsym-1-$dynsym"]]
+ }
+ }
+
# For tests which may involve multiple files, use run_ld_link_tests.
# List contains test-items with 3 items followed by 2 lists: