From 3e2aa5bbd36be9cf63530e5db2f6cf3898762a22 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 19 Jan 2015 09:23:29 -0800 Subject: [PATCH] Add a testcase for PR ld/17615 PR ld/17615 * ld-elf/pr17615.d: New file. * ld-elf/pr17615.s: Likewise. --- bfd/ChangeLog | 2 +- ld/ChangeLog | 2 +- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-elf/pr17615.d | 12 ++++++++++++ ld/testsuite/ld-elf/pr17615.s | 1 + 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ld/testsuite/ld-elf/pr17615.d create mode 100644 ld/testsuite/ld-elf/pr17615.s diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ab45ad86811..06cfacb627f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,6 +1,6 @@ 2015-01-19 Alan Modra - 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. diff --git a/ld/ChangeLog b/ld/ChangeLog index e9c3ed38076..ae0b29aafa7 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,6 +1,6 @@ 2015-01-19 Alan Modra - PR 17165 + PR ld/17615 * ldlang.c (lang_process): Run lang_common before lang_gc_sections. 2015-01-14 Jiong Wang diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index d08ff1a0aa9..10f109c2ddb 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-01-19 H.J. Lu + + PR ld/17615 + * ld-elf/pr17615.d: New file. + * ld-elf/pr17615.s: Likewise. + 2015-01-19 Alan Modra * ld-gc/pr14265.d, diff --git a/ld/testsuite/ld-elf/pr17615.d b/ld/testsuite/ld-elf/pr17615.d new file mode 100644 index 00000000000..a2a2f7001be --- /dev/null +++ b/ld/testsuite/ld-elf/pr17615.d @@ -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 index 00000000000..a177cf29209 --- /dev/null +++ b/ld/testsuite/ld-elf/pr17615.s @@ -0,0 +1 @@ + .comm foo,4,4 -- 2.30.2