[llvm-bugs] [Bug 26226] New: -fstack-protector fails to link on powerpc64le linux

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 20 17:01:38 PST 2016


            Bug ID: 26226
           Summary: -fstack-protector fails to link on powerpc64le linux
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: timshen91 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

  // clang++ -target powerpc64le-unknown-linux-gnu -fstack-protector a.cc
  int main() {
    char arr[2048];
    arr[2048+15] = 0;

    return 0;

Linker complains undefined reference to `__stack_chk_guard'.

In fact, glibc stores stack_guard not as a global/TLS variable, but a data
member in TCB:

x86 suffered from the same issue, and then was fixed by:

The fix specifies an address space (which finally turns into fs/gs access) and
hard code the offset to indicate the location of the stack guard.

How do we fix this? Do we use the same address space trick?


You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160121/b5225793/attachment.html>

More information about the llvm-bugs mailing list