]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas/
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 7 May 2005 22:19:37 +0000 (22:19 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 7 May 2005 22:19:37 +0000 (22:19 +0000)
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/ChangeLog
gas/config/tc-ia64.c
gas/testsuite/ChangeLog
gas/testsuite/gas/ia64/group-2.d [new file with mode: 0644]
gas/testsuite/gas/ia64/group-2.s [new file with mode: 0644]
gas/testsuite/gas/ia64/ia64.exp

index 0317c4d74b74ea5871ac46692c20793bf6668400..d79fc664b55b58d20bb44fdc7a62392bbf3a0ee8 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2005-05-06  Bob Wilson  <bob.wilson@acm.org>
 
        * doc/c-xtensa.texi (Literal Directive): Spelling correction.
index 729ce27262d464c8ef913be9b36d66531e80261e..43b79e5fa8b6046a02262eb9eac041c5af84b5b0 100644 (file)
@@ -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;
index bcd4da6771dd06f54ec608da805ccf6b8cea9e77..96eb8705f30a4e47f9dfa25eb03fac310056846c 100644 (file)
@@ -1,3 +1,11 @@
+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".
+
 2005-05-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR 843
diff --git a/gas/testsuite/gas/ia64/group-2.d b/gas/testsuite/gas/ia64/group-2.d
new file mode 100644 (file)
index 0000000..37ef925
--- /dev/null
@@ -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 (file)
index 0000000..6ddc94c
--- /dev/null
@@ -0,0 +1,6 @@
+       .section        .gnu.linkonce.t.foo,"axG",@progbits,foo,comdat
+       .proc foo#
+foo:
+       .prologue 12, 33
+       ;;
+       .endp foo#
index cf384a4023e282f16b3bce633b9c465627de4689..f6e95302d34284cdb7d4877ab64166dfee481a52 100644 (file)
@@ -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"