From 1c3c269b55c84c29ec1e2c70f122c5e33fef4257 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 24 Nov 2009 11:17:06 -0800 Subject: Fix startup to security-relevant statically linked binaries. Before the change they crash on startup. Perform IREL relocations earlier to prevent this. --- csu/libc-start.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'csu/libc-start.c') diff --git a/csu/libc-start.c b/csu/libc-start.c index 80b672f88d..dc7ca55f09 100644 --- a/csu/libc-start.c +++ b/csu/libc-start.c @@ -24,6 +24,9 @@ #include 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. */ -- cgit v1.2.3