[llvm-dev] [PPC] Linker fails on -fstack-protector

Kyle Butt via llvm-dev
Thu, 28 Jan 2016 01:11:50 -0000

On Mon, Jan 25, 2016 at 11:57 AM, Tim Shen via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> When -fstack-protector is turned on, linker fails to find the symbol
"__stack_chk_guard"
> because at least for powerpc64le, glibc doesn't provide this symbol.
> Instead, they put the stack guard into TCB.
>
> x86 fixed this issue by injecting a special address space (which is later
> translated to TCB register access) and hard code the offset of stack_guard,
> but I don't see a easy way to handle address spaces in ppc.
>
> A cleaner solution could be adding an IR intrinsic llvm.get_tcb_address()
> and hard code the offset of stack_guard member, since they aren't
supposed
> to change.
>
>
Can you try to implement the intrinsic for x86 as a proof of concept?


> Details are in the bug: https://llvm.org/bugs/show_bug.cgi?id=26226
>
> Any ideas?
>
> Thanks!
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20160127/231f8b62/attachment.html>