From: H.J. Lu Date: Mon, 21 Aug 2017 12:32:21 +0000 (-0700) Subject: Mark __libc_multiple_libcs with attribute_hidden [BZ #18822] X-Git-Tag: glibc-2.27~1116 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54e4b8f21590d57ec9a2f2ad81a17c57e3b3984f;p=thirdparty%2Fglibc.git Mark __libc_multiple_libcs with attribute_hidden [BZ #18822] 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_multiple_libcs): Removed. * elf/dl-sysdep.c: Include instead of . * include/libc-internal.h (__libc_multiple_libcs): New. * misc/sbrk.c: Include . (__libc_multiple_libcs): Removed. --- diff --git a/ChangeLog b/ChangeLog index 680f3779865..4f34d4bff02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2017-08-21 H.J. Lu + + [BZ #18822] + * csu/libc-start.c (__libc_multiple_libcs): Removed. + * elf/dl-open.c: Include . + (__libc_multiple_libcs): Removed. + * elf/dl-sysdep.c: Include instead of + . + * include/libc-internal.h (__libc_multiple_libcs): New. + * misc/sbrk.c: Include . + (__libc_multiple_libcs): Removed. + 2017-08-21 H.J. Lu [BZ #18822] diff --git a/csu/libc-start.c b/csu/libc-start.c index 67206171887..24c63be02f0 100644 --- a/csu/libc-start.c +++ b/csu/libc-start.c @@ -27,8 +27,6 @@ extern void __libc_init_first (int argc, char **argv, char **envp); -extern int __libc_multiple_libcs; - #include #ifndef SHARED # include diff --git a/elf/dl-open.c b/elf/dl-open.c index 2d8948aab15..c539f10cf38 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -33,12 +33,11 @@ #include #include #include +#include #include -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. */ diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index 4053ff3c078..c4ff8b2937c 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/libc-internal.h b/include/libc-internal.h index cd2f2622ed0..c501c95eb57 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -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 */ diff --git a/misc/sbrk.c b/misc/sbrk.c index 965c0ef8796..158399d2ede 100644 --- a/misc/sbrk.c +++ b/misc/sbrk.c @@ -18,14 +18,12 @@ #include #include #include +#include /* 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. */