<div dir="ltr"><div><div><div>So, while this is not necessary for the original test case, it would still be needed for the slightly expanded version in lld:<br><br>With<br><br>target triple = "x86_64-unknown-linux-gnu"<br>module asm ".weak patatino"<br>module asm ".equ patatino, foo"<br>declare void @patatino()<br>define void @foo() { ret void }<br>define void @_start() {<br> call void @patatino()<br> ret void<br>}<br><br>we end up with the following symbols<br>                 <br>U patatino
<br>T foo<br>T _start<br>W patatino<br>U foo
<br><br></div>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.<br><br></div><div>But I wouldn't be opposed to keeping the existing check in LTO.cpp with a comment and test on why we need it.<br></div><div><br></div>Cheers,<br></div>Rafael<br><br></div>