From 7d36e2799141d206651410c68080f40b88809a3b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 4 Oct 2017 18:01:47 -0700 Subject: [PATCH] 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. --- gas/ChangeLog | 7 +++++++ gas/testsuite/gas/elf/elf.exp | 1 + gas/testsuite/gas/elf/group3.d | 7 +++++++ gas/testsuite/gas/elf/group3.s | 7 +++++++ 4 files changed, 22 insertions(+) create mode 100644 gas/testsuite/gas/elf/group3.d create mode 100644 gas/testsuite/gas/elf/group3.s diff --git a/gas/ChangeLog b/gas/ChangeLog index c112d86094e..df8edc1dc4f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2017-10-04 H.J. Lu + + 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 PR 21167 diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 67374862965..8b9e1e8c269 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 00000000000..80390e51c17 --- /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 00000000000..bece65a225f --- /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 -- 2.30.2