aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/stackguard-macros.h
blob: 1948800cd0086e292d57aff064a0a4da7c0c945d (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdint.h>

#define STACK_CHK_GUARD \
  ({ uintptr_t x;						\
     asm ("mov %%fs:%c1, %0" : "=r" (x)				\
	  : "i" (offsetof (tcbhead_t, stack_guard))); x; })

#define POINTER_CHK_GUARD \
  ({ uintptr_t x;						\
     asm ("mov %%fs:%c1, %0" : "=r" (x)				\
	  : "i" (offsetof (tcbhead_t, pointer_guard))); x; })