summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2009-01-14 21:52:49 +0000
committerH.J. Lu <hjl@lucon.org>2009-01-14 21:52:49 +0000
commitc3e6d7affae3bdf887cab30b8d798f88d5bc2827 (patch)
treec416ef7830a3b6dfc4c875bb70096f81fbe4b07f /ld
parentc97fbc9fea495f37ca79e1d57de8299da8d56246 (diff)
downloadbinutils-redhat-c3e6d7affae3bdf887cab30b8d798f88d5bc2827.tar.gz
bfd/
2009-01-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/9727 * elflink.c (elf_gc_sweep): Exclude the group section if the first member of the section group is excluded. ld/testsuite/ 2009-01-14 H.J. Lu <hongjiu.lu@intel.com> PR ld/9727 * ld-elf/group8.s: New. * ld-elf/group8a.d: Likewise. * ld-elf/group8b.d: Likewise. * ld-elf/group9.s: Likewise. * ld-elf/group9a.d: Likewise. * ld-elf/group9b.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog10
-rw-r--r--ld/testsuite/ld-elf/group8.s10
-rw-r--r--ld/testsuite/ld-elf/group8a.d8
-rw-r--r--ld/testsuite/ld-elf/group8b.d8
-rw-r--r--ld/testsuite/ld-elf/group9.s15
-rw-r--r--ld/testsuite/ld-elf/group9a.d9
-rw-r--r--ld/testsuite/ld-elf/group9b.d13
7 files changed, 73 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index ae1513dc18..fe0d80239a 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/9727
+ * ld-elf/group8.s: New.
+ * ld-elf/group8a.d: Likewise.
+ * ld-elf/group8b.d: Likewise.
+ * ld-elf/group9.s: Likewise.
+ * ld-elf/group9a.d: Likewise.
+ * ld-elf/group9b.d: Likewise.
+
2009-01-13 Alan Modra <amodra@bigpond.net.au>
* ld-spu/icache1.s: New file.
diff --git a/ld/testsuite/ld-elf/group8.s b/ld/testsuite/ld-elf/group8.s
new file mode 100644
index 0000000000..7766c6cc9c
--- /dev/null
+++ b/ld/testsuite/ld-elf/group8.s
@@ -0,0 +1,10 @@
+ .section .text.foo,"axG",%progbits,foo,comdat
+ .globl foo
+ .type foo,%function
+foo:
+ .byte 0
+ .section .text.bar,"axG",%progbits,bar,comdat
+ .globl bar
+ .type bar,%function
+bar:
+ .byte 0
diff --git a/ld/testsuite/ld-elf/group8a.d b/ld/testsuite/ld-elf/group8a.d
new file mode 100644
index 0000000000..1efd6f3010
--- /dev/null
+++ b/ld/testsuite/ld-elf/group8a.d
@@ -0,0 +1,8 @@
+#source: group8.s
+#ld: -r --gc-sections --entry foo
+#readelf: -g --wide
+#notarget: ia64-*-*
+
+COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 1 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] .text.foo
diff --git a/ld/testsuite/ld-elf/group8b.d b/ld/testsuite/ld-elf/group8b.d
new file mode 100644
index 0000000000..95ea439451
--- /dev/null
+++ b/ld/testsuite/ld-elf/group8b.d
@@ -0,0 +1,8 @@
+#source: group8.s
+#ld: -r --gc-sections --entry bar
+#readelf: -g --wide
+#notarget: ia64-*-*
+
+COMDAT group section \[[ 0-9]+\] `.group' \[bar\] contains 1 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] .text.bar
diff --git a/ld/testsuite/ld-elf/group9.s b/ld/testsuite/ld-elf/group9.s
new file mode 100644
index 0000000000..1e6bcffd71
--- /dev/null
+++ b/ld/testsuite/ld-elf/group9.s
@@ -0,0 +1,15 @@
+ .section .text.foo,"axG",%progbits,foo,comdat
+ .globl foo
+ .type foo,%function
+foo:
+ .byte 0
+ .section .data.foo,"axG",%progbits,foo,comdat
+ .globl foo.data
+ .type foo,%object
+foo.data:
+ .byte 0
+ .section .text.bar,"axG",%progbits,bar,comdat
+ .globl bar
+ .type bar,%function
+bar:
+ .byte foo.data
diff --git a/ld/testsuite/ld-elf/group9a.d b/ld/testsuite/ld-elf/group9a.d
new file mode 100644
index 0000000000..7f85100140
--- /dev/null
+++ b/ld/testsuite/ld-elf/group9a.d
@@ -0,0 +1,9 @@
+#source: group9.s
+#ld: -r --gc-sections --entry foo
+#readelf: -g --wide
+#notarget: ia64-*-*
+
+COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] .text.foo
+ \[[ 0-9]+\] .data.foo
diff --git a/ld/testsuite/ld-elf/group9b.d b/ld/testsuite/ld-elf/group9b.d
new file mode 100644
index 0000000000..82ca062345
--- /dev/null
+++ b/ld/testsuite/ld-elf/group9b.d
@@ -0,0 +1,13 @@
+#source: group9.s
+#ld: -r --gc-sections --entry bar
+#readelf: -g --wide
+#notarget: ia64-*-*
+
+COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] .text.foo
+ \[[ 0-9]+\] .data.foo
+
+COMDAT group section \[[ 0-9]+\] `.group' \[bar\] contains 1 sections:
+ \[Index\] Name
+ \[[ 0-9]+\] .text.bar