From: H.J. Lu Date: Sat, 7 May 2005 22:19:37 +0000 (+0000) Subject: gas/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e3f953dbdd7f718e2e1fdaac67130b2855a0fe9;p=binutils-gdb.git gas/ 2005-05-07 H.J. Lu PR 940 * config/tc-ia64.c (start_unwind_section): Properly check comdat group with SHF_GROUP. gas/testsuite/ 2005-05-07 H.J. Lu PR 940 * gas/ia64/group-2.d: New. * gas/ia64/group-2.s: New. * gas/ia64/ia64.exp: Add "group-2". --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 0317c4d74b7..d79fc664b55 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2005-05-07 H.J. Lu + + PR 940 + * config/tc-ia64.c (start_unwind_section): Properly check + comdat group with SHF_GROUP. + 2005-05-06 Bob Wilson * doc/c-xtensa.texi (Literal Directive): Spelling correction. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 729ce27262d..43b79e5fa8b 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -3535,7 +3535,8 @@ start_unwind_section (const segT text_seg, int sec_index) sec_name [sec_name_len] = '\0'; /* Handle COMDAT group. */ - if (suffix == text_name && (text_seg->flags & SEC_LINK_ONCE) != 0) + if ((text_seg->flags & SEC_LINK_ONCE) != 0 + && (elf_section_flags (text_seg) & SHF_GROUP) != 0) { char *section; size_t len, group_name_len; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index bcd4da6771d..96eb8705f30 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2005-05-07 H.J. Lu + + PR 940 + * gas/ia64/group-2.d: New. + * gas/ia64/group-2.s: New. + + * gas/ia64/ia64.exp: Add "group-2". + 2005-05-07 H.J. Lu PR 843 diff --git a/gas/testsuite/gas/ia64/group-2.d b/gas/testsuite/gas/ia64/group-2.d new file mode 100644 index 00000000000..37ef92527a1 --- /dev/null +++ b/gas/testsuite/gas/ia64/group-2.d @@ -0,0 +1,43 @@ +#readelf: -Sg +#as: -x +#name: ia64 unwind group + +There are 12 section headers, starting at offset 0x100: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0000000000000000 00000000 + 0000000000000000 0000000000000000 0 0 0 + \[ 1\] \.group GROUP 0000000000000000 00000040 + 0000000000000010 0000000000000004 10 5 4 + \[ 2\] \.text PROGBITS 0000000000000000 00000050 + 0000000000000000 0000000000000000 AX 0 0 16 + \[ 3\] \.data PROGBITS 0000000000000000 00000050 + 0000000000000000 0000000000000000 WA 0 0 1 + \[ 4\] \.bss NOBITS 0000000000000000 00000050 + 0000000000000000 0000000000000000 WA 0 0 1 + \[ 5\] \.gnu\.linkonce\.t\.f PROGBITS 0000000000000000 00000050 + 0000000000000000 0000000000000000 AXG 0 0 16 + \[ 6\] \.gnu\.linkonce\.ia6 PROGBITS 0000000000000000 00000050 + 0000000000000010 0000000000000000 AG 0 0 8 + \[ 7\] \.gnu\.linkonce\.ia6 IA_64_UNWIND 0000000000000000 00000060 + 0000000000000018 0000000000000000 ALG 5 5 8 + \[ 8\] \.rela\.gnu\.linkonc RELA 0000000000000000 000004e0 + 0000000000000048 0000000000000018 10 7 8 + \[ 9\] \.shstrtab STRTAB 0000000000000000 00000078 + 0000000000000081 0000000000000000 0 0 1 + \[10\] \.symtab SYMTAB 0000000000000000 00000400 + 00000000000000d8 0000000000000018 11 9 8 + \[11\] \.strtab STRTAB 0000000000000000 000004d8 + 0000000000000005 0000000000000000 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +COMDAT group section `\.group' \[foo\] contains 3 sections: + \[Index\] Name + \[ 5\] \.gnu\.linkonce\.t\.foo + \[ 6\] \.gnu\.linkonce\.ia64unwi\.foo + \[ 7\] \.gnu\.linkonce\.ia64unw\.foo diff --git a/gas/testsuite/gas/ia64/group-2.s b/gas/testsuite/gas/ia64/group-2.s new file mode 100644 index 00000000000..6ddc94c27a1 --- /dev/null +++ b/gas/testsuite/gas/ia64/group-2.s @@ -0,0 +1,6 @@ + .section .gnu.linkonce.t.foo,"axG",@progbits,foo,comdat + .proc foo# +foo: + .prologue 12, 33 + ;; + .endp foo# diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp index cf384a4023e..f6e95302d34 100644 --- a/gas/testsuite/gas/ia64/ia64.exp +++ b/gas/testsuite/gas/ia64/ia64.exp @@ -71,6 +71,7 @@ if [istarget "ia64-*"] then { run_dump_test "alias" run_dump_test "xdata" run_dump_test "group-1" + run_dump_test "group-2" } run_dump_test "bundling"