summaryrefslogtreecommitdiff
path: root/gcc/collect2.c
Commit message (Collapse)AuthorAgeFilesLines
* collect2.c (scan_prog_file): Completely cover uses of variable `exports' ↵Kaveh R. Ghazi1998-02-221-2/+2
| | | | | | | | | with macro COLLECT_EXPORT_LIST. * collect2.c (scan_prog_file): Completely cover uses of variable `exports' with macro COLLECT_EXPORT_LIST. From-SVN: r18164
* collect2.c (main): Still handle !do_collecting for non-AIX targets.Jason Merrill1998-02-201-2/+3
| | | | | | | * collect2.c (main): Still handle !do_collecting for non-AIX targets. Bring over from mainline sources. From-SVN: r18153
* collect2.c (XCOFF_SCAN_LIBS): Remove.Andrey Slepuhin1998-02-191-247/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * collect2.c (XCOFF_SCAN_LIBS): Remove. (export_flag): New variable. (export_file): #ifdef COLLECT_EXPORT_LIST. (import_file, exports, imports, undefined): New variables. (libs, cmdline_lib_dirs, libpath_lib_dirs, libpath, libexts): Same. (dump_list, dump_prefix_list, is_in_list): New functions. (write_export_file): $ifdef COLLECT_EXPORT_LIST. (write_import_file, resolve_lib_name): New functions. (use_import_list, ignore_library): Same. (collect_exit): maybe_unlink import_file and #ifdef. (handler): Same. (main): New variable importf, #ifdef exportf. Move parsing of -shared before general argument parsing. Resolve AIX library paths and import libgcc.a symbols. Treat .so shared libraries the same as objects and .a libraries. Create alias for object_lst and increment it instead of original pointer. Scan AIX libraries as objects earlier instead of using scan_libraries. Perform AIX tlink later to resolve templates instead of forking ld. (GCC_OK_SYMBOL): Ensure symbol not in undef section. (GCC_UNDEF_SYMBOL): New macro. (scan_prog_file): Loop for members of AIX libraries. Handle export/import of ctors/dtors. (aix_std_libs): New variable. (scan_libraries, XCOFF): Delete. Co-Authored-By: David Edelsohn <edelsohn@mhpcc.edu> From-SVN: r18133
* frame.h (__register_frame, [...]): New.Paul Eggert1997-12-201-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.h (__register_frame, __register_frame_table, __deregister_frame): New. * frame.c (__register_frame, __register_frame_table, __deregister_frame): New. * frame.c (__deregister_frame_info): Return void *. * frame.h (__deregister_frame_info): Ditto. * collect2.c (__deregister_frame_info): Ditto. * frame.h (__register_frame_info_table): Fix typo in declaration. * frame.c (__register_frame_info): Renamed from __register_frame. (__register_frame_info_table, __deregister_frame_info): Similarly. * frame.h (__{,de}register_frame_info): Likewise. (__register_frame_info_table): New declaration. * crtstuff.c (__do_global_dtors{,_aux}): Rename __deregister_frame. (frame_dummy, __do_global_ctors): Likewise for __register_frame. * collect2.c (write_c_file_{stat,glob}): Rename __register_frame to __register_frame_info and similarly for __deregister_frame and __register_frame_table. * collect2.c (write_c_file_glob): Allocate initial frame object in static storage and pass its address. * crtstuff.c (__do_global_ctors): Fix typo in last change. * crtstuff.c (__do_global_ctors): Add missing arg to __register_frame. * collect2.c (write_c_file_stat): Fix error in last change; use __SIZE_TYPE__, not size_t. Alter C startup code so that it doesn't invoke malloc on Solaris. * frame.h (struct object): Decl moved here from frame.c. * frame.c (struct object): Move decl to frame.h. ("frame.h"): Include after <stddef.h>, so that size_t is defined. (__register_frame, __register_frame_table, __deregister_frame): It's now the caller's responsibility to allocate storage for object. * crtstuff.c (frame_dummy), collect2.c (write_c_file_stat): Allocate initial frame object in static storage and pass its address. * crtstuff.c (<stddef.h>, "frame.h"): Include. * Makefile.in ($(T)crtbegin.o, $(T)crtend.o, stamp-crtS): Depend on defaults.h and frame.h. The oh so fun changes in __register_frame* interface stuff. Co-Authored-By: H.J. Lu <hjl@gnu.org> Co-Authored-By: Richard Kenner <kenner@vlsi1.ultra.nyu.edu> From-SVN: r17160
* dwarf2 EH supportJason Merrill1997-09-101-8/+71
| | | | From-SVN: r15255
* cccp.c (sys_errlist): Remove special 4.4bsd declaration.Jeffrey A Law1997-09-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | * cccp.c (sys_errlist): Remove special 4.4bsd declaration. * collect2.c (sys_errlist): Likewise. * cpplib.c (sys_errlist): Likewise. * gcc.c (sys_errlist): Likewise. * protoize (sys_errlist): Likewise. * configure.in: Check for strerror. * xm-freebsd.h (HAVE_STRERROR): Remove definition. * xm-gnu.h (HAVE_STRERROR): Likewise. * xm-linux.h (HAVE_STRERROR): Likewise. * xm-netbsd.h (HAVE_STRERROR): Likewise. * xm-bsd386.h (HAVE_STRERROR): Likewise. * xm-cygwin32.h (HAVE_STRERROR): Likewise. * xm-dos.h (HAVE_STRERROR): Likewise. * xm-mingw32.h (HAVE_STRERROR): Likewise. * xm-pa.h (HAVE_STRERROR): Likewise. * xm-papro.h (HAVE_STRERROR): Likewise. * xm-sysv4.h (HAVE_STRERROR): Likewise. * configure, config.in: Rebuilt. Remove the need to define HAVE_STRERROR for each host port. From-SVN: r15011
* collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.Jeffrey A Law1997-09-011-1/+1
| | | | | | | | | | | | | | * collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED. * mips-tfile.c: Likewise. * gcc.texi: DONT_DECLARE_SYS_SIGLIST: Remove docs. * xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition. * xm-freebsd.h, xm-bsd386.h, xm-sysv4.h, xm-sol2.h: Likewise. * configure.in: Check for sys_siglist declaration. * configure, config.in: Rebuilt. Fix conflicting sys_siglist decls once and for all. From-SVN: r15007
* * Integrate tlink patch from jason@cygnus.comJeffrey A Law1997-08-111-6/+9
| | | | | | | | | | | | | | | | | | | * gcc.c (SWITCH_TAKES_ARG): Add 'V', 'B' and 'b'. (process_command): Increment n_switches for them. Don't discard their args. Validate them. (main): Escape " marks when creating COLLECT_GCC_OPTIONS. From Rohan Lenard. (process_command): Set include_prefixes from COMPILER_PATH. (main): Set COLLECT_GCC_OPTIONS sooner. * confiugre.in: Link ../ld/ld.new to collect-ld rather than real-ld. * tlink.c, hash.c, hash.h: New files. * Makefile.in (USE_COLLECT2): Always use collect2. (collect2): Depend on and link in hash.o and tlink.o. (tlink.o, hash.o): Add dependencies. tlink patches from Jason. From-SVN: r14769
* xJason Merrill1997-06-171-0/+1
| | | | From-SVN: r14251
* xJason Merrill1997-06-101-24/+48
| | | | From-SVN: r14225
* (fatal_perror, fatal, collect_wait): Use FATAL_EXIT_CODE.Richard Kenner1997-04-131-4/+4
| | | | From-SVN: r13885
* collect2.c (write_c_file): Wrap the ctor/dtor lists and fns with `extern "C" ↵Brendan Kehoe1996-12-111-0/+2
| | | | | | | | | | { ... * collect2.c (write_c_file): Wrap the ctor/dtor lists and fns with `extern "C" { ... }', to avoid having the fn names mangled with the C++ driver. From-SVN: r13288
* (dump_file): Call fclose() for opened files.Richard Kenner1996-10-261-4/+3
| | | | From-SVN: r13033
* (at SUNOS4_SHARED_LIBRARIES): Fix reference to unistd.h.Richard Kenner1996-07-031-1/+1
| | | | From-SVN: r12392
* formatting tweaksMike Stump1996-07-031-47/+47
| | | | From-SVN: r12390
* formatting tweaksMike Stump1996-07-031-2/+2
| | | | From-SVN: r12387
* (handler): Delete export_file when we get a signal.Jim Wilson1996-04-241-0/+3
| | | | From-SVN: r11881
* collect2.c: #include "gansidecl.h".Doug Evans1996-04-151-58/+4
| | | | | | | | | | * collect2.c: #include "gansidecl.h". (const,PROTO): Delete. (P_tmpdir): Delete. (choose_temp_base): Declare as extern, delete internal copy. (main): Update call to choose_temp_base. From-SVN: r11789
* (main): Check new define DEFAULT_A_OUT_NAME.Richard Kenner1996-03-041-1/+5
| | | | From-SVN: r11426
* Never include wait.h.Richard Kenner1996-03-041-3/+0
| | | | From-SVN: r11405
* append / to AIX import path if not presentDavid Edelsohn1996-02-141-2/+6
| | | | From-SVN: r11275
* Fix recogniztion of import libraries under AIXMichael Meissner1996-01-071-42/+48
| | | | From-SVN: r10952
* remove auto_export functionality.Jason Merrill1995-12-301-12/+0
| | | | From-SVN: r10907
* (scan_libraries): cast lsyms' alloca() to LDSYM*.Richard Kenner1995-09-121-1/+1
| | | | From-SVN: r10324
* Fix spelling errors.Richard Kenner1995-08-281-1/+1
| | | | From-SVN: r10289
* (XCOFF_SCAN_LIBS): Define if OBJECT_FORMAT_COFF and XCOFF_DEBUGGING_FORMAT.Richard Kenner1995-07-291-1/+164
| | | | | | | (SCAN_LIBRARIES): Also define if XCOFF_SCAN_LIBS. (scan_libraries): Implement for AIX. From-SVN: r10207
* (end_file): Fix typo in error message text.Richard Kenner1995-07-261-1/+1
| | | | From-SVN: r10174
* (libcompare): Verify that file name extensions are valid.Richard Kenner1995-07-011-3/+26
| | | | | | Put files with invalid extensions last in the sort. From-SVN: r10103
* (locatelib): Fix parsing of LD_LIBRARY_PATH.Richard Kenner1995-06-221-1/+1
| | | | From-SVN: r10024
* (main): Unlink export_file before we return.Richard Kenner1995-06-221-0/+4
| | | | From-SVN: r10022
* Update FSF address.Richard Kenner1995-06-151-1/+2
| | | | From-SVN: r9959
* (main): Don't turn off auto_export because of -g.Richard Kenner1995-06-141-26/+40
| | | | | | | | | | | | | (main): Ignore the argument to -o. (main): Place o_file after an initial .o (like crt0.o). If we have LD_INIT_SWITCH, use init and fini functions for executables, too. Specify the unique function names. (write_c_file_stat): Fix the case of destructors but no constructors. Don't include the generic-named functions for executables. (write_c_file): If we have LD_INIT_SWITCH, always use write_c_file_stat. (main): Also add _GLOBAL__D? to export list. From-SVN: r9956
* (COFF scan_prog_file): Use the AIX duplicate entry.Richard Kenner1995-06-071-1/+1
| | | | From-SVN: r9898
* #include config.h before any other .h file.Richard Kenner1995-05-201-7/+6
| | | | From-SVN: r9756
* (strstr): Deleted.Richard Kenner1995-05-191-24/+0
| | | | From-SVN: r9746
* Fix typos in comments.Richard Kenner1995-05-161-1/+1
| | | | From-SVN: r9711
* Define strstr.Jason Merrill1995-05-161-0/+24
| | | | From-SVN: r9696
* AIX shared librariesJason Merrill1995-05-091-42/+113
| | | | From-SVN: r9595
* Make collect demangleJason Merrill1995-05-041-70/+195
| | | | From-SVN: r9573
* Removed __NetBSD__ from conditional.Richard Kenner1995-02-221-3/+7
| | | | | | | Declare strerror if HAVE_STRERROR is defined; otherwise declare sys_errlist and sys_nerr. From-SVN: r9043
* Update SunOS 4 codeJason Merrill1995-02-231-2/+43
| | | | From-SVN: r9041
* Fix collecting under AIXJason Merrill1995-02-131-7/+20
| | | | From-SVN: r8933
* Improve PA shlib supportJason Merrill1995-01-241-3/+9
| | | | From-SVN: r8792
* Shared library support.Jason Merrill1994-11-191-11/+554
| | | | From-SVN: r8519
* (add_to_list): Check for duplicates.Jason Merrill1994-10-201-5/+16
| | | | From-SVN: r8328
* (scan_prog_file): Call COLLECT_QUALIFY_MATCH to do target-specific checking ↵Jason Merrill1994-10-191-20/+17
| | | | | | | | | | of the suitability of a match. (scan_prog_file): Call COLLECT_QUALIFY_MATCH to do target-specific checking of the suitability of a match. (main): Check REAL_*_FILE_NAME first. From-SVN: r8317
* (my_strerror): If HAVE_STRERROR defined, call strerror.Richard Kenner1994-10-071-1/+7
| | | | From-SVN: r8239
* If the POSIX.1 wait macros are defined, use them.Ian Lance Taylor1994-10-041-8/+22
| | | | From-SVN: r8213
* (main): Ignore options in COLLECT_SUPPRESS_OPTIONSJason Merrill1994-09-281-1/+9
| | | | | | for the first link. From-SVN: r8153
* (main): Discard the first executable once we'veJason Merrill1994-09-221-0/+1
| | | | | | exploited it. From-SVN: r8122