[PATCH] D102453: [CMake][ELF] Add -fno-semantic-interposition for GCC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 15 13:57:55 PDT 2021
MaskRay added a comment.
In D102453#2761299 <https://reviews.llvm.org/D102453#2761299>, @foutrelis wrote:
> In D102453#2761170 <https://reviews.llvm.org/D102453#2761170>, @MaskRay wrote:
>
>> For global variables, I have a feature request https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100483
>
> If that's implemented in GCC then this change here to build with -fno-semantic-interposition would mean that the test failures seen in D102090 <https://reviews.llvm.org/D102090> would resurface. Perhaps it's not worth the risk compared to waiting for something like -fno-semantic-interposition-function (or -fno-semantic-function-interposition or -fno-semantic-interposition=function).
I am waiting for GCC folks' response https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100618 and hold off this patch.
> As for LD_PRELOAD, it's used by fakeroot during package creation in Arch Linux, and possibly elsewhere too. Like you said, there's likely a significant amount of work required to enable -fno-semantic-interposition by default. Switching to PIE by default was pretty uneventful as far as I recall (aside from having to patch clang to get PIE by default).
fakeroot works without issue.
-fno-semantic-interposition applies to definitions seen in the translation unit.
-Bsymbolic applies to definitions seen in the linkage unit.
libc functions are defined in libc.so.6, so interposition always work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102453/new/
https://reviews.llvm.org/D102453
More information about the llvm-commits
mailing list