[llvm-dev] -fpic ELF default: reclaim some -fno-semantic-interposition optimization opportunities?
Fangrui Song via llvm-dev
llvm-dev at lists.llvm.org
Fri May 7 15:24:25 PDT 2021
I have a write-up about -fno-semantic-interposition in GCC and Clang.
<https://gist.github.com/MaskRay/2d4dfcfc897341163f734afb59f689c6>
The preemptible by default property is perhaps one of default ELF properties which I favor the least.
(not an issue of ELF, but more of a toolchain default).
Clang is in a somewhat better situation than GCC because our default longstanding -fpic behavior
diverges a lot from -fsemantic-interposition and is closer to -fno-semantic-interposition.
Especially on non-x86, the function semantic interposition likely never works in
-fno-function-sections mode.
Sending this message to get some thoughts on relaiming some -fno-semantic-interposition optimization
opportunities for ELF -fpic default, at least for non-x86. We could start from a
clang/CMakeLists.txt cmake variable.
dogfood: https://lists.llvm.org/pipermail/llvm-dev/2021-May/150465.html build llvm-project itself with -fno-semantic-interposition
More information about the llvm-dev
mailing list