summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-08-28 16:39:10 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-08-28 16:39:10 +0000
commitb585b1065b8f081279c5a2fb013a8a3aa6666899 (patch)
tree8441694c613f2959e722cca0b197e9474d20abb0 /libexec/ld.so
parentc3e7080efa7b1e6cfbafdb87860837b17e9218d9 (diff)
Add __guard_local as a hidden symbol to ld.so, kernel, and every
executable and DSO (via crtbegin.c/crtbeginS.c). Not used yet, but needed before GCC can start emitting -fstack-protector code that uses them instead of __guard.
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ld.so/util.c b/libexec/ld.so/util.c
index a96b054ec62..ed25696d3a8 100644
--- a/libexec/ld.so/util.c
+++ b/libexec/ld.so/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.23 2012/08/22 17:06:39 matthew Exp $ */
+/* $OpenBSD: util.c,v 1.24 2012/08/28 16:39:09 matthew Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -38,7 +38,8 @@
* Ideally, a scheme to compile these stubs from libc should be used, but
* this would end up dragging too much code from libc here.
*/
-long __guard[8] __attribute__((section(".openbsd.randomdata")));
+long __guard[8] __dso_public __attribute__((section(".openbsd.randomdata")));
+long __guard_local __dso_hidden __attribute__((section(".openbsd.randomdata")));
void __stack_smash_handler(char [], int);