[PATCH] D109090: [PPC64] fix/workaround runtime crash on FreeBSD with llvm12 and later
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 07:15:14 PDT 2021
sfertile added a comment.
In D109090#3018978 <https://reviews.llvm.org/D109090#3018978>, @nemanjai wrote:
> @adalava the symbol `__stack_chk_guard` resides in `libc.so` on FreeBSD (i.e. a different DSO from the compiled program).
If that is the case then isn't DSO local. Was the idea behind `Make __stack_chk_guard dso_local if Reloc::Static` that the linker would emit a copy-relocation in the case we don't statically link against libc?
================
Comment at: llvm/lib/CodeGen/TargetLoweringBase.cpp:1988
+ !TM.getTargetTriple().isWindowsGNUEnvironment() &&
+ !(TM.getTargetTriple().isPPC64() && TM.getTargetTriple().isOSFreeBSD()))
GV->setDSOLocal(true);
----------------
Obviously fix the formatting, but otherwise this looks like the right fix to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109090/new/
https://reviews.llvm.org/D109090
More information about the llvm-commits
mailing list