[PATCH] D24595: [lib/LTO] Remove now unneded hack for undefined symbols

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 08:20:46 PDT 2016


So, while this is not necessary for the original test case, it would still
be needed for the slightly expanded version in lld:

With

target triple = "x86_64-unknown-linux-gnu"
module asm ".weak patatino"
module asm ".equ patatino, foo"
declare void @patatino()
define void @foo() { ret void }
define void @_start() {
 call void @patatino()
 ret void
}

we end up with the following symbols

U patatino
T foo
T _start
W patatino
U foo

Not the duplicated patatino and that the second now is now correctly a
defined symbol. I think the correct fix is to change IRObjectFile to report
only one, the one without an associated GV and then things should really
just work.

But I wouldn't be opposed to keeping the existing check in LTO.cpp with a
comment and test on why we need it.

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160915/e4e9e872/attachment.html>


More information about the llvm-commits mailing list