aboutsummaryrefslogtreecommitdiff
path: root/gcc/collect2.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2002-12-16 18:23:00 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-12-16 18:23:00 +0000
commit4977bab6ed59f01c73f9c8b9e92298706df9b6d5 (patch)
treec259697c448b0c6f548f153c48c46a8d7a75970f /gcc/collect2.c
parentb51dc045004ee7eb8d2bf4358ddf22a6cc6c1d00 (diff)
downloadgcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.zip
gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.tar.gz
gcc-4977bab6ed59f01c73f9c8b9e92298706df9b6d5.tar.bz2
Merge basic-improvements-branch to trunk
From-SVN: r60174
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r--gcc/collect2.c70
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 */