git-hidden-def
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 14 Jan 2018 10:24:48 +0000 (10:24 +0000)
commit a166531fdf601560a0005479427f60d3173f8257
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
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
posix/sched_primin.c
sysdeps/i386/dl-tlsdesc.S
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/mmap.c
sysdeps/mach/hurd/mmap64.c
sysdeps/mach/mprotect.c
sysdeps/mach/munmap.c

index 6f40b83f6c801c7dd9b5adffc7e33d963f1d9cd2..ed711c7317169ddcbf70f6b95a0c9071f1659801 100644 (file)
@@ -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)
index 7e38a7cc6b53300d4c363f3c3d7212bd314b72a3..149b9944066612b52110db466d0262370d78b4dd 100644 (file)
@@ -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)
index 8befdc2b39814fee9f580e757124ddf1cae2b309..cbe73e5ce4fef38259b34118bce2e212464ba765 100644 (file)
@@ -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
index 84a683ed171fb5b78079df5dc1fc041f626bdff8..a88613405d82d0deaff5209fc218006459af9040 100644 (file)
@@ -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)
 \f
 /* This function is called by interruptible RPC stubs.  For initial
    dynamic linking, just use the normal mach_msg.  Since this defn is
index dbd718a688e4e75bc811b7b54ac0ae88ef470fcf..87b96103a7bb88d2572d107be5a203a2f3b75310 100644 (file)
@@ -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)
index ced469db18555a221daa52d1f28165c1a879a7e4..f2391f87f2fe380df197eb19ad65b93de387fe77 100644 (file)
@@ -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)
index 477017da39db97547adef4eb6f3982009de6eb9d..b1854c1369940708e4d2a2f9d9b535141dc0ed80 100644 (file)
@@ -47,4 +47,5 @@ __mprotect (__ptr_t addr, size_t len, int prot)
     }
   return 0;
 }
+libc_hidden_def (__mprotect)
 weak_alias (__mprotect, mprotect)
index b5fdaeaf1b43baa2b8d209abb24b2c688cf60dc7..e5938d2dc27c8d6ef35f0e7094059f5c8a76c052 100644 (file)
@@ -43,4 +43,5 @@ __munmap (__ptr_t addr, size_t len)
   return 0;
 }
 
+libc_hidden_def (__munmap)
 weak_alias (__munmap, munmap)