diff options
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 70 |
1 files changed, 37 insertions, 33 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index c268384..59bbb80 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -28,6 +28,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "config.h" #include "system.h" +#include "coretypes.h" +#include "tm.h" #include <signal.h> #if ! defined( SIGCHLD ) && defined( SIGCLD ) # define SIGCHLD SIGCLD @@ -300,7 +302,6 @@ static int is_in_list PARAMS ((const char *, struct id *)); #endif static void write_aix_file PARAMS ((FILE *, struct id *)); static char *resolve_lib_name PARAMS ((const char *)); -static int ignore_library PARAMS ((const char *)); #endif static char *extract_string PARAMS ((const char **)); @@ -2684,6 +2685,41 @@ scan_libraries (prog_name) #endif +#ifdef COLLECT_EXPORT_LIST +/* Array of standard AIX libraries which should not + be scanned for ctors/dtors. */ +static const char *const aix_std_libs[] = { + "/unix", + "/lib/libc.a", + "/lib/libm.a", + "/lib/libc_r.a", + "/lib/libm_r.a", + "/usr/lib/libc.a", + "/usr/lib/libm.a", + "/usr/lib/libc_r.a", + "/usr/lib/libm_r.a", + "/usr/lib/threads/libc.a", + "/usr/ccs/lib/libc.a", + "/usr/ccs/lib/libm.a", + "/usr/ccs/lib/libc_r.a", + "/usr/ccs/lib/libm_r.a", + NULL +}; + +/* This function checks the filename and returns 1 + if this name matches the location of a standard AIX library. */ +static int ignore_library PARAMS ((const char *)); +static int +ignore_library (name) + const char *name; +{ + const char *const *p = &aix_std_libs[0]; + while (*p++ != NULL) + if (! strcmp (name, *p)) return 1; + return 0; +} +#endif /* COLLECT_EXPORT_LIST */ + extern char *ldgetname (); /* COFF version to scan the name list of the loaded program for @@ -2903,38 +2939,6 @@ if (debug) fprintf (stderr, "found: %s\n", lib_buf); fatal ("library lib%s not found", name); return (NULL); } - -/* Array of standard AIX libraries which should not - be scanned for ctors/dtors. */ -static const char *const aix_std_libs[] = { - "/unix", - "/lib/libc.a", - "/lib/libm.a", - "/lib/libc_r.a", - "/lib/libm_r.a", - "/usr/lib/libc.a", - "/usr/lib/libm.a", - "/usr/lib/libc_r.a", - "/usr/lib/libm_r.a", - "/usr/lib/threads/libc.a", - "/usr/ccs/lib/libc.a", - "/usr/ccs/lib/libm.a", - "/usr/ccs/lib/libc_r.a", - "/usr/ccs/lib/libm_r.a", - NULL -}; - -/* This function checks the filename and returns 1 - if this name matches the location of a standard AIX library. */ -static int -ignore_library (name) - const char *name; -{ - const char *const *p = &aix_std_libs[0]; - while (*p++ != NULL) - if (! strcmp (name, *p)) return 1; - return 0; -} #endif /* COLLECT_EXPORT_LIST */ |