5 proc run_list_test { name suffix opts readelf_pipe } {
8 set testname "elf $name list"
9 set file $srcdir/$subdir/$name
10 gas_run ${name}.s "$opts -o dump.o" ">&dump.out"
11 if { ![string match "" $opts]
12 && [regexp_diff "dump.out" "${file}.l"] } then {
14 verbose "output is [file_contents "dump.out"]" 2
17 send_log "$READELF -s dump.o > dump.out\n"
18 catch "exec $READELF -s dump.o $readelf_pipe > dump.out\n" comp_output
19 if ![string match "" $comp_output] then {
20 send_log "$comp_output\n"
24 verbose_eval {[file_contents "dump.out"]} 3
25 if { [regexp_diff "dump.out" "${file}.e${suffix}"] } then {
27 verbose "output is [file_contents "dump.out"]" 2
33 # We're testing bits in obj-elf -- don't run on anything else.
34 if { ([istarget "*-*-elf*"]
35 || [istarget "*-*-linux*"]
36 || [istarget "sparc*-*-solaris*"]
37 || [istarget "mips*-*-irix6*"])
38 && ![istarget *-*-linux*aout*]
39 && ![istarget *-*-linux*coff*]
40 && ![istarget *-*-linux*oldld*]
41 && ![istarget sh64*-*-linux*]
44 if {[istarget "mips*-*-*"]} then {
45 set target_machine -mips
47 if {[istarget m32r*-*-*]} then {
48 set target_machine -m32r
50 run_dump_test "ehopt0"
51 run_dump_test "group0a"
52 run_dump_test "group0b"
53 run_list_test "group1" "" "" ""
54 run_dump_test "section0"
55 run_dump_test "section1"
56 run_list_test "section2" "$target_machine" "-al" ""
57 run_dump_test "section3"
58 run_dump_test "symver"
59 run_list_test "type" "" "" "| grep \"1 \\\[FONT\\\]\""