summary refs log tree commit diff
path: root/mach
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-08-27 22:10:17 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-08-27 22:10:17 +0200
commit97e02ad23392f929862d6a04643e7f2fd91baebc (patch)
treee751c7bcccbfdc40839a54ff97b405f01d070674 /mach
parent2ef8d46913b10cb1cf8adddfe80ce8d1b57d4f46 (diff)
downloadglibc-97e02ad23392f929862d6a04643e7f2fd91baebc.tar.gz
glibc-97e02ad23392f929862d6a04643e7f2fd91baebc.tar.xz
glibc-97e02ad23392f929862d6a04643e7f2fd91baebc.zip
hurd: fix build with -fstack-protector-strong
libmachuser and libhurduser also need stack_chk_fail_local and they do not
link against libc_nonshared.

       * mach/stack_chk_fail_local.c: New file.
       * hurd/stack_chk_fail_local.c: New file.
       * mach/Machrules ($(interface-library)-routines): Add
       stack_chk_fail_local.
       * mach/Versions (GLIBC_2.4): Add __stack_chk_fail.
       * hurd/Versions (GLIBC_2.4): Add __stack_chk_fail.
Diffstat (limited to 'mach')
-rw-r--r--mach/Machrules2
-rw-r--r--mach/Versions4
-rw-r--r--mach/stack_chk_fail_local.c1
3 files changed, 6 insertions, 1 deletions
diff --git a/mach/Machrules b/mach/Machrules
index 36adfc7681..29114b1eef 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -221,7 +221,7 @@ endif
 
 ifdef interface-library
 
-$(interface-library)-routines = $(interface-routines)
+$(interface-library)-routines = $(interface-routines) stack_chk_fail_local
 extra-libs += $(interface-library)
 extra-libs-others += $(interface-library)
 
diff --git a/mach/Versions b/mach/Versions
index 0097aad59b..b22fda4cf4 100644
--- a/mach/Versions
+++ b/mach/Versions
@@ -54,6 +54,10 @@ libc {
     # This was always there, but not exported as it should have been.
     mig_strncpy;
   }
+  GLIBC_2.4 {
+    # functions used by RPC stubs
+    __stack_chk_fail
+  }
   GLIBC_2.23 {
     __mach_host_self_;
   }
diff --git a/mach/stack_chk_fail_local.c b/mach/stack_chk_fail_local.c
new file mode 100644
index 0000000000..305871fbc0
--- /dev/null
+++ b/mach/stack_chk_fail_local.c
@@ -0,0 +1 @@
+#include <debug/stack_chk_fail_local.c>