aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-10 04:15:53 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-10 04:15:53 -0700
commit11e6e4c72cce2961f80e282cc4d859e7c266e17d (patch)
treef7eaf89734047c0c2aff72a8de480c1f1305f8b8 /ld
parent030aeb759908d7bcf1b87f3599bfa482a90ab6c1 (diff)
downloadgdb-11e6e4c72cce2961f80e282cc4d859e7c266e17d.zip
gdb-11e6e4c72cce2961f80e282cc4d859e7c266e17d.tar.gz
gdb-11e6e4c72cce2961f80e282cc4d859e7c266e17d.tar.bz2
Add a testcase for PR ld/18223
PR ld/18223 * ld-gc/gc.exp: Run pr18223. * ld-gc/pr18223.d: New file. * ld-gc/pr18223.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-gc/gc.exp1
-rw-r--r--ld/testsuite/ld-gc/pr18223.d7
-rw-r--r--ld/testsuite/ld-gc/pr18223.s6
4 files changed, 21 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 8811a86..79bcb6e 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/18223
+ * ld-gc/gc.exp: Run pr18223.
+ * ld-gc/pr18223.d: New file.
+ * ld-gc/pr18223.s: Likewise.
+
2015-04-10 Alan Modra <amodra@gmail.com>
Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 58f3a2a..b2a3450 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -116,6 +116,7 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
} else {
run_dump_test "personality"
}
+ run_dump_test "pr18223"
}
if { [is_remote host] || [which $CC] != 0 } {
diff --git a/ld/testsuite/ld-gc/pr18223.d b/ld/testsuite/ld-gc/pr18223.d
new file mode 100644
index 0000000..9fd1912
--- /dev/null
+++ b/ld/testsuite/ld-gc/pr18223.d
@@ -0,0 +1,7 @@
+#name: --gc-sections with .text._init
+#ld: --gc-sections -shared
+#nm: -n
+
+#...
+[0-9a-f]+ t +_init
+#...
diff --git a/ld/testsuite/ld-gc/pr18223.s b/ld/testsuite/ld-gc/pr18223.s
new file mode 100644
index 0000000..69af490
--- /dev/null
+++ b/ld/testsuite/ld-gc/pr18223.s
@@ -0,0 +1,6 @@
+ .section .text._init,"ax",%progbits
+ .globl _init
+ .hidden _init
+ .type _init, %function
+_init:
+ .byte 0