1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Fix startup to security-relevant statically linked binaries.

Before the change they crash on startup.  Perform IREL relocations
earlier to prevent this.
This commit is contained in:
Ulrich Drepper
2009-11-24 11:17:06 -08:00
parent ee5a5ba672
commit 1c3c269b55
3 changed files with 28 additions and 6 deletions

View File

@@ -24,6 +24,9 @@
#include <bp-sym.h>
extern void __libc_init_first (int argc, char **argv, char **envp);
#ifndef SHARED
extern void __libc_csu_irel (void);
#endif
extern int __libc_multiple_libcs;
@@ -134,6 +137,9 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
}
# endif
/* Performe IREL{,A} relocations. */
__libc_csu_irel ();
/* Initialize the thread library at least a bit since the libgcc
functions are using thread functions if these are available and
we need to setup errno. */