diff options
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 10f76921598..153ac6f0126 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1,6 +1,7 @@ /* Collect static initialization info into data structures that can be traversed by C++ initialization and finalization routines. - Copyright (C) 1992, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Contributed by Chris Smith (csmith@convex.com). Heavily modified by Michael Meissner (meissner@cygnus.com), Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). @@ -1515,7 +1516,7 @@ main (argc, argv) /* On AIX we do this later. */ #ifndef COLLECT_EXPORT_LIST - do_tlink (ld1_argv, object_lst); + do_tlink (ld1_argv, object_lst); #endif /* If -r or they will be run via some other method, do not build the @@ -1527,6 +1528,9 @@ main (argc, argv) ) { #ifdef COLLECT_EXPORT_LIST + /* Do the link we avoided above if we are exiting. */ + do_tlink (ld1_argv, object_lst); + /* But make sure we delete the export file we may have created. */ if (export_file != 0 && export_file[0]) maybe_unlink (export_file); @@ -1555,6 +1559,7 @@ main (argc, argv) { notice ("%d constructor(s) found\n", constructors.number); notice ("%d destructor(s) found\n", destructors.number); + notice ("%d frame table(s) found\n", frame_tables.number); } if (constructors.number == 0 && destructors.number == 0 @@ -2372,6 +2377,7 @@ scan_prog_file (prog_name, which_pass) case 5: if (which_pass != PASS_LIB) add_to_list (&frame_tables, name); + break; default: /* not a constructor or destructor */ continue; @@ -2816,7 +2822,7 @@ scan_libraries (prog_name) #if defined(EXTENDED_COFF) # define GCC_SYMBOLS(X) (SYMHEADER(X).isymMax + SYMHEADER(X).iextMax) # define GCC_SYMENT SYMR -# define GCC_OK_SYMBOL(X) ((X).st == stProc && (X).sc == scText) +# define GCC_OK_SYMBOL(X) ((X).st == stProc || (X).st == stGlobal) # define GCC_SYMINC(X) (1) # define GCC_SYMZERO(X) (SYMHEADER(X).isymMax) # define GCC_CHECK_HDR(X) (PSYMTAB(X) != 0) @@ -2956,6 +2962,11 @@ scan_prog_file (prog_name, which_pass) break; #endif + case 5: + if (! is_shared) + add_to_list (&frame_tables, name); + break; + default: /* not a constructor or destructor */ #ifdef COLLECT_EXPORT_LIST /* If we are building a shared object on AIX we need @@ -3035,21 +3046,11 @@ scan_prog_file (prog_name, which_pass) #ifdef COLLECT_EXPORT_LIST -/* This new function is used to decide whether we should - generate import list for an object or to use it directly. */ +/* Never generate import list (gcc-2.95 branch). */ static int use_import_list (prog_name) char *prog_name; { - char *p; - - /* If we do not build a shared object then import list should not be used. */ - if (! shared_obj) return 0; - - /* Currently we check only for libgcc, but this can be changed in future. */ - p = strstr (prog_name, "libgcc.a"); - if (p != 0 && (strlen (p) == sizeof ("libgcc.a") - 1)) - return 1; return 0; } |