This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: PR 940: IA64 assembler fails to put unwind section into section group
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Sat, 7 May 2005 13:22:51 -0700
- Subject: PATCH: PR 940: IA64 assembler fails to put unwind section into section group
A64 assembler fails to put unwind section into section group generated
by gcc 4. I will check in this patch shortly.
H.J.
----
gas/
2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
PR 940
* config/tc-ia64.c (start_unwind_section): Properly check
comdat group with SHF_GROUP.
gas/testsuite/
2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
PR 940
* gas/ia64/group-2.d: New.
* gas/ia64/group-2.s: New.
* gas/ia64/ia64.exp: Add "group-2".
--- gas/config/tc-ia64.c.unwind 2005-05-07 06:50:15.000000000 -0700
+++ gas/config/tc-ia64.c 2005-05-07 13:15:19.000000000 -0700
@@ -3535,7 +3535,8 @@ start_unwind_section (const segT text_se
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;
--- gas/testsuite/gas/ia64/group-2.d.unwind 2005-05-07 12:50:33.000000000 -0700
+++ gas/testsuite/gas/ia64/group-2.d 2005-05-07 13:17:42.000000000 -0700
@@ -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
--- gas/testsuite/gas/ia64/group-2.s.unwind 2005-05-07 12:50:28.000000000 -0700
+++ gas/testsuite/gas/ia64/group-2.s 2005-05-07 13:05:23.000000000 -0700
@@ -0,0 +1,6 @@
+ .section .gnu.linkonce.t.foo,"axG",@progbits,foo,comdat
+ .proc foo#
+foo:
+ .prologue 12, 33
+ ;;
+ .endp foo#
--- gas/testsuite/gas/ia64/ia64.exp.unwind 2005-03-13 21:39:13.000000000 -0800
+++ gas/testsuite/gas/ia64/ia64.exp 2005-05-07 12:51:12.000000000 -0700
@@ -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"