[PATCH] D113443: [FreeBSD] avoid marking __stack_chk_guard symbol as dso_local on PPC64
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 14:14:15 PST 2022
arichardson added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringBase.cpp:1992
+ // XXX -- needs more investigation
+ // FreeBSD userland has "__stack_chk_guard" defined externally on libc.so,
+ // so not dso_local. Kernel modules are compiled in freestanding mode, it
----------------
arichardson wrote:
> Whether it's in libc.so or not should not matter, if `TM.getRelocationModel() == Reloc::Static` you are linking libc.a which means __stack_chk_guard is indeed dso_local. The ideal solution IMO would be to remove the FreeBSD special case completelty.
>
> That said, I'm fine with having a ppc64 workaround here seeing as it is needed to use LLVM for PPC64 FreeBSD. However, the comment should be updated to say this is a workaround for PPC64 stack protector codegen not being correct rather than mentioning libc.so which is not relevant.
Or are the broken PPC64 dynamic binaries are built with -fno-pic?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113443/new/
https://reviews.llvm.org/D113443
More information about the llvm-commits
mailing list