[PATCH] D44414: Error instead of producing broken binary
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 09:37:28 PDT 2018
rafael added a comment.
George Rimar via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:
> grimar added inline comments.
>
> ================
> Comment at: ELF/Arch/X86.cpp:68
> + // compiled without -fPIE/-fPIC and doesn't maintain ebx.
> + // * If a libray definition gets preempted to the executable, it will have the
> + // wrong ebx value.
>
> ----------------
>
> a libra**r**y
Thanks.
> ================
> Comment at: ELF/Arch/X86.cpp:70
> + // wrong ebx value.
> + if (Config->Pic)
> + SupportsPltPreemption = false;
>
> ----------------
>
> Comment saying "for PIE", but `Config->Pic` also covers DSO, we have `Config->Pie` for PIE. Is this `if` correct?
> We will report "cannot be used against symbol" for -shared case, so I think it can be `if (Config->Pie)`.
They would be equivalent as the canonical plt hack never works for
shared libraries, but using Pie is definitely better.
I will upload a new version.
Thanks,
Rafael
https://reviews.llvm.org/D44414
More information about the llvm-commits
mailing list