summaryrefslogtreecommitdiffstats
path: root/binutils/testsuite/binutils-all
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp2
-rw-r--r--binutils/testsuite/binutils-all/strip-1.d11
-rw-r--r--binutils/testsuite/binutils-all/strip-2.d18
3 files changed, 31 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 679eea5988..96ae518b9a 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -731,5 +731,7 @@ run_dump_test "copy-3"
if [is_elf_format] {
run_dump_test "localize-hidden-1"
+ run_dump_test "strip-1"
+ run_dump_test "strip-2"
}
run_dump_test "localize-hidden-2"
diff --git a/binutils/testsuite/binutils-all/strip-1.d b/binutils/testsuite/binutils-all/strip-1.d
new file mode 100644
index 0000000000..200983211e
--- /dev/null
+++ b/binutils/testsuite/binutils-all/strip-1.d
@@ -0,0 +1,11 @@
+#PROG: strip
+#source: group.s
+#readelf: -Sg --wide
+#name: strip with section group 1
+
+#...
+ \[[ 0-9]+\] \.text.*[ \t]+PROGBITS[ \t0-9a-f]+AX[ \t]+.*
+#...
+ \[[ 0-9]+\] \.data.*[ \t]+PROGBITS[ \t0-9a-f]+WA[ \t]+.*
+#...
+There are no section groups in this file.
diff --git a/binutils/testsuite/binutils-all/strip-2.d b/binutils/testsuite/binutils-all/strip-2.d
new file mode 100644
index 0000000000..5c54b7ecb8
--- /dev/null
+++ b/binutils/testsuite/binutils-all/strip-2.d
@@ -0,0 +1,18 @@
+#PROG: strip
+#source: group.s
+#strip: --strip-unneeded
+#readelf: -Sg --wide
+#name: strip with section group 2
+
+#...
+ \[[ 0-9]+\] foo_group[ \t]+GROUP[ \t]+.*
+#...
+ \[[ 0-9]+\] \.text.*[ \t]+PROGBITS[ \t0-9a-f]+AXG[ \t]+.*
+#...
+ \[[ 0-9]+\] \.data.*[ \t]+PROGBITS[ \t0-9a-f]+WAG[ \t]+.*
+#...
+COMDAT group section \[[ 0-9]+\] `foo_group' \[foo_group\] contains 2 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] .text.*
+ \[[ 0-9]+\] .data.*
+#pass
OpenPOWER on IntegriCloud