]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Mark __libc_multiple_libcs with attribute_hidden [BZ #18822]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Aug 2017 12:32:21 +0000 (05:32 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Aug 2017 12:32:39 +0000 (05:32 -0700)
Since __libc_multiple_libcs is defined as hidden symbol in init-first.c,
it should be always marked with attribute_hidden.

[BZ #18822]
* csu/libc-start.c (__libc_multiple_libcs): Removed.
* elf/dl-open.c: Include <libc-internal.h>.
(__libc_multiple_libcs): Removed.
* elf/dl-sysdep.c: Include <libc-internal.h> instead of
<hp-timing.h>.
* include/libc-internal.h (__libc_multiple_libcs): New.
* misc/sbrk.c: Include <libc-internal.h>.
(__libc_multiple_libcs): Removed.

ChangeLog
csu/libc-start.c
elf/dl-open.c
elf/dl-sysdep.c
include/libc-internal.h
misc/sbrk.c

index 680f37798657429df0d796676e21e343121008f9..4f34d4bff02b1af6d02f0461431310107399d021 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-08-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #18822]
+       * csu/libc-start.c (__libc_multiple_libcs): Removed.
+       * elf/dl-open.c: Include <libc-internal.h>.
+       (__libc_multiple_libcs): Removed.
+       * elf/dl-sysdep.c: Include <libc-internal.h> instead of
+       <hp-timing.h>.
+       * include/libc-internal.h (__libc_multiple_libcs): New.
+       * misc/sbrk.c: Include <libc-internal.h>.
+       (__libc_multiple_libcs): Removed.
+
 2017-08-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #18822]
index 672061718877c7d42a63fa460fa8b4a6e9ff7936..24c63be02f06484955071c0d79914e5162217065 100644 (file)
@@ -27,8 +27,6 @@
 
 extern void __libc_init_first (int argc, char **argv, char **envp);
 
-extern int __libc_multiple_libcs;
-
 #include <tls.h>
 #ifndef SHARED
 # include <dl-osinfo.h>
index 2d8948aab15f92b949aa90630b39b45d71bd94a4..c539f10cf38bde7c4a8705c2c2bfa65240acd258 100644 (file)
 #include <tls.h>
 #include <stap-probe.h>
 #include <atomic.h>
+#include <libc-internal.h>
 
 #include <dl-dst.h>
 
 
-extern int __libc_multiple_libcs;      /* Defined in init-first.c.  */
-
 /* We must be careful not to leave us in an inconsistent state.  Thus we
    catch any error and re-raise it after cleaning up.  */
 
index 4053ff3c078b26466d0315691bdeac5ddb3e702d..c4ff8b2937cbecfa45da941b81339cca1f8b3c8e 100644 (file)
@@ -41,7 +41,7 @@
 #include <dl-machine.h>
 #include <dl-procinfo.h>
 #include <dl-osinfo.h>
-#include <hp-timing.h>
+#include <libc-internal.h>
 #include <tls.h>
 
 #include <dl-tunables.h>
index cd2f2622ed02ecbd0d16f07d49982c3743e1bc29..c501c95eb572dadba213addd911972e1ae86511a 100644 (file)
@@ -53,4 +53,6 @@ extern void __init_misc (int, char **, char **);
 extern __typeof (__profile_frequency) __profile_frequency attribute_hidden;
 # endif
 
+extern int __libc_multiple_libcs attribute_hidden;
+
 #endif /* _LIBC_INTERNAL  */
index 965c0ef87969990495cc606d95eef87d6d7521fc..158399d2ede7257ef078943029866a5fc76ed7e8 100644 (file)
 #include <errno.h>
 #include <stdint.h>
 #include <unistd.h>
+#include <libc-internal.h>
 
 /* Defined in brk.c.  */
 extern void *__curbrk;
 extern int __brk (void *addr);
 
-/* Defined in init-first.c.  */
-extern int __libc_multiple_libcs attribute_hidden;
-
 /* Extend the process's data space by INCREMENT.
    If INCREMENT is negative, shrink data space by - INCREMENT.
    Return start of new space allocated, or -1 for errors.  */