summaryrefslogtreecommitdiff
path: root/libc/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/i386')
-rw-r--r--libc/sysdeps/i386/ffs.c1
-rw-r--r--libc/sysdeps/i386/i686/ffs.c1
-rw-r--r--libc/sysdeps/i386/stackguard-macros.h8
3 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/i386/ffs.c b/libc/sysdeps/i386/ffs.c
index 47496dcf7..77d2e60b7 100644
--- a/libc/sysdeps/i386/ffs.c
+++ b/libc/sysdeps/i386/ffs.c
@@ -41,6 +41,7 @@ __ffs (x)
return cnt;
}
weak_alias (__ffs, ffs)
+libc_hidden_def (__ffs)
libc_hidden_builtin_def (ffs)
#undef ffsl
weak_alias (__ffs, ffsl)
diff --git a/libc/sysdeps/i386/i686/ffs.c b/libc/sysdeps/i386/i686/ffs.c
index 5c97050e8..cde1c9956 100644
--- a/libc/sysdeps/i386/i686/ffs.c
+++ b/libc/sysdeps/i386/i686/ffs.c
@@ -39,6 +39,7 @@ __ffs (x)
return cnt + 1;
}
weak_alias (__ffs, ffs)
+libc_hidden_def (__ffs)
libc_hidden_builtin_def (ffs)
#undef ffsl
weak_alias (__ffs, ffsl)
diff --git a/libc/sysdeps/i386/stackguard-macros.h b/libc/sysdeps/i386/stackguard-macros.h
index 8c31e197e..039762927 100644
--- a/libc/sysdeps/i386/stackguard-macros.h
+++ b/libc/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; \
+ })