From 54e8959c602eddaf8e7c895445610b6f40c92f56 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 29 Sep 2011 00:13:14 +0000 Subject: Fix --gc-sections failure with symbol versioning. bfd/ 2011-09-28 H.J. Lu PR ld/13195 * elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when clearing def_dynamic. (elf_link_add_object_symbols): Likewise. Set dynamic_def when setting def_dynamic. (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is versioned. ld/testsuite/ 2011-09-28 H.J. Lu PR ld/13195 * ld-elf/elf.exp: Add a C link testcase for PR ld/13195. * ld-elf/pr13195.c: New. * ld-elf/pr13195.d: Likewise. * ld-elf/pr13195.s: Likewise. * ld-elf/pr13195.t: Likewise. --- ld/testsuite/ld-elf/pr13195.s | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ld/testsuite/ld-elf/pr13195.s (limited to 'ld/testsuite/ld-elf/pr13195.s') diff --git a/ld/testsuite/ld-elf/pr13195.s b/ld/testsuite/ld-elf/pr13195.s new file mode 100644 index 0000000..409b5af --- /dev/null +++ b/ld/testsuite/ld-elf/pr13195.s @@ -0,0 +1,6 @@ + .section .text.new_foo,"ax",%progbits + .globl new_foo + .type new_foo, %function +new_foo: + .byte 0 + .symver new_foo,foo@@VERS_2.0 -- cgit v1.1