<html><head></head><body>The problem is a bitcode implementation that has a stdcall function that's used from native code. 1 side has _elements_exception_handler, compiled that would be __elements_exception_handler@20 due to stdcall. The native bit has the mangled name and the linker can't find it as the bitcode indexes have it without mangling.<br>
<br>
I'll try to prepare a testcase when I get back in the office.<br><br><div class="gmail_quote">Rui Ueyama <ruiu@google.com> schreef op 30 maart 2018 19:17:06 CEST:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Mixing native and bitcode files should just work, and that happens all the time, as most programs need 

<span style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">at least</span> crt.o (which is a precompiled native object file containing startup code).<div><br></div><div>Could you elaborate the issue a bit? It might be a bug in lld.</div></div><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 30, 2018 at 3:11 AM Carlo Kok via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Mar 30, 2018, at 11:23, Carlo Kok via llvm-dev wrote:<br>
> When having a project that's partially bitcode and partially native code, should lld allow linking a native .o to a bitcode .o?<br>
><br>
> specifically in my case, I've got an stdcall function in bitcode, called by native code, but it can't find the symbol (bitcode has it<br>
> unmangled, native code with _ and @20)<br>
<br>
<br>
When having thinlto enabled in both ends the same thing happens (but bitcode on both ends works fine)<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div><br>
-- <br>
Verstuurd vanaf mijn Android apparaat met K-9 Mail. Excuseer mijn beknoptheid.</body></html>