]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix hurd build with hidden support
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 25 Nov 2015 01:35:18 +0000 (02:35 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 25 Nov 2015 01:35:18 +0000 (02:35 +0100)
* hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Destroy reply port
of interrupted RPC instead of restoring it.

* sysdeps/i386/setjmp.S (__sigsetjmp): Add hidden_def.
* sysdeps/mach/hurd/accept4.c (__libc_accept4): Remove
libc_hidden_def.
* sysdeps/mach/hurd/dl-sysdep.c (__libc_stack_end): Add relro
attribute, define rtld_hidden_data_def.
* sysdeps/mach/hurd/fxstatat64.c (__fxstatat64): Add libc_hidden_def.
* sysdeps/mach/hurd/if_index.c (__if_freenameindex): Add
libc_hidden_def.
(if_freenameindex): Add libc_hidden_weak.
(if_nameindex): Add libc_hidden_weak.
* sysdeps/mach/hurd/open.c (_open64): Rename libc_hidden_weak into
__open64.
* sysdeps/mach/hurd/sigwait.c (__sigwait): Add libc_hidden_def.
* sysdeps/mach/hurd/xmknodat.c (__xmknodat): Add libc_hidden_def.
* sysdeps/mach/nanosleep.c: Include <time.h>
(__nanosleep): Rename to __libc_nanosleep.
(__nanosleep): Add weak_alias.
(nanosleep): Update alias.
* sysdeps/mach/hurd/configure.ac (NO_HIDDEN): Do not define.
* sysdeps/mach/hurd/configure: Regenerate.

12 files changed:
ChangeLog
sysdeps/i386/setjmp.S
sysdeps/mach/hurd/accept4.c
sysdeps/mach/hurd/configure
sysdeps/mach/hurd/configure.ac
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/fxstatat64.c
sysdeps/mach/hurd/if_index.c
sysdeps/mach/hurd/open.c
sysdeps/mach/hurd/sigwait.c
sysdeps/mach/hurd/xmknodat.c
sysdeps/mach/nanosleep.c

index 33ea5ab374bd20b4ddfc127920abcb17d0df6aef..8a7e96b3bed8660a83ae75d9308c3413bdb1171d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,27 @@
        * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Destroy reply port
        of interrupted RPC instead of restoring it.
 
+       * sysdeps/i386/setjmp.S (__sigsetjmp): Add hidden_def.
+       * sysdeps/mach/hurd/accept4.c (__libc_accept4): Remove
+       libc_hidden_def.
+       * sysdeps/mach/hurd/dl-sysdep.c (__libc_stack_end): Add relro
+       attribute, define rtld_hidden_data_def.
+       * sysdeps/mach/hurd/fxstatat64.c (__fxstatat64): Add libc_hidden_def.
+       * sysdeps/mach/hurd/if_index.c (__if_freenameindex): Add
+       libc_hidden_def.
+       (if_freenameindex): Add libc_hidden_weak.
+       (if_nameindex): Add libc_hidden_weak.
+       * sysdeps/mach/hurd/open.c (_open64): Rename libc_hidden_weak into
+       __open64.
+       * sysdeps/mach/hurd/sigwait.c (__sigwait): Add libc_hidden_def.
+       * sysdeps/mach/hurd/xmknodat.c (__xmknodat): Add libc_hidden_def.
+       * sysdeps/mach/nanosleep.c: Include <time.h>
+       (__nanosleep): Rename to __libc_nanosleep.
+       (__nanosleep): Add weak_alias.
+       (nanosleep): Update alias.
+       * sysdeps/mach/hurd/configure.ac (NO_HIDDEN): Do not define.
+       * sysdeps/mach/hurd/configure: Regenerate.
+
 2015-11-24  Joseph Myers  <joseph@codesourcery.com>
 
        * stdlib/strtod_nan.c: New file.
index 5fe490015439d3c95c4d60023a020bf88c7e9d7b..cb4f0bdab00eacc9ba0b8ab1d595e672bddfa83c 100644 (file)
@@ -55,3 +55,4 @@ ENTRY (__sigsetjmp)
        jmp __sigjmp_save
 #endif
 END (__sigsetjmp)
+hidden_def (__sigsetjmp)
index 19114f79ce526e0424a3c576805bd95682ab546f..13cd593d197bc367ee4a1c88dd9e0c3c34fd3524 100644 (file)
@@ -95,5 +95,4 @@ __libc_accept4 (int fd, __SOCKADDR_ARG addrarg, socklen_t *addr_len, int flags)
 
   return _hurd_intern_fd (new, O_IGNORE_CTTY | flags, 1);
 }
-libc_hidden_def (__libc_accept4)
 weak_alias (__libc_accept4, accept4)
index 3d155a450ea525a24fe4261d34a0b672b12634c8..dc43144dfd20ad412067d4653d58d5356e87077d 100644 (file)
@@ -1,8 +1,5 @@
 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
 
-$as_echo "#define NO_HIDDEN 1" >>confdefs.h
-
-
 if test -n "$sysheaders"; then
   OLD_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
index af9a9ea05211c45a3f25e8affc9dc0f3da6842cb..4e7e2600d0db5cb17b586f6e3eb4b5977f2c8a24 100644 (file)
@@ -1,8 +1,5 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 
-dnl We need this setting because of the need for PLT calls in ld.so.
-AC_DEFINE([NO_HIDDEN])
-
 if test -n "$sysheaders"; then
   OLD_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
index e446f157e2ef285f99f2d5f5dd78baf6f41f2317..7b3c56961dd249790c60d94f5075dde83abc6f29 100644 (file)
@@ -55,7 +55,8 @@ rtld_hidden_data_def (__libc_enable_secure)
 int __libc_multiple_libcs = 0; /* Defining this here avoids the inclusion
                                   of init-first.  */
 /* This variable contains the lowest stack address ever used.  */
-void *__libc_stack_end;
+void *__libc_stack_end attribute_relro = NULL;
+rtld_hidden_data_def(__libc_stack_end)
 
 #if HP_TIMING_AVAIL
 hp_timing_t _dl_cpuclock_offset;
index a15c16dfc323079674ff7bb38bcfe33fe29bbd39..ee7456d8e2cfa3908ee36be92c4f19a315acde86 100644 (file)
@@ -43,3 +43,4 @@ __fxstatat64 (int vers, int fd, const char *filename, struct stat64 *buf,
 
   return __hurd_fail (err);
 }
+libc_hidden_def (__fxstatat64)
index 652149b4d8cf2838bb9a020281d0f28eb2297183..03b31f9faae3f0e00adf4f5a4468a3b27b082267 100644 (file)
@@ -65,7 +65,9 @@ __if_freenameindex (struct if_nameindex *ifn)
     }
   free (ifn);
 }
+libc_hidden_def (__if_freenameindex)
 weak_alias (__if_freenameindex, if_freenameindex)
+libc_hidden_weak (if_freenameindex)
 
 /* Return an array of if_nameindex structures, one for each network
    interface present, plus one indicating the end of the array.  On
@@ -152,6 +154,7 @@ __if_nameindex (void)
   return idx;
 }
 weak_alias (__if_nameindex, if_nameindex)
+libc_hidden_weak (if_nameindex)
 
 /* Store the name of the interface corresponding to index IFINDEX in
    IFNAME (which has space for at least IFNAMSIZ characters).  Return
index c497a7cb44790ca01e1564d0a93e22ce919fc751..6d5c97b6d759a71d11872132835214005fda3763 100644 (file)
@@ -56,5 +56,5 @@ weak_alias (__libc_open, open)
 /* open64 is just the same as open for us.  */
 weak_alias (__libc_open, __libc_open64)
 weak_alias (__libc_open, __open64)
-libc_hidden_weak (_open64)
+libc_hidden_weak (__open64)
 weak_alias (__libc_open, open64)
index de024a31896f869c57545118d53cc8b1f80ce1c3..8850f2ac48d408344269b4e3203a4c873488b378 100644 (file)
@@ -129,4 +129,5 @@ all_done:
   return 0;
 }
 
+libc_hidden_def (__sigwait)
 weak_alias (__sigwait, sigwait)
index 6c7d6690fc55f2c6c7391f2deecb79660f7eb980..82a6eb90f0c816a7515c2549637b9e43ea39169c 100644 (file)
@@ -115,3 +115,5 @@ __xmknodat (int vers, int fd, const char *path, mode_t mode, dev_t *dev)
     return __hurd_fail (err);
   return 0;
 }
+
+libc_hidden_def (__xmknodat)
index 390d8a7cb3eac85d18901489ec984f7e7d38e93b..eabd23ef5cf449045d25c63227aa84c4f5125bea 100644 (file)
 #include <errno.h>
 #include <mach.h>
 #include <sys/time.h>
+#include <time.h>
 #include <unistd.h>
 
 int
-__nanosleep (const struct timespec *requested_time,
+__libc_nanosleep (const struct timespec *requested_time,
             struct timespec *remaining)
 {
   mach_port_t recv;
@@ -64,5 +65,6 @@ __nanosleep (const struct timespec *requested_time,
 
   return 0;
 }
+weak_alias(__libc_nanosleep, __nanosleep)
 libc_hidden_def (__nanosleep)
-weak_alias (__nanosleep, nanosleep)
+weak_alias (__libc_nanosleep, nanosleep)