aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-25 02:35:18 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-25 02:35:18 +0100
commit6e45e6ef4de173f8b94de07f9522c35fc230151c (patch)
tree5d705ee5ceb771e207d7c9b3a9ba6965bc66f173
parentfb304035c41c7ee2afede51e5e8568974549ba5e (diff)
downloadglibc-6e45e6ef4de173f8b94de07f9522c35fc230151c.tar
glibc-6e45e6ef4de173f8b94de07f9522c35fc230151c.tar.gz
glibc-6e45e6ef4de173f8b94de07f9522c35fc230151c.tar.bz2
glibc-6e45e6ef4de173f8b94de07f9522c35fc230151c.zip
Fix hurd build with hidden support
* 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.
-rw-r--r--ChangeLog21
-rw-r--r--sysdeps/i386/setjmp.S1
-rw-r--r--sysdeps/mach/hurd/accept4.c1
-rw-r--r--sysdeps/mach/hurd/configure3
-rw-r--r--sysdeps/mach/hurd/configure.ac3
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c3
-rw-r--r--sysdeps/mach/hurd/fxstatat64.c1
-rw-r--r--sysdeps/mach/hurd/if_index.c3
-rw-r--r--sysdeps/mach/hurd/open.c2
-rw-r--r--sysdeps/mach/hurd/sigwait.c1
-rw-r--r--sysdeps/mach/hurd/xmknodat.c2
-rw-r--r--sysdeps/mach/nanosleep.c6
12 files changed, 36 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 33ea5ab374..8a7e96b3be 100644
--- 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.
diff --git a/sysdeps/i386/setjmp.S b/sysdeps/i386/setjmp.S
index 5fe4900154..cb4f0bdab0 100644
--- a/sysdeps/i386/setjmp.S
+++ b/sysdeps/i386/setjmp.S
@@ -55,3 +55,4 @@ ENTRY (__sigsetjmp)
jmp __sigjmp_save
#endif
END (__sigsetjmp)
+hidden_def (__sigsetjmp)
diff --git a/sysdeps/mach/hurd/accept4.c b/sysdeps/mach/hurd/accept4.c
index 19114f79ce..13cd593d19 100644
--- a/sysdeps/mach/hurd/accept4.c
+++ b/sysdeps/mach/hurd/accept4.c
@@ -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)
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
index 3d155a450e..dc43144dfd 100644
--- a/sysdeps/mach/hurd/configure
+++ b/sysdeps/mach/hurd/configure
@@ -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"
diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac
index af9a9ea052..4e7e2600d0 100644
--- a/sysdeps/mach/hurd/configure.ac
+++ b/sysdeps/mach/hurd/configure.ac
@@ -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"
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index e446f157e2..7b3c56961d 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -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;
diff --git a/sysdeps/mach/hurd/fxstatat64.c b/sysdeps/mach/hurd/fxstatat64.c
index a15c16dfc3..ee7456d8e2 100644
--- a/sysdeps/mach/hurd/fxstatat64.c
+++ b/sysdeps/mach/hurd/fxstatat64.c
@@ -43,3 +43,4 @@ __fxstatat64 (int vers, int fd, const char *filename, struct stat64 *buf,
return __hurd_fail (err);
}
+libc_hidden_def (__fxstatat64)
diff --git a/sysdeps/mach/hurd/if_index.c b/sysdeps/mach/hurd/if_index.c
index 652149b4d8..03b31f9faa 100644
--- a/sysdeps/mach/hurd/if_index.c
+++ b/sysdeps/mach/hurd/if_index.c
@@ -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
diff --git a/sysdeps/mach/hurd/open.c b/sysdeps/mach/hurd/open.c
index c497a7cb44..6d5c97b6d7 100644
--- a/sysdeps/mach/hurd/open.c
+++ b/sysdeps/mach/hurd/open.c
@@ -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)
diff --git a/sysdeps/mach/hurd/sigwait.c b/sysdeps/mach/hurd/sigwait.c
index de024a3189..8850f2ac48 100644
--- a/sysdeps/mach/hurd/sigwait.c
+++ b/sysdeps/mach/hurd/sigwait.c
@@ -129,4 +129,5 @@ all_done:
return 0;
}
+libc_hidden_def (__sigwait)
weak_alias (__sigwait, sigwait)
diff --git a/sysdeps/mach/hurd/xmknodat.c b/sysdeps/mach/hurd/xmknodat.c
index 6c7d6690fc..82a6eb90f0 100644
--- a/sysdeps/mach/hurd/xmknodat.c
+++ b/sysdeps/mach/hurd/xmknodat.c
@@ -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)
diff --git a/sysdeps/mach/nanosleep.c b/sysdeps/mach/nanosleep.c
index 390d8a7cb3..eabd23ef5c 100644
--- a/sysdeps/mach/nanosleep.c
+++ b/sysdeps/mach/nanosleep.c
@@ -19,10 +19,11 @@
#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)