* elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
[deliverable/binutils-gdb.git] / gas / testsuite / gas / elf / elf.exp
CommitLineData
98944905
RH
1#
2# elf tests
3#
4
fa6b2d59 5proc run_list_test { name suffix opts } {
5b5032eb
L
6 global READELF
7 global srcdir subdir
8 set testname "elf $name list"
02e07694 9 set file $srcdir/$subdir/$name
5b5032eb
L
10 gas_run ${name}.s "$opts -o dump.o" ">&dump.out"
11 if { [regexp_diff "dump.out" "${file}.l"] } then {
12 fail $testname
13 verbose "output is [file_contents "dump.out"]" 2
14 return
15 }
16 send_log "$READELF -s dump.o > dump.out\n"
17 catch "exec $READELF -s dump.o > dump.out\n" comp_output
18 if ![string match "" $comp_output] then {
19 send_log "$comp_output\n"
20 fail $testname
21 return
22 }
23 verbose_eval {[file_contents "dump.out"]} 3
fa6b2d59 24 if { [regexp_diff "dump.out" "${file}.e${suffix}"] } then {
5b5032eb
L
25 fail $testname
26 verbose "output is [file_contents "dump.out"]" 2
27 return
28 }
29 pass $testname
30}
31
98944905 32# We're testing bits in obj-elf -- don't run on anything else.
966d5bec
ILT
33if { ([istarget "*-*-elf*"]
34 || [istarget "*-*-linux*"]
35 || [istarget "sparc*-*-solaris*"]
36 || [istarget "mips*-*-irix6*"])
37 && ![istarget *-*-linux*aout*]
f48026f7 38 && ![istarget *-*-linux*coff*]
966d5bec
ILT
39 && ![istarget *-*-linux*oldld*]
40} then {
fa6b2d59 41 set target_machine ""
d1c15a92 42 if {[istarget "mips*-*-*"] || [istarget v850-*-*]} then {
fa6b2d59
L
43 set target_machine -mips
44 }
1ff55c93 45 run_dump_test "ehopt0"
98944905 46 run_dump_test "section0"
8ee99f93 47 run_dump_test "section1"
fa6b2d59 48 run_list_test "section2" "$target_machine" "-al"
98944905 49}
This page took 0.100224 seconds and 4 git commands to generate.