[1/3] Mark __libc_multiple_libcs with attribute_hidden [BZ #18822]
Commit Message
Since __libc_multiple_libcs is defined as hidden symbol in init-first.c,
it should be marked with attribute_hidden.
OK for master?
H.J.
---
[BZ #18822]
* csu/libc-start.c (__libc_multiple_libcs): Add attribute_hidden.
* elf/dl-open.c (__libc_multiple_libcs): Likewise.
---
csu/libc-start.c | 2 +-
elf/dl-open.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
Comments
* H. J. Lu:
> [BZ #18822]
> * csu/libc-start.c (__libc_multiple_libcs): Add attribute_hidden.
> * elf/dl-open.c (__libc_multiple_libcs): Likewise.
Please put a hidden declaration into a header file instead.
@@ -27,7 +27,7 @@
extern void __libc_init_first (int argc, char **argv, char **envp);
-extern int __libc_multiple_libcs;
+extern int __libc_multiple_libcs attribute_hidden;
#include <tls.h>
#ifndef SHARED
@@ -37,7 +37,8 @@
#include <dl-dst.h>
-extern int __libc_multiple_libcs; /* Defined in init-first.c. */
+/* Defined in init-first.c. */
+extern int __libc_multiple_libcs attribute_hidden;
/* We must be careful not to leave us in an inconsistent state. Thus we
catch any error and re-raise it after cleaning up. */