Add a testcase for PR ld/17615

PR ld/17615
	* ld-elf/pr17615.d: New file.
	* ld-elf/pr17615.s: Likewise.
This commit is contained in:
H.J. Lu 2015-01-19 09:23:29 -08:00
parent 63413d8587
commit 3e2aa5bbd3
5 changed files with 21 additions and 2 deletions

View 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.

View 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>

View 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,

View File

@ -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

View File

@ -0,0 +1 @@
.comm foo,4,4