aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/elf/elf.exp2
-rw-r--r--gas/testsuite/gas/elf/section28.d15
-rw-r--r--gas/testsuite/gas/elf/section28.s11
-rw-r--r--gas/testsuite/gas/elf/section29.d11
-rw-r--r--gas/testsuite/gas/elf/section29.s4
5 files changed, 43 insertions, 0 deletions
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 2917ea9..525f47c 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -273,6 +273,8 @@ if { [is_elf_format] } then {
run_dump_test "section25"
run_dump_test "section26"
run_dump_test "section27"
+ run_dump_test "section28"
+ run_dump_test "section29"
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/section28.d b/gas/testsuite/gas/elf/section28.d
new file mode 100644
index 0000000..a1fd65b
--- /dev/null
+++ b/gas/testsuite/gas/elf/section28.d
@@ -0,0 +1,15 @@
+#readelf: -h -S --wide
+#name: SHF_GNU_RETAIN sections 28
+#notarget: ![supports_gnu_osabi]
+
+#...
+ +OS/ABI: +UNIX - (GNU|FreeBSD)
+#...
+ \[..\] \.note\.Linux +NOTE +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +A +0.*
+#...
+ \[..\] \.note\.Linux +NOTE +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +AR +0.*
+#...
+ \[..\] \.note\.foo +NOTE +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +0 +.*
+#...
+ \[..\] \.note\.foo +NOTE +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 +R +0 +.*
+#pass
diff --git a/gas/testsuite/gas/elf/section28.s b/gas/testsuite/gas/elf/section28.s
new file mode 100644
index 0000000..ebcf42c
--- /dev/null
+++ b/gas/testsuite/gas/elf/section28.s
@@ -0,0 +1,11 @@
+ .section .note.Linux,"a"
+ .word 1
+
+ .section .note.Linux,"aR"
+ .word 1
+
+ .section .note.foo
+ .word 1
+
+ .section .note.foo,"R"
+ .word 1
diff --git a/gas/testsuite/gas/elf/section29.d b/gas/testsuite/gas/elf/section29.d
new file mode 100644
index 0000000..7e1b482
--- /dev/null
+++ b/gas/testsuite/gas/elf/section29.d
@@ -0,0 +1,11 @@
+#readelf: -h -S --wide
+#name: SHF_GNU_RETAIN sections 29
+#notarget: ![supports_gnu_osabi]
+
+#...
+ +OS/ABI: +UNIX - (GNU|FreeBSD)
+#...
+ \[..\] \.rodata\.str1\.1 +PROGBITS +[0-9a-f]+ [0-9a-f]+ 0+4 +01 +AMS +0 +0 +1
+#...
+ \[..\] \.rodata\.str1\.1 +PROGBITS +[0-9a-f]+ [0-9a-f]+ 0+4 +01 +AMSR +0 +0 +1
+#pass
diff --git a/gas/testsuite/gas/elf/section29.s b/gas/testsuite/gas/elf/section29.s
new file mode 100644
index 0000000..772031e
--- /dev/null
+++ b/gas/testsuite/gas/elf/section29.s
@@ -0,0 +1,4 @@
+ .section .rodata.str1.1,"aMS",%progbits,1
+ .asciz "foo"
+ .section .rodata.str1.1,"aMSR",%progbits,1
+ .asciz "bar"