diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips-elf.exp | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1.ld | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/stub-dynsym-1.s | 10 |
9 files changed, 149 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 5b36623..5995a35 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2006-06-11 Richard Sandiford <richard@codesourcery.com> + + * 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. + 2006-06-06 Alan Modra <amodra@bigpond.net.au> * ld-elfvers/vers.exp (objdump_versionstuff): Allow versions in 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: diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d new file mode 100644 index 0000000..b59bb5f --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d @@ -0,0 +1,18 @@ + +.*: 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 diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d new file mode 100644 index 0000000..07ca1a2 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d @@ -0,0 +1,18 @@ + +.*: file format elf32-tradbigmips + +Disassembly of section \.MIPS\.stubs: + +.* <\.MIPS.stubs>: +.*: 8f998010 lw t9,-32752\(gp\) +.*: 03e07821 move t7,ra +.*: 3c180002 lui t8,0x2 +.*: 0320f809 jalr t9 +.*: 3718fe80 ori t8,t8,0xfe80 +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +Disassembly of section .text: +#pass diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d new file mode 100644 index 0000000..bfc94c5 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d @@ -0,0 +1,16 @@ + +.*: file format elf32-tradbigmips + +Disassembly of section \.MIPS\.stubs: + +.* <\.MIPS.stubs>: +.*: 8f998010 lw t9,-32752\(gp\) +.*: 03e07821 move t7,ra +.*: 0320f809 jalr t9 +.*: 24187fff li t8,32767 +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +Disassembly of section .text: +#pass diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d new file mode 100644 index 0000000..2861ac2 --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d @@ -0,0 +1,16 @@ + +.*: file format elf32-tradbigmips + +Disassembly of section \.MIPS\.stubs: + +.* <\.MIPS.stubs>: +.*: 8f998010 lw t9,-32752\(gp\) +.*: 03e07821 move t7,ra +.*: 0320f809 jalr t9 +.*: 34188000 li t8,0x8000 +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +Disassembly of section .text: +#pass diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d b/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d new file mode 100644 index 0000000..440d32a --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d @@ -0,0 +1,16 @@ + +.*: file format elf32-tradbigmips + +Disassembly of section \.MIPS\.stubs: + +.* <\.MIPS.stubs>: +.*: 8f998010 lw t9,-32752\(gp\) +.*: 03e07821 move t7,ra +.*: 0320f809 jalr t9 +.*: 3418fff0 li t8,0xfff0 +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +.*: 00000000 nop +Disassembly of section .text: +#pass diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld b/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld new file mode 100644 index 0000000..17c998d --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1.ld @@ -0,0 +1,17 @@ +SECTIONS +{ + . = 0x80000; + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .rel.dyn : { *(.rel.dyn) } + .MIPS.stubs : { *(.MIPS.stubs) } + .text : { *(.text) } + + . = ALIGN (0x10000); + _gp = . + 0x7ff0; + .got : { *(.got) } + + /DISCARD/ : { *(.reginfo) } +} diff --git a/ld/testsuite/ld-mips-elf/stub-dynsym-1.s b/ld/testsuite/ld-mips-elf/stub-dynsym-1.s new file mode 100644 index 0000000..15d2e1b --- /dev/null +++ b/ld/testsuite/ld-mips-elf/stub-dynsym-1.s @@ -0,0 +1,10 @@ + .macro decl + .global exported\@ + .equ exported\@,\@ + .endm + + .rept dynsym - base_syms + decl + .endr + + lw $25,%call16(foo)($gp) |