aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
AgeCommit message (Collapse)AuthorFilesLines
1996-04-22 * ldlang.c (lang_size_sections): If _cooked_size is not 0, thenIan Lance Taylor1-2/+5
don't clobber it when not relaxing. * ld.h (ld_config_type): Remove traditional_format field. * ldmain.c (main): Use link_info.traditional_format rather than config.traditional_format. * ldlang.c (ldlang_open_output): Likewise. * lexsup.c (parse_args): Likewise. * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise. * mpw-eppcmac.c (gldppcmacos_parse_args): Likewise.
1996-04-22 * ldlang.c (wild_doit): Discard debugging sections if we areIan Lance Taylor1-1/+10
stripping debugging information.
1996-04-01 * ldlang.c (lang_size_sections): Change region check to handleIan Lance Taylor1-3/+3
regions which end at the highest possible address correctly. From Roland Weber <roweber@ira.uka.de>.
1996-04-01 * ldlang.c (section_already_linked): New static function.Ian Lance Taylor1-8/+117
(wild_doit): Discard sections with SEC_EXCLUDE set if not doing a relocateable link. Don't worry about section being NULL, since it never should be. Don't call init_os unless the section is going to be added. (ldlang_add_file): Call section_already_linked for each section. * ldmain.c (multiple_definition): Don't warn about multiple definitions in sections which are being discarded.
1996-03-27 * ld.h (DISCARD_SECTION_NAME): Define to "/DISCARD/".Ian Lance Taylor1-6/+20
* ldlang.c (init_os): Fail on an attempt to initialize any section named DISCARD_SECTION_NAME. (wild_doit): Discard input sections assigned to an output section named DISCARD_SECTION_NAME. * ld.texinfo: Document use of /DISCARD/.
1996-03-27 * ldlang.c: Fix some indentation and comments.Ian Lance Taylor1-69/+71
1996-03-04 * ldlang.c (wild): Handle foo.a(.text) by mapping each includedIan Lance Taylor1-1/+28
member of foo.a separately. From Jouke Numan <jnuman@bazis.nl>.
1996-02-27 * lexsup.c (parse_args): Recognize --no-whole-archive.Ian Lance Taylor1-1/+2
* ldlang.h (lang_input_statement_type): Add whole_archive field. * ldlang.c (new_afile): Set whole_archive field. (load_symbols): Check input file specific whole_archive field rather than global variable. * ld.texinfo, ld.1: Document --no-whole-archive. PR 9094.
1996-02-14Wed Feb 14 16:38:36 1996 Martin Anantharaman ↵Ian Lance Taylor1-1/+4
<martin@mail.imech.uni-duisburg.de> * ldlang.c (lang_set_startof): Don't do anything for a relocateable link. * ldgram.y (mri_script_file): Call mri_draw_tree. * mri.c (mri_draw_tree): Make globally visible. Don't bother to create memory regions. (mri_load): Don't call mri_draw_tree. * mri.h (mri_draw_tree): Declare. * configure.tgt (m68*-*-psos): New target. * emulparams/m68kpsos.sh: New file. * scripttempl/psos.sc: New file. * Makefile.in (ALL_EMULATIONS): Add em68kpsos.o. (em68kpsos.c): New target.
1996-02-09 * ldlang.c (lang_size_sections): Increment the section size when aIan Lance Taylor1-82/+150
padding statement is encountered. PR 8965.
1995-12-01 * ldgram.y (PHDRS): New token.Ian Lance Taylor1-2/+147
(ifile_p1): Accept phdrs. (section): Accept phdr_opt at the end of the section definition. (phdr_op): New nonterminal. (phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise. * ldlex.l: Accept PHDRS. * ldlang.h (struct lang_output_section_phdr_list): Define. (lang_output_section_statement_type): Add phdrs field. (struct lang_phdr): Define. (LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define. (lang_new_phdr): Declare. * ldlang.c (lang_phdr_list): New static variable. (lang_output_section_statement_lookup): Initialize phdrs field. (lang_process): Call lang_record_phdrs. (lang_new_phdr): New function. (lang_section_in_phdr): New function. (lang_record_phdrs): New static function. * ld.texinfo: Document PHDRS.
1995-10-04 * ldexp.c (exp_get_abs_int): Return bfd_vma, not int.Ian Lance Taylor1-15/+22
* ldexp.h (exp_get_abs_int): Update declaration. * ldlang.c (print_output_section_statement): Use fprintf_vma to print return value of exp_get_abs_int. PR 8142.
1995-09-07 * configure.host (sparc-*-sunos64*): Remove.Ian Lance Taylor1-3/+16
* ldlang.c (lang_map): Check BFD64, not HOST_64_BIT.
1995-08-16 * ldlang.c (lang_set_startof): New static function.Ian Lance Taylor1-9/+59
(lang_process): Call it.
1995-07-07fsf address update, but not in COPYING filesKen Raeburn1-2/+3
1995-05-12Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-0/+23
Tom Griest <griest@cs.yale.edu> Initial support for PE executables (eg NT, win32) * Makefile.in (configure.in, ei386pe): Add support. * ldmain.c (main): Initialize PE argument info. * ldwrite.c (print_file_stuff): Don't print out .drectve and .debug section info. * lexsup.c (set_subsystem, set_stack_heap, OPTION_HEAP, OPTION_SUBSYSTEM, parse_argsm set_subsystem, set_stack_heap): Handle new arguments. * config/i386-pe.mt, emultempl/i386pe.em, scripttempl/i386pe.sc: New files
1995-05-03* ldlang.c (print_output_section_statement): Check subsection_alignment,Ken Raeburn1-5/+4
instead of checking section_alignment twice. Noticed by Alan Modra <alan@spri.levels.unisa.edu.au>.
1995-03-18 * ldlang.c (load_symbols): An empty is archive is OK.Ian Lance Taylor1-4/+37
1995-02-06 * ldctor.c (ldctor_build_sets): Handle bfd_link_hah_defweak.Ian Lance Taylor1-2/+4
* ldexp.c (fold_name): Likewise. * ldlang.c (print_one_symbol): Likewise. (lang_finish): Likewise. * ldmain.c (multiple_common): Likewise. * ldwrite.c (print_symbol): Likewise. Also, bfd_link_hash_weak renamed to bfd_link_hash_undefweak.
1995-02-01 * ldlang.c (lang_size_sections): Clarify error message when userDavid Edelsohn1-25/+37
specified start addr conflicts with region. Fix resetting of region pointer.
1995-01-12Don't use const with reloc_howto_type, since it's now defined to be const.Ken Raeburn1-2/+9
1994-11-09 * ldlang.c (lang_one_common): Set SEC_ALLOC in any section whereIan Lance Taylor1-0/+3
we allocate common symbols.
1994-11-08 * ldlang.c (load_symbols): Add new argument place. Only acceptIan Lance Taylor1-8/+39
linker scripts if place is not NULL. Put commands found in an assumed linker script into place. (lookup_name): Pass NULL as place argument to load_symbols. (open_input_bfds): In lang_input_statement_enum case, pass a place argument to load_symbols, and store any new statements after the current one. PR 5917.
1994-09-14Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)Steve Chamberlain1-2/+7
* ldlang.c (lang_do_assignments): Make sure output statement has an attached bfd_section before trying to dereference it.
1994-09-14 * ldlang.c (print_output_section_statement): Print all linesSteve Chamberlain1-6/+6
to the map file.
1994-09-13 * ldlang.c (load_symbols): Check for archive before object. UseIan Lance Taylor1-53/+60
bfd_check_format_matches, and, if ambiguous, print a list of matching formats. If file format is not recognized, treat file as a linker script. * ldgram.y (yyerror): If assuming an object file is a script, mention that. Tweak the format of the error messages. * ldlex.l (lex_warn_invalid): If assuming an object is a script, guess that this is not actually a script, and just report that the file format was not recognized. * ld.texinfo (Options): Admit that -( may be used more than once. Add note that unrecognized object files are now treated as linker scripts. * ldfile.c (ldfile_input_filename): Make const. (ldfile_assumed_script): New variable. (try_open): Change arguments types to const. (ldfile_find_command_file): Likewise. (ldfile_open_command_file): Likewise. Also, set lineno to 1. * ldfile.h: Update declarations for ldfile.c changes. * ldlex.l: Include <ctype.h>. (file_name_stack): Change to be const char *. (lineno_stack): New static variable. (<<EOF>>): Set lineno as well as ldfile_input_filename. (lex_push_file): Make name argument const. Initialize lineno_stack entry. (lex_redirect): Initialize lineno_stack entry. (lex_warn_invalid): Handle non printable characters nicely. * ldlex.h (lex_push_file): Declare second argument as const. * ldgram.y (ifile_p1): Recognize GROUP. * ldlex.l: Recognize GROUP. * ld.texinfo (Option Commands): Document GROUP.
1994-07-22 * ldlang.c (lang_common): Pass desired alignment toIan Lance Taylor1-33/+8
lang_one_common as power of two. (lang_one_common): Get common symbol alignment from linker hash table entry. Treat desired alignment as a power of two.
1994-07-22 * ldlang.c (wild_section): Attach all section with the given name,Ian Lance Taylor1-52/+146
not just the first one. If there is no name, attach all sections even if the SEC_IS_COMMON flag is set.
1994-06-22 * ldlang.c (end_of_data_section_statement_list): Don't define.Ian Lance Taylor1-13/+0
(lang_leave_output_section_statement): Don't set obsolete variable end_of_data_section_statement_list.
1994-06-22 * ldlang.c (lang_size_sections): Adjust current region addressIan Lance Taylor1-11/+12
even for sections with an explicit address. From ralphc@pyramid.com (Ralph Campbell).
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