aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
AgeCommit message (Collapse)AuthorFilesLines
1994-06-15 * ld.h (ld_config_type): Add new field traditional_format.Ian Lance Taylor1-0/+4
* lexsup.c (parse_args): Add traditional_format to longopts, and handle it. * ldmain.c (main): Initialize config.traditional_format to false. * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD flags of output_bfd according to config.traditional_format. * ld.texinfo: Document -traditional-format.
1994-06-09 * ldlang.c (map_input_to_output_sections): For lang_address, callIan Lance Taylor1-7/+4
init_os if it hasn't already been called.
1994-06-02 * ldlang.c: Minor formatting cleanups.Ian Lance Taylor1-20/+18
(lang_for_each_input_file): New function. * ldlang.h (lang_for_each_input_file): Declare.
1994-06-01 * ldlang.h (lang_input_statement_type): Remove fields subfiles,Ian Lance Taylor1-1/+0
total_size, superfile and chain. * ldfile.c (open_a): Don't clear search_dirs_flag. (ldfile_open_file): Don't try to open superfile. Assert that file has not already been opened. * ldlang.c (new_afile): Don't initialize superfile. * ldmain.c (add_archive_element): Don't initialize subfiles or chain or superfile. Initialize search_dirs_flag to false.
1994-05-27 * ldlang.c (entry_symbol): Make static.Ian Lance Taylor1-4/+17
(lang_add_entry): Add cmdline argument. * ldlang.h (lang_add_entry): Change prototype. * ldgram.y (statement_anywhere): Change lang_add_entry call. * lexsup.c (parse_args): Likewise.
1994-05-27 * ldlang.c (lang_add_entry): Only set the entry symbol if it hasIan Lance Taylor1-1/+2
not been set already.
1994-05-13 * ldlang.c (print_output_section_statement): Change ``no attachedIan Lance Taylor1-5/+9
output section'' message slightly. (lang_do_assignments): Don't recurse down if there is no real section.
1994-05-11 Don't create unnecessary output sections.Ian Lance Taylor1-47/+22
* ldlang.c (out_bfd_get_section_by_name): Remove. (wild_section): Call bfd_get_section_by_name rather than our_bfd_get_section_by_name. Don't call wild_doit if there is no section. (lang_create_output_section_statements): Remove. (map_input_to_output_sections): For several cases, call init_os if it has not already been called. (lang_size_sections): If output section was not created, skip it. (lang_process): Don't call lan_create_output_section_statements. (lang_place_orphans): Skip files with just_syms_flags set to true. * ld.texinfo: Document change.
1994-05-10 * ldlang.c (wild_doit): Don't bother initializing the vma andIan Lance Taylor1-45/+60
section size. Don't special case SEC_SHARED_LIBRARY. (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections specially.
1994-04-25 * ldlang.c (lang_size_sections): When no address is given for aIan Lance Taylor1-0/+2
section, align it according to its requirements.
1994-04-15 * ldlang.c (lang_size_sections): When relaxing, adjust theIan Lance Taylor1-1/+13
position of a padding statement, and adjust dot accordingly.
1994-03-25 * ldlang.c (print_input_section): For section size, useIan Lance Taylor1-11/+8
_cooked_size if it is non-zero, size otherwise. (size_input_section): Likewise. (lang_do_assignments): Likewise (case lang_input_section_enum).
1994-03-24 * ldlang.c (new_afile): Add new argument add_to_list. Don't setIan Lance Taylor1-112/+93
real to true for lang_input_file_is_marker_enum. Clear the_bfd. (lang_add_input_file): Pass true to new_afile for add_to_list. (lookup_name): Remove force_load argument. Changed all callers. Pass false to new_afile for add_to_list. Split loading of symbols out into separate function. (load_symbols): New function split out of lookup_name. Don't load the symbols if they are already loaded. (open_input_bfds): For lang_input_statement_enum call load_symbols rather than lookup_name. (lang_process): Pass abs_output_section rather than NULL to lang_size_sections. (lang_startup): Set real field of first_file to true.
1994-03-22 Changes to make -Ur work again.Ian Lance Taylor1-3/+98
* ldmain.c (add_to_set): Now takes reloc argument rather than bitsize. Check config.build_constructors here. If an new hash table entry is created, mark it as undefined. (constructor_callback): No longer takes bitsize argument. Pass BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the BFD backend supports it. (reloc_overflow): Handle a NULL abfd argument. (reloc_dangerous, unattached_reloc): Likewise. * ldctor.c: Include ldmain.h. (struct set_info): Change bitsize field to reloc. (ldctor_add_set_entry): Now takes reloc argument rather than bitsize. Don't bother to check config.build_constructors here. (ldctor_build_sets): Get the size from the reloc howto. If generating relocateable output, call lang_add_reloc rather than lang_add_data. * ldctor.h (ldctor_add_set_entry): Change declaration to use reloc instead of bitsize. * ldlang.h (statement_enum): Add lang_reloc_statement_enum. (lang_reloc_statement_type): New structure. (lang_statement_union_type): Add reloc_statement field. (lang_add_reloc): Declare new function. * ldlang.c (lang_for_each_statement_worker): Handle lang_reloc_statement_enum. (map_input_to_output_sections, print_statement): Likewise. (lang_size_sections, lang_do_assignments): Likewise. (print_reloc_statement): New function. (lang_add_reloc): New function. * ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
1994-02-28Mon Feb 28 10:59:14 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-1/+1
* ldlang.c (cat): Define using ANSI style if ALMOST_STDC defined.
1994-02-26 * ldmain.c (write_map): Don't define. Removed all references.Ian Lance Taylor1-1/+1
Just use map_file or map_filename instead. (add_archive_element): Use minfo to write map information, not info_msg. (constructor_callback): Use fprintf to write map information, not info_msg. * ldmain.h (write_map): Don't declare. * ldgram.y (mri_script_command): Removed reference to write_map. * ldlang.c (lang_one_common): Likewise. * lexsup.c (parse_args): Likewise.
1994-02-26Fri Feb 25 18:55:54 1994 Ted Lemon (mellon@pepper.ncd.com)Ian Lance Taylor1-2/+1
* ldlang.c (lookup_name): don't call bfd_set_gp_size. (ldlang_add_file): call it here instead.
1994-02-25 * ldlang.c (lang_size_sections): No longer static (PA ELF callsJeff Law1-18/+3
it via hppaelf_finish). Prototype moved into ldlang.h. (lang_process): Move problematic extra call to lang_size_sections into the PA ELF specific code. * emultempl/hppaelf.em (hppaelf_finish): Extra call to lang_size_sections moved here.
1994-02-22 * ldlang.h (largest_section): Don't declare.Ian Lance Taylor1-10/+0
* ldlang.c (largest_section): Don't define. (size_input_section): Don't set largest_section; not used.
1994-02-21 * ldlang.c (new_afile): Pass NULL as last argument to concat.Ian Lance Taylor1-1/+1
1994-02-17 * ldlang.c, ldmain.c: Include libiberty.h.Ian Lance Taylor1-0/+1
1994-02-17 * ldlang.c, ldmain.c, ldmisc.c: Use bfd_get_error andDavid MacKenzie1-3/+3
bfd_set_error and new error names.
1994-02-16(lang_size_sections): Clear bfd_error before calling bfd_relax_section, in caseKen Raeburn1-7/+13
it returns false but doesn't flag an error. If an error is returned, indicate which one it is in the error message.
1994-02-05 * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): FunctionsDavid MacKenzie1-3/+3
deleted; will use libiberty versions instead. * ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c mri.c Makefile.in: Change callers. * ldmisc.c (vfinfo): Remove cleanup code. * ldmain.c (remove_output): Put it here (new function). (preserve_output): New function. (main): Register remove_output and preserve_output with atexit. * ldmain.c ldgram.y: Call xexit instead of exit. * ldmisc.h: Declare xexit.
1994-01-28Thu Jan 27 17:19:54 1994 Steve Chamberlain (sac@jonny.cygnus.com)Steve Chamberlain1-29/+24
* ldlang.c (print_one_symbol, print_input_section): Print global symbols in symbol table again.
1994-01-24 * ldlang.c (lookup_name): Set BFD GP size to -G argument valueIan Lance Taylor1-0/+2
after opening BFD.
1994-01-24 * ldlang.c (relaxing): Removed global variable.Ian Lance Taylor1-5/+21
(lang_size_sections): If the canonical symbols have not already been read in, read them in before relaxing. * ldlang.h (relaxing): Removed declaration.
1994-01-21 * ldlang.c (new_afile): Initialize loaded field to false.Ian Lance Taylor1-3/+23
(lookup_name): If file was already loaded, don't call the add_symbols entry point again.
1994-01-06 * ld.h (QUAD_SIZE): Define.Ian Lance Taylor1-362/+253
* ldgram.y (QUAD): New token. (length): Handle it. * ldlex.l: Return QUAD. * lexsup.c (keywords): Add QUAD. * ldwrite.c (build_link_order): Handle QUAD. * ldlang.c (print_data_statement): Handle QUAD. (lang_size_sections): Likewise. (lang_do_assignments): Likewise. * ldexp.c (exp_print_token): Add QUAD to table. * ld.texinfo: Describe QUAD.
1993-12-12More gcc lint.Ian Lance Taylor1-58/+135
1993-12-11 Made many changes to eliminate gcc warnings. Made variousIan Lance Taylor1-31/+8
cosmetic changes, declared various things in header files, removed various extern declarations from .c files. No substantive changes.
1993-12-11 * ldlang.c (lang_process): Ifdef out final call toIan Lance Taylor1-16/+24
lang_size_sections again (reverting change of Nove 2), since it breaks the Sun4 linker.
1993-11-02 * ldlang.c (lang_process): Re-enable last call lang_size_sections.Jeff Law1-34/+32
Pass abs_output_section rather than NULL to avoid invalidating absolute symbols.
1993-10-01 * ldlang.c (lang_add_input_file): If it's a library brought in byRob Savoye1-10/+16
INPUT(), then change the file type to lang_input_file_is_l_enum. * ldgram.y: In input_list, change lang_input_file_is_file_enum to lang_input_file_is_search_file_enum so objects brought in using INPUT() do a path lookup.
1993-08-24define BYTE_SIZE, SHORT_SIZE, and LONG_SIZE which are no longer in bfd.h.K. Richard Pixley1-0/+5
1993-08-17 * ldlang.c (open_output, lang_check): Check return value ofIan Lance Taylor1-41/+30
bfd_set_arch_mach.
1993-07-12 * ldlang.c (lang_process): Use sizeof instead of magic constant.David MacKenzie1-1/+2
* ldmain.c (get_emulation, check_for_scripts_dir, set_scripts_dir): New functions. (main): Call them.
1993-07-08(new_stetement): Size argument is now type size_t.Ken Raeburn1-1/+5
Added forward declaration with prototype.
1993-07-05 * ldlang.c (lang_relocate_globals): Skip indirect symbols, whichIan Lance Taylor1-0/+4
now have a non NULL srefs_chain.
1993-07-03 * ldmain.c (main): Don't add scriptdir to the lib search path.David MacKenzie1-6/+7
* genscripts.sh: Put the scripts in the ldscripts directory, not emulations. * configure.in (ldscripts): Make, instead of emulations. * Makefile.in (scriptdir): Take off the "ld" part. (install, clean, distclean): Use ldscripts, not emulations. In tests, pass -L., not -Lemulations. (ldmain.o): Don't pass -DSCRIPTDIR=.... * ldlang.c (lang_process): Add "ldscripts/" to the name of the default script file.
1993-06-17 * ldfile.c (ldfile_open_command): Don't try .ld extension.David MacKenzie1-213/+216
It wasn't documented (or likely used) and wastes time. (try_open): If EXTEN is empty, don't try it. * ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c, ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c, ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls with normal function declarations. * Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh. Move *.sc-sh to scripttempl/*.sc. * {emultempl,emulparams,scripttempl}/README: New files. * sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files removed, replaced with generic.em. * h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from h8[35]00hms.s[ch]. Change their contents to omit the "hms". * *.em (*_get_script): Return script name instead of script contents. * ldlang.c (lang_process): Change caller. * ldlex.l, ldgram.y: Recognize -m option. Check for input files after *all* options in grammar. * ldmain.c (main): Check for -m options. Add default directory for -m. * mkscript.c: File removed. * genscripts.sh: Take two more parameters, tooldirlib and libdir, to add to the default LIB_PATH. Look for input files in the new subdirectories. Create the scripts in emulations subdirectory and don't filter them through mkscript. * configure.in: Make the emulations subdirectory. * Makefile.in: Account for all of the above changes. Remove unused .SUFFIXES. Get libgcc.a path with gcc -print-libgcc-file-name instead of $(libdir)/libgcc.a. Put CFLAGS last in the compilation rules. Add -I../bfd to INCLUDES so sysdep.h is found. * ldfile.c (try_open): If opening without the extension fails, try with the extension even if -v or -V was given. had_script is imported (from ldgram.y), not exported.
1993-04-02 * ldlang.c (lang_output_section_statement_lookup): Initialize allIan Lance Taylor1-0/+8
fields of newly created structure.
1993-03-30 Support for linking and loading at different places:Steve Chamberlain1-13/+33
* ldlex.l: Add "AT" keyword. * ldgram.y: Cleanup, and parse AT. * ldlang.c (print_output_section_statement): Print output address of section in map. (lang_size_sections): Fill sections' lma with load address. * ldlang.h (lang_output_section_statement_type): Add load_base information.
1993-03-30Tue Mar 30 09:40:25 1993 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-23/+56
* ldindr.c (add_indirect): Keep more information in the alias symbol chain. * ldlang.c (wild_doit): Don't inherit NEVER_LOAD section attribute from an input section. * ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by default. (Q_enter_file_symbos): Indirect symbols now are known by their section, not a special symbol flag. * ldsym.c (write_file_locals): Indirect symbols aren't local. (write_file_globals): Write the mapping for an indirect symbol. * relax.c (build_it): When forced to write a NEVER_LOAD section, fill it with zeros.
1992-11-21* ldctor.h, lderror.h, ldexp.h, ldfile.h, ldindr.h, ldlang.c,John Gilmore1-43/+91
ldlang.h, ldlex.h, ldmain.h, ldmisc.h, ldsym.h, ldver.h, ldwarn.h, ldwrite.h, relax.h: Replace all uses of EXFUN and PROTO ansi-glue macros with PARAMS. Recreational cleanup. Update copyrights.
1992-10-26Added \n to error message.Ian Lance Taylor1-1/+1
1992-10-19Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-0/+14
* Support for i386-sysv. configure.in: check for i386-*-sysv* and i386-*-sco*. i386coff.sc-sh: rewrote to support SVR3 by default. ldctor.c (find_constructors): preserve stat_ptr. ldlang.c (wild_doit): initialize vma and size of new output section to corresponding input section. This is required for shared library support. (lang_size_sections): don't modify vma and size of sections which are never loaded (for shared libraries). ldwrite.c (copy_and_relocate): copy the contents of any section which has contents, not just sections which are loaded (for shared libraries).
1992-10-15 * ldlang.c (size_input_section): count the sizes of all sectionsSteve Chamberlain1-1/+1
we allocate.
1992-10-06Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-1/+14
* ldlang.c (lang_finish): don't warn if -e start symbol does not exist when linking with -r.
1992-09-25Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-22/+32
Added initial support for the z8k * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files * configure.in, Makefile.in: modified to reflect above * ldlang.c (lang_check): when linking conflicting architectures, make the output file reflect at least one of the bad inputs.