aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-04 18:01:47 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-04 18:06:36 -0700
commit7d36e2799141d206651410c68080f40b88809a3b (patch)
tree3455d28293504318a264433c69e98d5febcaa97d
parent8c6716e57eb991ba6ceb07011045d626652aaf01 (diff)
downloadfsf-binutils-gdb-7d36e2799141d206651410c68080f40b88809a3b.zip
fsf-binutils-gdb-7d36e2799141d206651410c68080f40b88809a3b.tar.gz
fsf-binutils-gdb-7d36e2799141d206651410c68080f40b88809a3b.tar.bz2
Add an assembler test for PR gas/21167
PR gas/21167 * testsuite/gas/elf/elf.exp: Run group3. * testsuite/gas/elf/group3.d: New file. * testsuite/gas/elf/group3.s: Likewise.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/elf/elf.exp1
-rw-r--r--gas/testsuite/gas/elf/group3.d7
-rw-r--r--gas/testsuite/gas/elf/group3.s7
4 files changed, 22 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c112d86..df8edc1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/21167
+ * testsuite/gas/elf/elf.exp: Run group3.
+ * testsuite/gas/elf/group3.d: New file.
+ * testsuite/gas/elf/group3.s: Likewise.
+
2017-10-05 Alan Modra <amodra@gmail.com>
PR 21167
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 6737486..8b9e1e8 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -122,6 +122,7 @@ if { [is_elf_format] } then {
run_dump_test "group1a"
run_dump_test "group1b"
run_dump_test "group2"
+ run_dump_test "group3"
case $target_triplet in {
{ hppa64*-*-hpux* } { }
{ riscv*-*-* } { }
diff --git a/gas/testsuite/gas/elf/group3.d b/gas/testsuite/gas/elf/group3.d
new file mode 100644
index 0000000..80390e5
--- /dev/null
+++ b/gas/testsuite/gas/elf/group3.d
@@ -0,0 +1,7 @@
+#readelf: -g --wide
+
+COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 3 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] \.foo
+ \[[ 0-9]+\] \.bar
+ \[[ 0-9]+\] \.rela?\.bar
diff --git a/gas/testsuite/gas/elf/group3.s b/gas/testsuite/gas/elf/group3.s
new file mode 100644
index 0000000..bece65a
--- /dev/null
+++ b/gas/testsuite/gas/elf/group3.s
@@ -0,0 +1,7 @@
+ .section .foo,"axG",%progbits,foo,comdat
+ .globl foo
+ .type foo,%function
+foo:
+ .byte 1
+ .section .bar,"aG",%progbits,foo,comdat
+ .dc.a foo