]> sourceware.org Git - glibc.git/commitdiff
hurd: Fix some ld.so symbol override from libc
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 27 Jul 2018 09:18:29 +0000 (11:18 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 27 Jul 2018 09:18:29 +0000 (11:18 +0200)
ld.so symbols to be overriden by libc need to be extern to really get
overriden.

More fixes are needed to avoid the hidden attribute.

* sysdeps/mach/hurd/Versions (libc): Make __access and
__access_noerrno external so they can override the ld symbols.
(ld): Make __access, __read, __sbrk, __strtoul_internal, __write,
__writev, __open64, __access_noerrno extern so they can be overrided.
* sysdeps/mach/hurd/i386/libc.abilist: Update accordingly.
* sysdeps/mach/hurd/i386/ld.abilist: Update accordingly.

ChangeLog
sysdeps/mach/hurd/Versions
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/i386/ld.abilist
sysdeps/mach/hurd/i386/libc.abilist
sysdeps/mach/hurd/i386/localplt.data

index 5556e82a2d5c65e60941678eb501aaffeed961fe..61edfc538134c458013a5c85a9a89583c1401283 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-07-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * sysdeps/mach/hurd/Versions (libc): Make __access and
+       __access_noerrno external so they can override the ld symbols.
+       (ld): Make __access, __read, __sbrk, __strtoul_internal, __write,
+       __writev, __open64, __access_noerrno extern so they can be overrided.
+       * sysdeps/mach/hurd/i386/libc.abilist: Update accordingly.
+       * sysdeps/mach/hurd/i386/ld.abilist: Update accordingly.
+
 2018-07-26  Carlos O'Donell  <carlos@redhat.com>
 
        * po/libc.pot: Regenerate.
index 7cab8e855167aaed7e242dc29e8e2039973f5ce9..f69d5fef671869e06ceb8fa6b02b59f78271775c 100644 (file)
@@ -1,11 +1,15 @@
 libc {
   GLIBC_2.0 {
     # functions with a weak definition in the dynamic linker
-    __getcwd; __mmap;
+    __access; __getcwd; __mmap;
+  }
+  GLIBC_2.2.6 {
+    # functions with a weak definition in the dynamic linker
+    __writev;
   }
   GLIBC_PRIVATE {
     # Functions shared with the dynamic linker
-    __libc_read; __libc_write; __libc_lseek64;
+    __access_noerrno; __libc_read; __libc_write; __libc_lseek64;
     __libc_lock_self0;
 
     _dl_init_first;
@@ -18,11 +22,16 @@ ld {
     __hurd_threadvar_stack_mask;  __hurd_threadvar_stack_offset;
 
     # functions that must be shared with libc
-    __close; __getcwd; __getpid;
-    __mmap; __open; __xstat64; __fxstat64;
+    __access; __close; __getcwd; __getpid;
+    __mmap; __open; __read; __sbrk; __strtoul_internal;
+    __write; __writev; __xstat64; __fxstat64;
     _exit; _hurd_intr_rpc_mach_msg;
     abort;
   }
+  GLIBC_2.2 {
+    # functions that must be shared with libc
+    __open64;
+  }
   GLIBC_2.2.6 {
     # this also must be shared with libc.
     __errno_location;
@@ -31,7 +40,7 @@ ld {
     _dl_init_first;
 
     # functions that must be shared with libc
-    __libc_read; __libc_write; __libc_lseek64;
+    __access_noerrno; __libc_read; __libc_write; __libc_lseek64;
     __libc_lock_self0;
   }
 }
index ec55c47f35077ca9e23d4f7a18a0c456e90663ce..b72913d3baaed1d90a4847c89333a5de258827ca 100644 (file)
@@ -275,7 +275,10 @@ _dl_sysdep_start_cleanup (void)
 /* Minimal open/close/mmap implementation sufficient for initial loading of
    shared libraries.  These are weak definitions so that when the
    dynamic linker re-relocates itself to be user-visible (for -ldl),
-   it will get the user's definition (i.e. usually libc's).  */
+   it will get the user's definition (i.e. usually libc's).
+
+   They also need to be set in the ld section of sysdeps/mach/hurd/Versions, to
+   be overridable, and in libc.abilist and ld.abilist to be checked. */
 
 /* This macro checks that the function does not get renamed to be hidden: we do
    need these to be overridable by libc's.  */
index 14371336de59578d92bc97ba341e59c24f3233e1..3a89b5a10ef74768e3dfda1960844c7ffa172412 100644 (file)
@@ -5,6 +5,10 @@ GLIBC_2.2.6 __getpid F
 GLIBC_2.2.6 __libc_stack_end D 0x4
 GLIBC_2.2.6 __mmap F
 GLIBC_2.2.6 __open F
+GLIBC_2.2.6 __open64 F
+GLIBC_2.2.6 __strtoul_internal F
+GLIBC_2.2.6 __write F
+GLIBC_2.2.6 __writev F
 GLIBC_2.2.6 __xstat64 F
 GLIBC_2.2.6 _dl_mcount F
 GLIBC_2.2.6 _hurd_intr_rpc_mach_msg F
index 9a3aac7a92f77ec90f65cb1d5f19c4325b635541..64586d828d55b53648befbf2d6aa5070096eb2e1 100644 (file)
@@ -543,6 +543,7 @@ GLIBC_2.2.6 __wctrans_l F
 GLIBC_2.2.6 __wctype_l F
 GLIBC_2.2.6 __woverflow F
 GLIBC_2.2.6 __write F
+GLIBC_2.2.6 __writev F
 GLIBC_2.2.6 __wuflow F
 GLIBC_2.2.6 __wunderflow F
 GLIBC_2.2.6 __xmknod F
index efcf4e4f6ea9c61c777d321126f28fd8e0734031..69d3a2568d5edde8815574ab7b59b221f879365b 100644 (file)
@@ -27,7 +27,7 @@ ld.so: __open64 ?
 ld.so: __close
 ld.so: __read ?
 ld.so: __write ?
-#ld.so: __writev
+ld.so: __writev
 ld.so: __libc_lseek64
 ld.so: __mmap
 ld.so: __fxstat64
@@ -37,7 +37,7 @@ ld.so: __xstat64
 ld.so: __getpid
 #ld.so: __getcwd
 #ld.so: __sbrk
-#ld.so: __strtoul_internal
+ld.so: __strtoul_internal
 #ld.so: _exit
 ld.so: abort
 ld.so: _hurd_intr_rpc_mach_msg
This page took 0.130318 seconds and 5 git commands to generate.