]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove INTDEF / INTUSE / INTVARDEF (bug 14132).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 5 Nov 2014 23:35:36 +0000 (23:35 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 5 Nov 2014 23:35:36 +0000 (23:35 +0000)
Completing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch removes the final use - that for _dl_starting_up - replacing it
by rtld_hidden_def / rtld_hidden_proto.  Having removed the last use,
the mechanism itself is also removed.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.  (This is not much of a test since this
variable is only defined and used in the !HAVE_INLINED_SYSCALLS case.)

[BZ #14132]
* include/libc-symbols.h (INTUSE): Remove macro.
(INTDEF): Likewise.
(INTVARDEF): Likewise.
(_INTVARDEF): Likewise.
(INTDEF2): Likewise.
(INTVARDEF2): Likewise.
* elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use
rtld_hidden_def instead of INTVARDEF.
* sysdeps/generic/ldsodefs.h [IS_IN_rtld]
(_dl_starting_up_internal): Remove declaration.
(_dl_starting_up): Use rtld_hidden_proto.
* elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove
declaration.
[!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise.
(_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with
_dl_starting_up.
* elf/dl-writev.h (_dl_writev): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS]
(DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of
_dl_starting_up_internal.

ChangeLog
NEWS
elf/dl-init.c
elf/dl-writev.h
elf/rtld.c
include/libc-symbols.h
sysdeps/generic/ldsodefs.h
sysdeps/powerpc/powerpc64/dl-machine.h

index e402f0dad75295720933dbc52351989b6fa5cb87..9ee1c0d03ca9968e4f0faa62edfb92a2ecca3e92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2014-11-05  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #14132]
+       * include/libc-symbols.h (INTUSE): Remove macro.
+       (INTDEF): Likewise.
+       (INTVARDEF): Likewise.
+       (_INTVARDEF): Likewise.
+       (INTDEF2): Likewise.
+       (INTVARDEF2): Likewise.
+       * elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use
+       rtld_hidden_def instead of INTVARDEF.
+       * sysdeps/generic/ldsodefs.h [IS_IN_rtld]
+       (_dl_starting_up_internal): Remove declaration.
+       (_dl_starting_up): Use rtld_hidden_proto.
+       * elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove
+       declaration.
+       [!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise.
+       (_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with
+       _dl_starting_up.
+       * elf/dl-writev.h (_dl_writev): Likewise.
+       * sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS]
+       (DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of
+       _dl_starting_up_internal.
+
 2014-11-05  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * stdio-common/tst-fmemopen.c (do_test): Refactor to use
diff --git a/NEWS b/NEWS
index 4656531663f03f472f16ea05b62d592410c69967..8c3302c980426341f2794534bfd7e53a5f8b9fc6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,8 +9,8 @@ Version 2.21
 
 * The following bugs are resolved with this release:
 
-  6652, 12926, 14138, 14171, 15215, 15884, 17266, 17344, 17363, 17370,
-  17371, 17411, 17460, 17485, 17501, 17508, 17522.
+  6652, 12926, 14132, 14138, 14171, 15215, 15884, 17266, 17344, 17363,
+  17370, 17371, 17411, 17460, 17485, 17501, 17508, 17522.
 \f
 Version 2.20
 
index e5ade47acce3467029a8d689d94cecfdfeb6f01c..c80ec64a2f01681f81dbb352685f1e49bd4f7fc3 100644 (file)
 /* Type of the initializer.  */
 typedef void (*init_t) (int, char **, char **);
 
-#ifndef HAVE_INLINED_SYSCALLS
-/* Flag, nonzero during startup phase.  */
-extern int _dl_starting_up;
-extern int _dl_starting_up_internal attribute_hidden;
-#endif
-
 
 static void
 call_init (struct link_map *l, int argc, char **argv, char **env)
@@ -127,6 +121,6 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
 
 #ifndef HAVE_INLINED_SYSCALLS
   /* Finished starting up.  */
-  INTUSE(_dl_starting_up) = 0;
+  _dl_starting_up = 0;
 #endif
 }
index a5ce6c51666c34c4de2d27c6999416600b769fa7..6eace99ea5e71b4ca8d04a082827ae0ce5aff7e7 100644 (file)
@@ -42,7 +42,7 @@ _dl_writev (int fd, const struct iovec *iov, size_t niov)
      errno when it's being used by another thread that cares about it.
      Yet we must be sure not to try calling the lock functions before
      the thread library is fully initialized.  */
-  if (__glibc_unlikely (INTUSE (_dl_starting_up)))
+  if (__glibc_unlikely (_dl_starting_up))
     __writev (fd, iov, niov);
   else
     {
index b07ff435dc33cc05f458ef0e0349d80eb803fcf3..76c57f046f6a5ad755e098f5c1d27334fafcae99 100644 (file)
@@ -116,7 +116,7 @@ static struct audit_list
    and will be since that dynamic linker's _dl_start and dl_main will
    never be called.  */
 int _dl_starting_up = 0;
-INTVARDEF(_dl_starting_up)
+rtld_hidden_def (_dl_starting_up)
 #endif
 
 /* This is the structure which defines all variables global to ld.so
@@ -778,7 +778,7 @@ dl_main (const ElfW(Phdr) *phdr,
 
 #ifndef HAVE_INLINED_SYSCALLS
   /* Set up a flag which tells we are just starting.  */
-  INTUSE(_dl_starting_up) = 1;
+  _dl_starting_up = 1;
 #endif
 
   if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
index d4ab1f33de430ee3dbcefdc746939152dc893bf1..b1ac9db1b5560cdcf26adac40e2b82106da1365f 100644 (file)
@@ -391,26 +391,6 @@ for linking")
 
 #define attribute_relro __attribute__ ((section (".data.rel.ro")))
 
-/* Handling on non-exported internal names.  We have to do this only
-   for shared code.  */
-#ifdef SHARED
-# define INTUSE(name) name##_internal
-# define INTDEF(name) strong_alias (name, name##_internal)
-# define INTVARDEF(name) \
-  _INTVARDEF (name, name##_internal)
-# define _INTVARDEF(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((alias (#name), \
-                                                  visibility ("hidden")));
-# define INTDEF2(name, newname) strong_alias (name, newname##_internal)
-# define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
-#else
-# define INTUSE(name) name
-# define INTDEF(name)
-# define INTVARDEF(name)
-# define INTDEF2(name, newname)
-# define INTVARDEF2(name, newname)
-#endif
-
 /* The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).
    First of all, you need to have the function prototyped somewhere,
index f339ee3db9cede9f67dc4a7b456d17f4050eaf67..b91a97318ecc271985080665d9be484ff707b184 100644 (file)
@@ -659,9 +659,7 @@ extern unsigned int _dl_skip_args_internal attribute_hidden
 /* Flag set at startup and cleared when the last initializer has run.  */
 extern int _dl_starting_up;
 weak_extern (_dl_starting_up)
-#ifdef IS_IN_rtld
-extern int _dl_starting_up_internal attribute_hidden;
-#endif
+rtld_hidden_proto (_dl_starting_up)
 
 /* Random data provided by the kernel.  */
 extern void *_dl_random attribute_hidden attribute_relro;
index 3007e80f90a7e08ec9721a3f5d29398b30d970c9..8811d5d400c07b03843db2ced4d9cca321413bcb 100644 (file)
@@ -126,7 +126,7 @@ elf_machine_dynamic (void)
 #else
 # define DL_STARTING_UP_DEF \
 ".LC__dl_starting_up:\n"  \
-"      .tc _dl_starting_up_internal[TC],_dl_starting_up_internal\n"
+"      .tc __GI__dl_starting_up[TC],__GI__dl_starting_up\n"
 #endif