Add a testcase for PR ld/18223
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 10 Apr 2015 11:15:53 +0000 (04:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 10 Apr 2015 11:15:53 +0000 (04:15 -0700)
PR ld/18223
* ld-gc/gc.exp: Run pr18223.
* ld-gc/pr18223.d: New file.
* ld-gc/pr18223.s: Likewise.

ld/testsuite/ChangeLog
ld/testsuite/ld-gc/gc.exp
ld/testsuite/ld-gc/pr18223.d [new file with mode: 0644]
ld/testsuite/ld-gc/pr18223.s [new file with mode: 0644]

index 8811a864b0b462a62e1b6898c9647d8ca86edf6d..79bcb6e60f90b23b9db4f741d3190d6b94db719f 100644 (file)
@@ -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>
index 58f3a2ae07e0051a3ae48d564eb2b62399bea727..b2a345084672ea3ef96387807a759d743ee9c8e9 100644 (file)
@@ -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 (file)
index 0000000..9fd1912
--- /dev/null
@@ -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 (file)
index 0000000..69af490
--- /dev/null
@@ -0,0 +1,6 @@
+       .section        .text._init,"ax",%progbits
+       .globl  _init
+       .hidden _init
+       .type   _init, %function
+_init:
+       .byte 0
This page took 0.026828 seconds and 4 git commands to generate.