Add an assembler test for PR gas/21167
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Oct 2017 01:01:47 +0000 (18:01 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 5 Oct 2017 01:06:36 +0000 (18:06 -0700)
PR gas/21167
* testsuite/gas/elf/elf.exp: Run group3.
* testsuite/gas/elf/group3.d: New file.
* testsuite/gas/elf/group3.s: Likewise.

gas/ChangeLog
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/group3.d [new file with mode: 0644]
gas/testsuite/gas/elf/group3.s [new file with mode: 0644]

index c112d86094e4274c691e2b57e790ea09c97213fc..df8edc1dc4fc2bde6b4f1995f7cd37ef99c79eed 100644 (file)
@@ -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
index 67374862965ccafd5706b6b82f6f03d1698fe7d8..8b9e1e8c2694a3ece36665c9d9ada9c913b07ffe 100644 (file)
@@ -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 (file)
index 0000000..80390e5
--- /dev/null
@@ -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 (file)
index 0000000..bece65a
--- /dev/null
@@ -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
This page took 0.0373 seconds and 4 git commands to generate.