diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-01-26 13:21:36 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-01-26 13:21:36 +0000 |
commit | 98da7939e10a50f3efdac438c8f1af77bb602688 (patch) | |
tree | 22eb9f886c5470893af2e9ef30cdb1cf4bd1f07c /ld/testsuite/ld-gc/gc.exp | |
parent | 571f7b5e511481d23a7bfd05aef16b7213b8691c (diff) | |
download | gdb-98da7939e10a50f3efdac438c8f1af77bb602688.zip gdb-98da7939e10a50f3efdac438c8f1af77bb602688.tar.gz gdb-98da7939e10a50f3efdac438c8f1af77bb602688.tar.bz2 |
Properly check undefined symbols when gc_sections is active.
bfd/
2010-01-26 Alan Modra <amodra@gmail.com>
H.J. Lu <hongjiu.lu@intel.com>
PR ld/11218
* elflink.c (elf_link_output_extsym): Do not ignore undefined
symbols with ref_regular set when gc_sections is active.
ld/testsuite/
2010-01-26 H.J. Lu <hongjiu.lu@intel.com>
PR ld/11218
* ld-gc/dummy.s: New.
* ld-gc/pr11218-1.c: Likewise.
* ld-gc/pr11218-2.c: Likewise.
* ld-gc/pr11218.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-gc/gc.exp')
-rw-r--r-- | ld/testsuite/ld-gc/gc.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp index c271a3d..7005442 100644 --- a/ld/testsuite/ld-gc/gc.exp +++ b/ld/testsuite/ld-gc/gc.exp @@ -92,3 +92,11 @@ test_gc "Check --gc-section/-r/-u" "gcrel" $ld "-r --gc-sections -u used_func" run_dump_test "noent" run_dump_test "abi-note" run_dump_test "start" +if { [is_remote host] || [which $CC] != 0 } { + if { [istarget "*-*-linux*"] } { + ld_compile "$CC -fPIC $CFLAGS $cflags" $srcdir/$subdir/pr11218-1.c tmpdir/pr11218-1.o + ld_simple_link $ld tmpdir/pr11218-1.so "-shared tmpdir/pr11218-1.o" + ld_compile "$CC -c $CFLAGS $cflags" $srcdir/$subdir/pr11218-2.c tmpdir/pr11218-2.o + run_dump_test "pr11218" + } +} |