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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/i386/stackguard-macros.h b/sysdeps/i386/stackguard-macros.h
index 8c31e197e1..039762927c 100644
--- a/sysdeps/i386/stackguard-macros.h
+++ b/sysdeps/i386/stackguard-macros.h
@@ -2,3 +2,11 @@
 
 #define STACK_CHK_GUARD \
   ({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
+
+#define POINTER_CHK_GUARD \
+  ({							\
+     uintptr_t x;					\
+     asm ("movl %%gs:%c1, %0" : "=r" (x)		\
+	  : "i" (offsetof (tcbhead_t, pointer_guard)));	\
+     x;							\
+   })