[lld] r250062 - ELF2: Verify that weak undefined symbols won't add DT_NEEDED.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 09:25:34 PDT 2015


Author: ruiu
Date: Mon Oct 12 11:25:33 2015
New Revision: 250062

URL: http://llvm.org/viewvc/llvm-project?rev=250062&view=rev
Log:
ELF2: Verify that weak undefined symbols won't add DT_NEEDED.

In order to actually verify the condition, we have to use a weak symbol.
If an undefined symbol is not used at all, it is naturally ignored not by
the code for --as-needed but by the code for something else.

Modified:
    lld/trunk/test/elf2/as-needed.s

Modified: lld/trunk/test/elf2/as-needed.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/as-needed.s?rev=250062&r1=250061&r2=250062&view=diff
==============================================================================
--- lld/trunk/test/elf2/as-needed.s (original)
+++ lld/trunk/test/elf2/as-needed.s Mon Oct 12 11:25:33 2015
@@ -41,3 +41,4 @@ _start:
 .long bar
 .long zed
 .weak baz
+  call baz




More information about the llvm-commits mailing list