about summary refs log tree commit diff
path: root/sysdeps/i386/stackguard-macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/stackguard-macros.h')
-rw-r--r--sysdeps/i386/stackguard-macros.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/i386/stackguard-macros.h b/sysdeps/i386/stackguard-macros.h
new file mode 100644
index 0000000000..8c31e197e1
--- /dev/null
+++ b/sysdeps/i386/stackguard-macros.h
@@ -0,0 +1,4 @@
+#include <stdint.h>
+
+#define STACK_CHK_GUARD \
+  ({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })