diff options
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/elf/elf.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/section24b.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/section27.d | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/section27.s | 34 |
4 files changed, 61 insertions, 3 deletions
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 25c40a2..80dec4e 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -268,6 +268,7 @@ if { [is_elf_format] } then { run_dump_test "section24b" run_dump_test "section25" run_dump_test "section26" + run_dump_test "section27" run_dump_test "sh-link-zero" run_dump_test "dwarf2-1" $dump_opts run_dump_test "dwarf2-2" $dump_opts diff --git a/gas/testsuite/gas/elf/section24b.d b/gas/testsuite/gas/elf/section24b.d index 451ec21..03dd291 100644 --- a/gas/testsuite/gas/elf/section24b.d +++ b/gas/testsuite/gas/elf/section24b.d @@ -3,8 +3,12 @@ #source: section24.s #readelf: -S --wide -#failif #... - \[..\] .(text|data|bss|rodata)[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 [^R] .* + \[..\] .text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +AX .* +#... + \[..\] .data[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +WA .* +#... + \[..\] .bss[ ]+NOBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +WA .* +#... + \[..\] .rodata[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +A .* #pass - diff --git a/gas/testsuite/gas/elf/section27.d b/gas/testsuite/gas/elf/section27.d new file mode 100644 index 0000000..da0734f --- /dev/null +++ b/gas/testsuite/gas/elf/section27.d @@ -0,0 +1,19 @@ +#readelf: -h -S --wide +#name: SHF_GNU_RETAIN sections 27 +#notarget: ![supports_gnu_osabi] + +#... + +OS/ABI: +UNIX - (GNU|FreeBSD) +#... + \[..\] .text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AX.* +#... + \[..\] .data[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WA.* +#... + \[..\] .bss[ ]+NOBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WA.* +#... + \[..\] .bss[ ]+NOBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WAR.* +#... + \[..\] .data[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WAR.* +#... + \[..\] .text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXR.* +#pass diff --git a/gas/testsuite/gas/elf/section27.s b/gas/testsuite/gas/elf/section27.s new file mode 100644 index 0000000..78e410f --- /dev/null +++ b/gas/testsuite/gas/elf/section27.s @@ -0,0 +1,34 @@ + .section .bss,"aw" + .global discard0 + .type discard0, %object +discard0: + .zero 2 + + .section .data,"aw" + .global discard1 + .type discard1, %object +discard1: + .word 1 + + .text + .global discard2 + .type discard2, %function +discard2: + .word 0 + + .section .bss,"awR",%nobits + .global retain0 + .type retain0, %object +retain0: + .zero 2 + + .section .data,"awR",%progbits + .type retain1, %object +retain1: + .word 1 + + .section .text,"axR",%progbits + .global retain2 + .type retain2, %function +retain2: + .word 0 |