From a49499b056f8233cf6e381ad5a767bda21e38224 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Sun, 14 Jan 2018 10:24:48 +0000 Subject: [PATCH] git-hidden-def commit a166531fdf601560a0005479427f60d3173f8257 Author: Samuel Thibault Date: Tue Sep 12 01:34:19 2017 +0200 hurd: Fix build without NO_HIDDEN * posix/sched_primax.c (__sched_get_priority_max): Add libc_hidden_def. * posix/sched_primin.c (__sched_get_priority_min): Likewise. * sysdeps/mach/hurd/mmap.c (__mmap): Likewise. * sysdeps/mach/hurd/mmap64.c (__mmap64): Likewise. * sysdeps/mach/hurd/mprotect.c (__mprotect): Likewise. * sysdeps/mach/hurd/munmap.c (__munmap): Likewise. * sysdeps/mach/hurd/dl-sysdep.c (__GI___getpid, __GI___strtoul_internal, __GI_____strtoul_internal, __GI___chk_fail, __GI___fortify_fail, __GI___assert_fail, __GI___assert_perror_fail): Add aliases. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-hidden-def.diff --- posix/sched_primax.c | 1 + posix/sched_primin.c | 1 + sysdeps/i386/dl-tlsdesc.S | 4 ++++ sysdeps/mach/hurd/dl-sysdep.c | 13 +++++++++++++ sysdeps/mach/hurd/mmap.c | 1 + sysdeps/mach/hurd/mmap64.c | 1 + sysdeps/mach/mprotect.c | 1 + sysdeps/mach/munmap.c | 1 + 8 files changed, 23 insertions(+) diff --git a/posix/sched_primax.c b/posix/sched_primax.c index 6f40b83f6..ed711c731 100644 --- a/posix/sched_primax.c +++ b/posix/sched_primax.c @@ -26,6 +26,7 @@ __sched_get_priority_max (int algorithm) __set_errno (ENOSYS); return -1; } +libc_hidden_def (__sched_get_priority_max) stub_warning (sched_get_priority_max) weak_alias (__sched_get_priority_max, sched_get_priority_max) diff --git a/posix/sched_primin.c b/posix/sched_primin.c index 7e38a7cc6..149b99440 100644 --- a/posix/sched_primin.c +++ b/posix/sched_primin.c @@ -26,6 +26,7 @@ __sched_get_priority_min (int algorithm) __set_errno (ENOSYS); return -1; } +libc_hidden_def (__sched_get_priority_min) stub_warning (sched_get_priority_min) weak_alias (__sched_get_priority_min, sched_get_priority_min) diff --git a/sysdeps/i386/dl-tlsdesc.S b/sysdeps/i386/dl-tlsdesc.S index 8befdc2b3..cbe73e5ce 100644 --- a/sysdeps/i386/dl-tlsdesc.S +++ b/sysdeps/i386/dl-tlsdesc.S @@ -126,7 +126,11 @@ _dl_tlsdesc_dynamic: .p2align 4,,7 .Lslow: cfi_adjust_cfa_offset (28) +#ifdef NO_RTLD_HIDDEN + call JUMPTARGET (___tls_get_addr) +#else call HIDDEN_JUMPTARGET (___tls_get_addr) +#endif jmp .Lret cfi_endproc .size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 84a683ed1..a88613405 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -576,6 +576,10 @@ __getpid (void) return pid; } +/* We need this alias to satisfy references from libc_pic.a objects + that were affected by the libc_hidden_proto declaration for __getpid. */ +strong_alias (__getpid, __GI___getpid) + /* This is called only in some strange cases trying to guess a value for $ORIGIN for the executable. The dynamic linker copes with getcwd failing (dl-object.c), and it's too much hassle to include @@ -610,6 +614,11 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group) return _dl_strtoul (nptr, endptr); } +/* We need this alias to satisfy references from libc_pic.a objects + that were affected by the libc_hidden_proto declaration for __strtoul_internal. */ +strong_alias (__strtoul_internal, __GI___strtoul_internal) +strong_alias (__strtoul_internal, __GI_____strtoul_internal) + void weak_function attribute_hidden _exit (int status) { @@ -648,6 +657,10 @@ abort (void) /* We need this alias to satisfy references from libc_pic.a objects that were affected by the libc_hidden_proto declaration for abort. */ strong_alias (abort, __GI_abort) +strong_alias (abort, __GI___chk_fail) +strong_alias (abort, __GI___fortify_fail) +strong_alias (abort, __GI___assert_fail) +strong_alias (abort, __GI___assert_perror_fail) /* This function is called by interruptible RPC stubs. For initial dynamic linking, just use the normal mach_msg. Since this defn is diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index dbd718a68..87b96103a 100644 --- a/sysdeps/mach/hurd/mmap.c +++ b/sysdeps/mach/hurd/mmap.c @@ -185,4 +185,5 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) return (__ptr_t) mapaddr; } +libc_hidden_def (__mmap) weak_alias (__mmap, mmap) diff --git a/sysdeps/mach/hurd/mmap64.c b/sysdeps/mach/hurd/mmap64.c index ced469db1..f2391f87f 100644 --- a/sysdeps/mach/hurd/mmap64.c +++ b/sysdeps/mach/hurd/mmap64.c @@ -44,4 +44,5 @@ __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, return __mmap (addr, len, prot, flags, fd, small_offset); } +libc_hidden_def (__mmap64) weak_alias (__mmap64, mmap64) diff --git a/sysdeps/mach/mprotect.c b/sysdeps/mach/mprotect.c index 477017da3..b1854c136 100644 --- a/sysdeps/mach/mprotect.c +++ b/sysdeps/mach/mprotect.c @@ -47,4 +47,5 @@ __mprotect (__ptr_t addr, size_t len, int prot) } return 0; } +libc_hidden_def (__mprotect) weak_alias (__mprotect, mprotect) diff --git a/sysdeps/mach/munmap.c b/sysdeps/mach/munmap.c index b5fdaeaf1..e5938d2dc 100644 --- a/sysdeps/mach/munmap.c +++ b/sysdeps/mach/munmap.c @@ -43,4 +43,5 @@ __munmap (__ptr_t addr, size_t len) return 0; } +libc_hidden_def (__munmap) weak_alias (__munmap, munmap) -- 2.30.2