]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/testsuite/ld-mips-elf/mips-elf.exp
bfd/
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-mips-elf / mips-elf.exp
1 # Expect script for MIPS ELF linker tests
2 # Copyright 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
3 #
4 # This file is part of the GNU Binutils.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 # MA 02110-1301, USA.
20 #
21
22 if {[istarget "mips*-*-vxworks"]} {
23 set mipsvxtests {
24 {"VxWorks shared library test 1" "-shared -Tvxworks1.ld"
25 "-mips2" {vxworks1-lib.s}
26 {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd}
27 {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
28 "libvxworks1.so"}
29 {"VxWorks executable test 1 (dynamic)" \
30 "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic"
31 "-mips2" {vxworks1.s}
32 {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}}
33 "vxworks1"}
34 {"VxWorks executable test 2 (dynamic)" \
35 "-Tvxworks1.ld -q --force-dynamic"
36 "-mips2" {vxworks2.s}
37 {{readelf --segments vxworks2.sd}}
38 "vxworks2"}
39 {"VxWorks executable test 2 (static)"
40 "-Tvxworks1.ld"
41 "-mips2" {vxworks2.s}
42 {{readelf --segments vxworks2-static.sd}}
43 "vxworks2"}
44 }
45 run_ld_link_tests $mipsvxtests
46 run_dump_test "vxworks1-static"
47 run_dump_test "vxworks-forced-local-1"
48 return
49 }
50
51 if {![istarget mips*-*-*] || ![is_elf_format]} {
52 return
53 }
54
55 set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]]
56 set linux_gnu [expr [istarget mips*-*-linux*]]
57 set embedded_elf [expr [istarget mips*-*-elf]]
58
59 if { $linux_gnu } {
60 run_ld_link_tests [list \
61 [list "Dummy shared library for MIPS16 PIC test 1" \
62 "-shared -melf32btsmip" \
63 "-EB -32" { mips16-pic-1-dummy.s } \
64 {} \
65 "mips16-pic-1-dummy.so"] \
66 [list "MIPS16 PIC test 1" \
67 "-melf32btsmip -T mips16-pic-1.ld tmpdir/mips16-pic-1-dummy.so" \
68 "-EB -32 -I $srcdir/$subdir" { mips16-pic-1a.s mips16-pic-1b.s } \
69 { { objdump { -dr -j.text } mips16-pic-1.dd }
70 { readelf -A mips16-pic-1.gd } } \
71 "mips16-pic-1"] \
72 [list "MIPS16 PIC test 2" \
73 "-melf32btsmip -T mips16-pic-1.ld -shared" \
74 "-EB -32 -I $srcdir/$subdir" { mips16-pic-2a.s mips16-pic-2b.s } \
75 { { objdump { -dr -j.text } mips16-pic-2.dd } \
76 { readelf -A mips16-pic-2.gd } \
77 { readelf --symbols mips16-pic-2.nd } \
78 { readelf --relocs mips16-pic-2.rd } \
79 { readelf -d mips16-pic-2.ad } } \
80 "mips16-pic-2"] \
81 [list "MIPS16 PIC test 3" \
82 "-melf32btsmip -T mips16-pic-1.ld tmpdir/mips16-pic-1-dummy.so" \
83 "-EB -32 -I $srcdir/$subdir" { mips16-pic-3a.s mips16-pic-3b.s } \
84 { { objdump -dr mips16-pic-3.dd } \
85 { readelf --relocs mips16-pic-3.rd } \
86 { readelf -A mips16-pic-3.gd } } \
87 "mips16-pic-3"] \
88 [list "MIPS16 PIC test 4 (shared library)" \
89 "-shared -melf32btsmip -T mips16-pic-1.ld --version-script mips16-pic-4.ver" \
90 "-EB -32" { mips16-pic-4a.s mips16-pic-4b.s } \
91 { { objdump -dr mips16-pic-4a.dd } \
92 { readelf --symbols mips16-pic-4a.nd } \
93 { readelf -A mips16-pic-4a.gd } } \
94 "mips16-pic-4.so"] \
95 [list "MIPS16 PIC test 4 (executable)" \
96 "-melf32btsmip -T mips16-pic-1.ld tmpdir/mips16-pic-4.so" \
97 "-EB -32" { mips16-pic-4c.s } \
98 { { objdump -dr mips16-pic-4b.dd } } \
99 "mips16-pic-4"]]
100 }
101
102 if { [istarget mips64*-linux-gnu] } {
103 set o32_as_flags "-32 -EB"
104 set o32_ld_flags "-melf32btsmip"
105 } else {
106 set o32_as_flags ""
107 set o32_ld_flags ""
108 }
109
110 # Check MIPS16 markings being passed through link.
111 run_dump_test "mips16-1"
112
113 # MIPS branch offset final link checking.
114 run_dump_test "branch-misc-1"
115
116 # Test multi-got link. We only do this on GNU/Linux because it requires
117 # the "traditional" emulations.
118 if { $linux_gnu } {
119 run_dump_test "multi-got-1"
120 run_dump_test "multi-got-no-shared"
121 run_dump_test "multi-got-hidden-1"
122 run_dump_test "multi-got-hidden-2"
123 }
124
125 # Test __gnu_local_gp accesses
126 if { $linux_gnu } {
127 run_dump_test "no-shared-1-o32"
128 if { $has_newabi } {
129 run_dump_test "no-shared-1-n32"
130 run_dump_test "no-shared-1-n64"
131 }
132 }
133
134 if $has_newabi {
135 run_dump_test "elf-rel-got-n32"
136 run_dump_test "elf-rel-xgot-n32"
137 if { $linux_gnu } {
138 run_dump_test "elf-rel-got-n64-linux"
139 run_dump_test "elf-rel-xgot-n64-linux"
140 } else {
141 run_dump_test "elf-rel-got-n64"
142 run_dump_test "elf-rel-xgot-n64"
143 }
144
145 run_dump_test "relax-jalr-n32"
146 run_dump_test "relax-jalr-n32-shared"
147 run_dump_test "relax-jalr-n64"
148 run_dump_test "relax-jalr-n64-shared"
149 }
150
151 if { $linux_gnu } {
152 run_dump_test "rel32-o32"
153 run_dump_test "rel32-n32"
154 run_dump_test "rel64"
155 # The first test checks that a mixed PIC/non-PIC relocatable link
156 # will not introduce any stubs itself, but will flag PIC functions
157 # for the final link.
158 #
159 # The second test checks that we insert stubs for calls from
160 # non-PIC functions to PIC functions when linking the original
161 # two objects together.
162 #
163 # The third test checks that we do the same when linking the
164 # result of the first link (with no other source files).
165 run_ld_link_tests {
166 {"PIC and non-PIC test 1 (relocatable)" "-r -melf32btsmip"
167 "-32 -EB -mips2" {pic-and-nonpic-1a.s pic-and-nonpic-1b.s}
168 {{objdump -dr pic-and-nonpic-1-rel.dd}
169 {readelf --symbols pic-and-nonpic-1-rel.nd}}
170 "pic-and-nonpic-1-rel.o"}
171 {"PIC and non-PIC test 1 (static 1)"
172 "-melf32btsmip -Tpic-and-nonpic-1.ld"
173 "-32 -EB -mips2" {pic-and-nonpic-1a.s pic-and-nonpic-1b.s}
174 {{objdump -dr pic-and-nonpic-1.dd}
175 {readelf --symbols pic-and-nonpic-1.nd}}
176 "pic-and-nonpic-1-static1.o"}
177 {"PIC and non-PIC test 1 (static 2)"
178 "-melf32btsmip -Tpic-and-nonpic-1.ld tmpdir/pic-and-nonpic-1-rel.o"
179 "" {}
180 {{objdump -dr pic-and-nonpic-1.dd}
181 {readelf --symbols pic-and-nonpic-1.nd}}
182 "pic-and-nonpic-1-static2.o"}
183 }
184 run_dump_test "pic-and-nonpic-2"
185 run_ld_link_tests {
186 {"PIC and non-PIC test 3 (shared library)"
187 "-melf32btsmip -shared -Tpic-and-nonpic-3a.ld"
188 "-32 -EB -mips2" {pic-and-nonpic-3a.s}
189 {{readelf --segments pic-and-nonpic-3a.sd}
190 {readelf -A pic-and-nonpic-3a.gd}
191 {objdump -dr pic-and-nonpic-3a.dd}}
192 "pic-and-nonpic-3a.so"}
193 {"PIC and non-PIC test 3 (executable)"
194 "-melf32btsmip -Tpic-and-nonpic-3b.ld tmpdir/pic-and-nonpic-3a.so"
195 "-32 -EB -mips2" {pic-and-nonpic-3b.s}
196 {{readelf --segments pic-and-nonpic-3b.sd}
197 {objdump -dr pic-and-nonpic-3b.dd}
198 {objdump {-s -j.got.plt} pic-and-nonpic-3b.pd}
199 {readelf -A pic-and-nonpic-3b.gd}
200 {readelf --relocs pic-and-nonpic-3b.rd}
201 {readelf --symbols pic-and-nonpic-3b.nd}
202 {readelf -d pic-and-nonpic-3b.ad}}
203 "pic-and-nonpic-3b"}
204 }
205 run_dump_test "pic-and-nonpic-3-error"
206 run_ld_link_tests {
207 {"PIC and non-PIC test 4 (shared library)"
208 "-melf32btsmip -shared -Tpic-and-nonpic-3a.ld"
209 "-32 -EB -mips2" {pic-and-nonpic-4a.s}
210 {}
211 "pic-and-nonpic-4a.so"}
212 {"PIC and non-PIC test 4 (executable)"
213 "-melf32btsmip -Tpic-and-nonpic-4b.ld tmpdir/pic-and-nonpic-4a.so"
214 "-32 -EB -mips2" {pic-and-nonpic-4b.s}
215 {{readelf --segments pic-and-nonpic-4b.sd}
216 {objdump -dr pic-and-nonpic-4b.dd}
217 {objdump {-s -j.got -j.data} pic-and-nonpic-4b.gd}
218 {readelf --relocs pic-and-nonpic-4b.rd}
219 {readelf --symbols pic-and-nonpic-4b.nd}
220 {readelf -d pic-and-nonpic-4b.ad}}
221 "pic-and-nonpic-4b"}
222 }
223 run_dump_test "pic-and-nonpic-4-error"
224 run_ld_link_tests {
225 {"PIC and non-PIC test 5 (executable)"
226 "-melf32btsmip -Tpic-and-nonpic-5b.ld tmpdir/pic-and-nonpic-3a.so tmpdir/pic-and-nonpic-4a.so"
227 "-32 -EB -mips2" {pic-and-nonpic-5a.s pic-and-nonpic-5b.s}
228 {{readelf --segments pic-and-nonpic-5b.sd}
229 {objdump -dr pic-and-nonpic-5b.dd}
230 {objdump {-s -j.got.plt -j.data} pic-and-nonpic-5b.pd}
231 {readelf -A pic-and-nonpic-5b.gd}
232 {readelf --relocs pic-and-nonpic-5b.rd}
233 {readelf --symbols pic-and-nonpic-5b.nd}
234 {readelf -d pic-and-nonpic-5b.ad}}
235 "pic-and-nonpic-5b"}
236 }
237 set abis { o32 -32 elf32btsmip }
238 if $has_newabi {
239 lappend abis n32 -n32 elf32btsmipn32
240 lappend abis n64 -64 elf64btsmip
241 }
242 foreach { abi flag emul } $abis {
243 run_ld_link_tests [list \
244 [list "PIC and non-PIC test 6 ($abi shared library)" \
245 "-m$emul -shared -Tpic-and-nonpic-3a.ld" \
246 "$flag -EB -mips3" \
247 [list "pic-and-nonpic-6-${abi}a.s"] {} \
248 "pic-and-nonpic-6-${abi}.so"] \
249 [list "PIC and non-PIC test 6 ($abi executable)" \
250 "-m$emul -Tpic-and-nonpic-6.ld tmpdir/pic-and-nonpic-6-${abi}.so" \
251 "$flag -EB -mips3" \
252 [list "pic-and-nonpic-6-${abi}b.s" \
253 "pic-and-nonpic-6-${abi}c.s"] \
254 [list "readelf {--wide --segments} pic-and-nonpic-6-${abi}.sd" \
255 "objdump -dr pic-and-nonpic-6-${abi}.dd" \
256 "objdump {-s -j.got.plt} pic-and-nonpic-6-${abi}.pd" \
257 "readelf -A pic-and-nonpic-6-${abi}.gd" \
258 "readelf --relocs pic-and-nonpic-6-${abi}.rd" \
259 "readelf --symbols pic-and-nonpic-6-${abi}.nd" \
260 "readelf -d pic-and-nonpic-6-${abi}.ad"] \
261 "pic-and-nonpic-6-${abi}"]]
262 }
263 }
264
265 if { $embedded_elf } {
266 run_dump_test "region1"
267 }
268
269 if $embedded_elf {
270 # This could work on other targets too, but would need the appropriate
271 # ld -m switch.
272 run_dump_test "reloc-1-rel"
273 }
274 if $has_newabi {
275 run_dump_test "reloc-1-n32"
276 if $linux_gnu {
277 # Uses a linux-specific ld -m switch
278 run_dump_test "reloc-1-n64"
279 }
280 }
281 run_dump_test "reloc-2"
282 run_dump_test "reloc-merge-lo16"
283 run_dump_test "reloc-3"
284 if {$has_newabi} {
285 run_dump_test "reloc-3-n32"
286 }
287 run_dump_test "reloc-4"
288 run_dump_test "reloc-5"
289
290 if {$has_newabi && $linux_gnu} {
291 run_dump_test "eh-frame1-n32"
292 run_dump_test "eh-frame1-n64"
293 run_dump_test "eh-frame2-n32"
294 run_dump_test "eh-frame2-n64"
295 }
296 if {$embedded_elf} {
297 run_dump_test "eh-frame3"
298 run_dump_test "eh-frame4"
299 }
300
301 run_dump_test "jaloverflow"
302 run_dump_test "jaloverflow-2"
303 if {$has_newabi} {
304 run_dump_test "jalbal"
305 }
306
307 run_dump_test "mips16-hilo"
308 if {$has_newabi} {
309 run_dump_test "mips16-hilo-n32"
310 }
311
312 if { $linux_gnu } {
313 run_dump_test "textrel-1"
314 run_dump_test "got-page-1"
315 if $has_newabi {
316 run_dump_test "got-page-2"
317 run_dump_test "dyn-sec64"
318 }
319 run_dump_test "got-page-3"
320 run_dump_test "got-dump-1"
321 if $has_newabi {
322 run_dump_test "got-dump-2"
323 }
324 run_dump_test "reloc-estimate-1"
325 }
326
327 if $has_newabi {
328 run_dump_test "emit-relocs-1"
329 }
330
331 run_dump_test "hash1a"
332 run_dump_test "hash1b"
333 run_dump_test "hash1c"
334
335 if {[istarget mips*-*-linux*]} {
336 # The number of symbols that are always included in the symbol table
337 # for these tests. The 4 are:
338 #
339 # the null symbol entry
340 # the .MIPS.stubs section symbol
341 # _gp
342 # _GLOBAL_OFFSET_TABLE_
343 set base_syms 4
344 foreach dynsym { 7fff 8000 fff0 10000 2fe80 } {
345 run_ld_link_tests \
346 [list [list \
347 "Stub for dynsym 0x$dynsym" \
348 "-shared -melf32btsmip -T stub-dynsym-1.ld" \
349 [concat \
350 "-EB -march=mips1 -32 -KPIC" \
351 "--defsym base_syms=$base_syms" \
352 "--defsym dynsym=0x$dynsym"] \
353 [list "stub-dynsym-1.s"] \
354 [list [list \
355 "objdump" "-dz" \
356 "stub-dynsym-1-$dynsym.d"]] \
357 "stub-dynsym-1-$dynsym"]]
358 }
359 }
360
361 # For tests which may involve multiple files, use run_ld_link_tests.
362
363 # List contains test-items with 3 items followed by 2 lists:
364 # 0:name 1:ld options 2:assembler options
365 # 3:filenames of assembler files 4: action and options. 5: name of output file
366
367 # Actions:
368 # objdump: Apply objdump options on result. Compare with regex (last arg).
369 # nm: Apply nm options on result. Compare with regex (last arg).
370 # readelf: Apply readelf options on result. Compare with regex (last arg).
371
372 set mips_tls_tests {
373 {"Static executable with TLS" "-static -melf32btsmip -T mips-dyn.ld"
374 "-EB -march=mips1 -32 -KPIC" {tlsbin-o32.s}
375 {{objdump {-dr -m mips:isa32r2} tlsbin-o32.d} {objdump -srj.got tlsbin-o32.got}}
376 "tls-static-o32"}
377 {"Shared library with TLS" "-shared -melf32btsmip -T mips-lib.ld"
378 "-EB -march=mips1 -32 -KPIC" {tlslib-o32.s}
379 {{objdump {-dr -m mips:isa32r2} tlslib-o32.d} {objdump -Rsj.got tlslib-o32.got}}
380 "tlslib-o32.so"}
381 {"Dynamic executable with TLS"
382 "-melf32btsmip -T mips-dyn.ld tmpdir/tlslib-o32.so"
383 "-EB -march=mips1 -32 -KPIC" {tlsdyn-o32.s}
384 {{objdump {-dr -m mips:isa32r2} tlsdyn-o32.d} {objdump -Rsj.got tlsdyn-o32.got}}
385 "tls-dynamic-o32"}
386 {"Shared library with multiple GOTs and TLS"
387 "-shared -melf32btsmip -T mips-lib.ld"
388 "-EB -march=mips1 -32 -KPIC" {tls-multi-got-1-1.s tls-multi-got-1-2.s}
389 {{readelf {-d -r} tls-multi-got-1.r}
390 {objdump {-dr -m mips:isa32r2} tls-multi-got-1.d}
391 {objdump -Rsj.got tls-multi-got-1.got}}
392 "tlslib-multi.so"}
393 {"Shared library with TLS and versioning"
394 "-shared -melf32btsmip -T mips-lib.ld --version-script tlslib.ver"
395 "-EB -march=mips1 -32 -KPIC" {tlslib-o32.s}
396 {{objdump {-dr -m mips:isa32r2} tlslib-o32.d} {objdump -Rsj.got tlslib-o32-ver.got}}
397 "tlslib-o32-ver.so"}
398 {"Dynamic executable with TLS and versioning"
399 "-melf32btsmip -T mips-dyn.ld tmpdir/tlslib-o32-ver.so"
400 "-EB -march=mips1 -32 -KPIC" {tlsdyn-o32.s tlsdyn-o32-2.s}
401 {{objdump {-dr -m mips:isa32r2} tlsdyn-o32-1.d} {objdump -Rsj.got tlsdyn-o32-1.got}}
402 "tls-dynamic-o32-ver"}
403 {"Dynamic executable with TLS and versioning (order 2)"
404 "-melf32btsmip -T mips-dyn.ld tmpdir/tlsdyn-o32.o tmpdir/tlslib-o32-ver.so tmpdir/tlsdyn-o32-2.o"
405 "-EB -march=mips1 -32 -KPIC" {}
406 {{objdump {-dr -m mips:isa32r2} tlsdyn-o32-2.d} {objdump -Rsj.got tlsdyn-o32-2.got}}
407 "tls-dynamic-o32-ver-2"}
408 {"Dynamic executable with TLS and versioning (order 3)"
409 "-melf32btsmip -T mips-dyn.ld tmpdir/tlsdyn-o32-2.o tmpdir/tlslib-o32-ver.so tmpdir/tlsdyn-o32.o"
410 "-EB -march=mips1 -32 -KPIC" {}
411 {{objdump {-dr -m mips:isa32r2} tlsdyn-o32-3.d} {objdump -Rsj.got tlsdyn-o32-3.got}}
412 "tls-dynamic-o32-ver-3"}
413 {"Shared library with TLS and hidden symbols"
414 "-shared -melf32btsmip -T mips-lib.ld --version-script tlslib-hidden.ver"
415 "-EB -march=mips1 -32 -KPIC" {tlslib-o32.s}
416 {{objdump {-dr -m mips:isa32r2} tlslib-o32.d} {objdump -Rsj.got tlslib-o32-hidden.got}}
417 "tlslib-o32-hidden.so"}
418 {"Shared library with TLS and hidden symbols (2)"
419 "-shared -melf32btsmip -T mips-lib.ld"
420 "-EB -march=mips1 -32 -KPIC" {tls-hidden2a.s tls-hidden2b.s}
421 {{objdump -drj.text tls-hidden2.d} {objdump -sj.got tls-hidden2-got.d}}
422 "tls-hidden2.so"}
423 {"Shared library with TLS and hidden symbols (3)"
424 "-shared -melf32btsmip -T tls-hidden3.ld"
425 "-EB -march=mips2 -32 -KPIC" {tls-hidden3a.s tls-hidden3b.s}
426 {{objdump -dj.text tls-hidden3.d} {objdump -sj.got tls-hidden3.got}
427 {readelf --relocs tls-hidden3.r}}
428 "tls-hidden3.so"}
429 {"Shared library with TLS and hidden symbols (4)"
430 "-shared -melf32btsmip -T tls-hidden3.ld"
431 "-EB -march=mips2 -32 -KPIC" {tls-hidden4a.s tls-hidden4b.s}
432 {{objdump -sj.got tls-hidden4.got} {readelf --relocs tls-hidden4.r}}
433 "tls-hidden4.so"}
434 }
435
436 if {[istarget mips*-*-linux*]} {
437 run_ld_link_tests $mips_tls_tests
438 }
439
440 set mips16_call_global_test [list \
441 [list "Global calls from mips16" \
442 "$o32_ld_flags" \
443 "$o32_as_flags -mips32r2" \
444 {mips16-call-global-1.s mips16-call-global-2.s mips16-call-global-3.s} \
445 {{objdump -dr mips16-call-global.d}} \
446 "mips16-call-global"]]
447
448 run_ld_link_tests $mips16_call_global_test
449
450 set mips16_intermix_test [list \
451 [list "Intermixing mips32 and mips16 functions" \
452 "$o32_ld_flags" \
453 "$o32_as_flags -mips32r2" \
454 {mips16-intermix-1.s mips16-intermix-2.s} \
455 {{objdump -t mips16-intermix.d}} \
456 "mips16-intermix"]]
457
458 run_ld_link_tests $mips16_intermix_test
459
460 run_dump_test "mips16-local-stubs-1"
461
462 run_dump_test "attr-gnu-4-00"
463 run_dump_test "attr-gnu-4-01"
464 run_dump_test "attr-gnu-4-02"
465 run_dump_test "attr-gnu-4-03"
466 run_dump_test "attr-gnu-4-04"
467 run_dump_test "attr-gnu-4-05"
468 run_dump_test "attr-gnu-4-10"
469 run_dump_test "attr-gnu-4-11"
470 run_dump_test "attr-gnu-4-12"
471 run_dump_test "attr-gnu-4-13"
472 run_dump_test "attr-gnu-4-14"
473 run_dump_test "attr-gnu-4-15"
474 run_dump_test "attr-gnu-4-20"
475 run_dump_test "attr-gnu-4-21"
476 run_dump_test "attr-gnu-4-22"
477 run_dump_test "attr-gnu-4-23"
478 run_dump_test "attr-gnu-4-24"
479 run_dump_test "attr-gnu-4-25"
480 run_dump_test "attr-gnu-4-30"
481 run_dump_test "attr-gnu-4-31"
482 run_dump_test "attr-gnu-4-32"
483 run_dump_test "attr-gnu-4-33"
484 run_dump_test "attr-gnu-4-34"
485 run_dump_test "attr-gnu-4-35"
486 run_dump_test "attr-gnu-4-40"
487 run_dump_test "attr-gnu-4-41"
488 run_dump_test "attr-gnu-4-42"
489 run_dump_test "attr-gnu-4-43"
490 run_dump_test "attr-gnu-4-44"
491 run_dump_test "attr-gnu-4-45"
492 run_dump_test "attr-gnu-4-51"
493
494 if { $linux_gnu } {
495 run_ld_link_tests {
496 {"GOT and versioning 1"
497 "-shared -melf32btsmip --version-script got-vers-1.ver"
498 "-EB -mips2 -32" {got-vers-1a.s got-vers-1b.s}
499 {{readelf -d got-vers-1.dd}
500 {readelf --symbols got-vers-1.sd}
501 {readelf --relocs got-vers-1.rd}}
502 "got-vers-1.so"}
503 }
504 }