]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: fix build with -fstack-protector-strong
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 27 Aug 2017 20:10:17 +0000 (22:10 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 27 Aug 2017 20:10:17 +0000 (22:10 +0200)
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.

ChangeLog
hurd/Versions
hurd/stack_chk_fail_local.c [new file with mode: 0644]
mach/Machrules
mach/Versions
mach/stack_chk_fail_local.c [new file with mode: 0644]

index 1b0f15573a744746089a8431a71043911cfdc386..4d94fee93bc28cff8ed807e48d6efb3bf05f7421 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 2017-08-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        * sysdeps/mach/hurd/bits/sysmacros.h: New file.
+       * 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.
 
 2017-08-25  H.J. Lu  <hongjiu.lu@intel.com>
 
index 77f5b4271e08a527e405f68421b51e7975ac1a40..011edc73845819384bc0ce9439bc0c93d5ec5ff7 100644 (file)
@@ -129,6 +129,10 @@ libc {
     # functions used in macros & inline functions
     __errno_location;
   }
+  GLIBC_2.4 {
+    # functions used by RPC stubs
+    __stack_chk_fail
+  }
 
   HURD_CTHREADS_0.3 {
     # weak refs to libthreads functions that libc calls iff libthreads in use
diff --git a/hurd/stack_chk_fail_local.c b/hurd/stack_chk_fail_local.c
new file mode 100644 (file)
index 0000000..305871f
--- /dev/null
@@ -0,0 +1 @@
+#include <debug/stack_chk_fail_local.c>
index 36adfc768126feeb92705925a4b47112fd88c0c7..29114b1eefe2b51c0d7a314ee50e857b8123e6e4 100644 (file)
@@ -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)
 
index 0097aad59bb7ba67fc58b638654a381cc957b50d..b22fda4cf44b615a14eaace57ac7abeb3d45ad14 100644 (file)
@@ -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 (file)
index 0000000..305871f
--- /dev/null
@@ -0,0 +1 @@
+#include <debug/stack_chk_fail_local.c>