[llvm-dev] LLVM gold plugin do not add llvm instrinsics symbols to the linker symbol table
Duncan P. N. Exon Smith via llvm-dev
llvm-dev at lists.llvm.org
Mon Mar 26 16:17:47 PDT 2018
> On Mar 26, 2018, at 00:41, Bakhvalov, Denis via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> > <>I'm trying to understand how the non-LTO case is supposed to work
> non-LTO case works because when linker starts it’s job all the llvm intrinsics are already lowered.
Yup, this has been a long-time problem for LTO. The right answer is for LTO to determine a fairly tight superset of the symbols that will be used after lowering, and request them from the linker (i.e., add them to the reported symbol table as undefined). This isn't particularly easy to do and there are workarounds, so no one has prioritized it.
>
> > Right, which is why I am suggesting that it might be appropriate to build with -fno-builtin (or -fno-builtin-exp) here –
> > this solves the LTO issue as there will no longer be an llvm intrinsic in the bitcode
> Yes, I just tested it and -fno-builtin helps in this case. I added definition of __exp_finite to libexp.a and now it was resolved from libexp.a (because no llvm intrinsics).
>
> Best regards,
> Denis Bakhvalov.
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> ul. Słowackiego 173 | 80-298 Gdańsk | Sąd Rejonowy Gdańsk Północ | VII Wydział Gospodarczy Krajowego Rejestru Sądowego - KRS 101882 | NIP 957-07-52-316 | Kapitał zakładowy 200.000 PLN.
>
> Ta wiadomość wraz z załącznikami jest przeznaczona dla określonego adresata i może zawierać informacje poufne. W razie przypadkowego otrzymania tej wiadomości, prosimy o powiadomienie nadawcy oraz trwałe jej usunięcie; jakiekolwiek przeglądanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180326/2e69be48/attachment.html>
More information about the llvm-dev
mailing list