[llvm-dev] LLVM gold plugin do not add llvm instrinsics symbols to the linker symbol table
Bakhvalov, Denis via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 23 09:37:09 PDT 2018
Hello Teresa,
> Without -flto, a.o ends up with a reference to __exp_finite,
That’s correct.
> which also would not be satifisfied out of libexp.a.
That’s not correct. Even if libexp.a would have __exp_finite, it wouldn’t be resolved from libexp.a, because of the behavior described in my first message.
> Do you also have an implementation of __exp_finite in your libexp.a?
No, I don’t have __exp_finite in libexp.a. I presented complete code in my first message. You can reproduce it yourself on current trunk.
> Can you build with -fno-builtin, or -fno-builtin-exp etc?
> That results in a reference to __exp_finite in the .o bitcode
> (which of course has the same issue I mentioned above, but is consistent).
> That seems to be the option you should use here when you want to use your own implementations.
Yes, -fno-builtin results in call to __exp_finite in the bitcode. But the problem I try to address is not what version of exp libcall we want to generate: exp or __exp_finite.
The problem is that if the exp call was lowered to llvm intrinsic, linker doesn’t resolve it from my static library in LTO build, because plugin (LLVMgold.so) doesn’t report those symbols (yet in intrinsic form) to the linker.
Best regards,
Denis Bakhvalov.
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180323/cbe4d534/attachment.html>
More information about the llvm-dev
mailing list