[libc-commits] [libc] [libc] Simple __stack_chk_guard implementation (PR #78804)

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Mon Jan 22 09:08:02 PST 2024


================
@@ -19,6 +19,7 @@ set(TARGET_LIBC_ENTRYPOINTS
 
     # compiler entrypoints (no corresponding header)
     libc.src.compiler.__stack_chk_fail
+    libc.src.compiler.__stack_chk_guard
----------------
petrhosek wrote:

We already implement support for setting the TLS canary on x86-64 Linux here https://github.com/llvm/llvm-project/blob/ebd4dc42630e201c15894b48c3ea890eaa8c3b18/libc/startup/linux/x86_64/tls.cpp#L67-L76

The location of the stack canary is defined by psABI and if we want to change I think it'd be better to propose a change to psABI for the particular architecture.

https://github.com/llvm/llvm-project/pull/78804


More information about the libc-commits mailing list