Declare __ehdr_start with hidden visibility.
authorMaciej W. Rozycki <macro@codesourcery.com>
Thu, 25 Apr 2013 15:09:19 +0000 (16:09 +0100)
committerMaciej W. Rozycki <macro@codesourcery.com>
Thu, 25 Apr 2013 15:14:49 +0000 (16:14 +0100)
This avoids a linker bug triggering for MIPS SVR4 binaries:

http://sourceware.org/bugzilla/show_bug.cgi?id=15365

and regardless serves as a documentation of intent.

ChangeLog
csu/libc-start.c

index da92463..930af2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-04-25  Maciej W. Rozycki  <macro@codesourcery.com>
 
+       * csu/libc-start.c (__libc_start_main) [!SHARED]: Declare
+       __ehdr_start with hidden visibility.
+
        * soft-fp/op-common.h (_FP_SQRT): s/sNAN/NAN/ in a comment.
 
 2013-04-24  Carlos O'Donell  <carlos@redhat.com>
index fa9085c..e5da3ef 100644 (file)
@@ -161,7 +161,8 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
          So we can set up _dl_phdr and _dl_phnum even without any
          information from auxv.  */
 
-      extern const ElfW(Ehdr) __ehdr_start __attribute__ ((weak));
+      extern const ElfW(Ehdr) __ehdr_start
+       __attribute__ ((weak, visibility ("hidden")));
       if (&__ehdr_start != NULL)
         {
           assert (__ehdr_start.e_phentsize == sizeof *GL(dl_phdr));