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

Tim Shen via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 22 21:52:31 PST 2016


On Mon, Feb 22, 2016 at 9:18 PM Kit Barton <kbarton at ca.ibm.com> wrote:

> Hi Tim,
> I'm a little confused about what you're trying to accomplish here.
> Are you trying to find a way to access the stack_guard in the TCB provided
> by glibc?
>

Yes.


> If not, can we not just come up with our own definition of
> __stack_chk_guard and discuss the best way to implement that (perhaps not
> by putting it in the TCB)?
>
> I'm not familiar with the GCC implementation, but I can talk to the GCC
> folks tomorrow to get some more details. I know that XL implemented this
> differently, but some specific details are a bit fuzzy. I'll refresh my
> memory on that tomorrow as well.
>

Based on my understanding, GCC simply hardcoded the register number and
offset:
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/rs6000/linux64.h#L610,
and I intend to do similar things here, except we may not need/want to
hardcode register number.

It'll be great if you and GCC folks can help. Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160223/2ae8858b/attachment.html>


More information about the llvm-dev mailing list