From 5e319dd3e18e1318ab97a2dabb93095e2bd82ee3 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 11 Dec 2013 08:00:34 -0800 Subject: Add a test for --as-needed with symbol versioning * ld-elf/shared.exp (build_tests): Add libneeded2a.so, libneeded2b.so, libneeded2c.o and needed2. * ld-elf/needed2.ver: New file. * ld-elf/needed2a.c: Likewise. * ld-elf/needed2b.c: Likewise. * ld-elf/needed2c.c: Likewise. --- ld/testsuite/ld-elf/shared.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ld/testsuite/ld-elf/shared.exp') diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 56c724f..3162547 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -206,6 +206,18 @@ set build_tests { {"Build librel.so" "-shared" "-fPIC" {rel.c} {} "librel.so"} + {"Build libneeded2a.so" + "-shared" "-fPIC" + {needed2a.c} {} "libneeded2a.so"} + {"Build libneeded2b.so" + "-shared -Wl,--version-script,needed2.ver" "-fPIC" + {needed2b.c} {} "libneeded2b.so"} + {"Build libneeded2c.o" + "-r -nostdlib" "" + {needed2c.c} {} "libneeded2c.o"} + {"Build needed2" + "tmpdir/libneeded2c.o -Wl,--as-needed tmpdir/libneeded2a.so tmpdir/libneeded2b.so" "" + {dummy.c} {} "needed2"} } run_cc_link_tests $build_tests -- cgit v1.1