Add a testcase for PR ld/17615
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 19 Jan 2015 17:23:29 +0000 (09:23 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 19 Jan 2015 17:23:29 +0000 (09:23 -0800)
PR ld/17615
* ld-elf/pr17615.d: New file.
* ld-elf/pr17615.s: Likewise.

bfd/ChangeLog
ld/ChangeLog
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/pr17615.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr17615.s [new file with mode: 0644]

index ab45ad86811e441cabee13d1060ea5844ba176d0..06cfacb627f42ea0bb831a6134f94ec90dac4db3 100644 (file)
@@ -1,6 +1,6 @@
 2015-01-19  Alan Modra  <amodra@gmail.com>
 
-       PR 17165
+       PR ld/17615
        * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
        linker script assignments too.
        * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
index e9c3ed38076d6eec4982246e99b638d7fca73c6e..ae0b29aafa7a7b43a3a5eea5fa598484b6248977 100644 (file)
@@ -1,6 +1,6 @@
 2015-01-19  Alan Modra  <amodra@gmail.com>
 
-       PR 17165
+       PR ld/17615
        * ldlang.c (lang_process): Run lang_common before lang_gc_sections.
 
 2015-01-14  Jiong Wang  <jiong.wang@arm.com>
index d08ff1a0aa9117968634170e93fba5cfa077a3c5..10f109c2ddb2c4dc5e46e55e6c9d54805312784f 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/17615
+       * ld-elf/pr17615.d: New file.
+       * ld-elf/pr17615.s: Likewise.
+
 2015-01-19  Alan Modra  <amodra@gmail.com>
 
        * ld-gc/pr14265.d,
diff --git a/ld/testsuite/ld-elf/pr17615.d b/ld/testsuite/ld-elf/pr17615.d
new file mode 100644 (file)
index 0000000..a2a2f70
--- /dev/null
@@ -0,0 +1,12 @@
+#ld: --gc-sections -shared
+#readelf: -S --wide --dyn-syms
+#target: *-*-linux* *-*-gnu*
+#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+# generic linker targets don't support --gc-sections, nor do a bunch of others
+
+#...
+  \[[ 0-9]+\] \.bss[ \t]+NOBITS[ \t0-9a-f]+WA.*
+#...
+ +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9]+ foo
+#pass
diff --git a/ld/testsuite/ld-elf/pr17615.s b/ld/testsuite/ld-elf/pr17615.s
new file mode 100644 (file)
index 0000000..a177cf2
--- /dev/null
@@ -0,0 +1 @@
+       .comm   foo,4,4
This page took 0.029066 seconds and 4 git commands to generate.