aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
AgeCommit message (Collapse)AuthorFilesLines
1998-07-02 * ld.h (args_type): Add gc_sections.Richard Henderson1-1/+18
* ldgram.y (ldgram_had_keep, KEEP): New. (input_section_spec_no_keep): Rename from old input_section_spec. (input_section_spec): New. Recognize KEEP. * ldlang.c (wild_section): Handle keep sections. (lang_gc_wild_section, lang_gc_wild_file, lang_gc_wild): New. (lang_gc_sections_1, lang_gc_sections): New. (lang_process): Invoke lang_gc_sections. (lang_add_wild): Add keep argument. Update all callers. * ldlang.h (lang_wild_statement_struct): Add keep_sections. * ldlex.l (KEEP): Match it. * ldmain.c (main): Error on -r and --gc-sections. * lexsup.c: Add --gc-sections. * scripttempl/elf.sc: Merge .text.* etc sections appropriately. Mark startup sections with KEEP. * scripttempl/elfppc.sc: Likewise. * ld.texinfo: Update for --gc-sections and KEEP.
1998-05-14Added support for display emulation specific command line options.Nick Clifton1-1/+9
Added internationalisation to emulation templates. Added --support-old-code command line option to armcoff and pe emulations.
1998-04-22 * lexsup.c (parse_args): Change -l options into --library optionsIan Lance Taylor1-2/+28
to avoid confusion between -li and -library.
1998-04-22 * Many files: Added gettext invocations around user-visibleTom Tromey1-109/+193
strings. * ld.h: Added gettext-related includes and defines. * ldmain.c: Call setlocale, bindtextdomain, textdomain. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, HAVE_LC_MESSAGES): Define. * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and po/Makefile. Use AM_PROG_LEX. (TDIRS): AC_SUBST early on, to avoid having value split when it happens to cross line 90 of the generated sed script. * Makefile.am (SUBDIRS): New macro. (POTFILES): Likewise. (po/POTFILES.in): New target. (ld_new_LDADD): Added INTLLIBS. (ld_new_DEPENDENCIES): Added INTLDEPS. * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
1996-10-02 * lexsup.c (ld_options): Fix typo in --rpath-link description.Ian Lance Taylor1-1/+1
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Suggest --rpath if a needed library is not found.
1996-10-01 * ldver.c (ld_program_version): New variable.Ian Lance Taylor1-8/+37
(ldversion): Use it. * ldver.h (ld_program_version): Declare. * lexsup.c (ld_options): Handle --dll-verbose like --verbose, not --version. Change --version handling to match current GNU standards. (help): Print bug report address.
1996-04-22 * ldlang.c (lang_size_sections): If _cooked_size is not 0, thenIan Lance Taylor1-5/+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-09tweak last changeIan Lance Taylor1-6/+17
1996-04-09 * lexsup.c (ld_options): New static array.Ian Lance Taylor1-78/+338
(parse_args): Build shortopts and longopts from ld_options array. (help): New static function. * ldver.h (help): Don't declare. * ldver.c (ldversion): Reindent. (help): Remove.
1996-04-08 * lexsup.c (parse_args): Add -E as a synonym for -export-dynamic,Ian Lance Taylor1-1/+3
for HP/UX compatibility.
1996-03-20 * ldmain.c (add_wrap): New function.Ian Lance Taylor1-12/+1
* ldmain.h (add_wrap): Declare. * lexsup.c (parse_args): Call add_wrap.
1996-03-12 * lexsup.c (parse_args): Handle --wrap.Ian Lance Taylor1-2/+16
* ldmain.c (main): Initialize link_info.wrap_hash. * ldexp.c (fold_name): Use bfd_wrapped_link_hash_lookup in DEFINED and NAME cases. * ld.texinfo, ld.1: Document --wrap.
1996-03-12Tue Mar 12 12:43:59 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>Ian Lance Taylor1-2/+7
* ld.h (ld_config_type): Add warn_multiple_gp field. * lexsup.c (parse_args): Handle --warn-multiple-gp. * ldmain.c (warning_callback): Suppress multiple gp values warning if --warn_multiple_gp was not used. * ld.texinfo, ld.1: Document --warn-multiple-gp.
1996-02-27 * lexsup.c (parse_args): Recognize --no-whole-archive.Ian Lance Taylor1-16/+30
* 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.
1995-09-28 * ld.h (parsing_defsym): Declare.Ian Lance Taylor1-0/+6
* ldlex.h (lex_string): Declare. * ldlex.l (lex_string): Define. * lexsup.c (parsing_defsym): Define. (parse_args): In OPTION_DEFSYM case, set lex_string before calling lex_redirect, and clear it after calling yyparse. Set parsing_defsym around call to yyparse. * ldmain.c (main): Set lex_string before calling lex_redirect, and clear it after calling yyparse. * ldmisc.c (vfinfo): For %S, handle --defsym arguments and built in linker scripts correctly. PR 8092.
1995-09-28 * lexsup.c (parse_args): Handle -assert.Ian Lance Taylor1-172/+43
* emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Define. * emultempl/sunos.em (gld${EMULATION_NAME}_get_script): Use the shared library script when appropriate. * scripttempl/aout.sc: If CREATE_SHLIB is set, start the .text section at SIZEOF_HEADERS.
1995-08-22 * ldmain.c (main): Remove PE stuff.Steve Chamberlain1-88/+152
* lexsup.c (options): Load more PE options. (set_pe_value): New function.
1995-08-16 * lexsup.c (parse_args): Accept -h as a synonym for --soname, forIan Lance Taylor1-3/+9
Solaris compatibility.
1995-07-10 * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, andIan Lance Taylor1-1/+6
-shared. Mon Jul 10 13:29:43 1995 Eric Youngdale <eric@aib.com> * ldmain.c (main): Set link_info.symbolic to false. * lexsup.c (parse_args): Handle -Bsymbolic.
1995-07-07fsf address update, but not in COPYING filesKen Raeburn1-1/+1
1995-07-03 * lexsup.c (parse_args): Let -G either set the small data size orIan Lance Taylor1-1/+25
be equivalent to --shared, depending on the next argument. Accept and ignore -z for Solaris compatibility. PR 7118.
1995-07-02 * lexsup.c (parse_args): Cast fopen result to PTR before storingIan Lance Taylor1-6/+7
it in link_info.base_file. Fix indentation.
1995-06-29Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-7/+156
* ldmain.c (main): Always initialize PE info in link_info. * lexsup.c (OPTION_BASE_FILE): New option. (parse_args): Handle new option. * emulparams/armpe.sh: Output pei. * emultempl/i386pe.em: Add newline to end. * scripttempl/armpe.sc: Change output and quote the $s. * scripttempl/i386pe.sc: Change output and quote the $s.
1994-09-20 * ld.h (args_type): Add new field endian.Ian Lance Taylor1-7/+3
* lexsup.c (parse_args): Handle -EB and -EL by setting command_line.endian. * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments. * ldlang.c (lang_add_output_format): Add arguments big and little. If command_line.endian is set, use it to select big or little rather than the default. Changed all callers. * ldlang.h (lang_add_output_format): Update declaration. * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and LITTLE_OUTPUT_FORMAT. * emulparams/elf32mipl.sh: Likewise. * emulparams/mipsbig.sh: Likewise. * emulparams/mipsbsd.sh: Likewise. * emulparams/mipsidt.sh: Likewise. * emulparams/mipsidtl.sh: Likewise. * emulparams/mipslit.sh: Likewise. * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and LITTLE_OUTPUT_FORMAT if not already defined. Pass them to OUTPUT_FORMAT. * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT. * scripttempl/mipsbsd.sc: Likewise.
1994-09-14 * ld.h (ld_config_type): Add new field warn_once.Ian Lance Taylor1-5/+54
* ldmain.c (undefined_symbol): Handle -warn-once. * lexsup.c (parse_args): Recognize -warn-once. * ld.texinfo (Options): Document -warn-once. * ld.1: Likewise. PR 4456.
1994-07-08 * lexsup.c (parse_args): Changed "retain-symbols-file" fromIan Lance Taylor1-6/+40
no_argument to required_argument. From djm.
1994-06-15 * lexsup.c (parse_args): Accept -static as a synonym forIan Lance Taylor1-0/+1
-non_shared.
1994-06-15 * ldmain.c (get_emulation): Ignore -m486 for Linux compatibility.Ian Lance Taylor1-0/+1
* lexsup.c (parse_args): Ignore -qmagic for Linux compatibility.
1994-06-15 Let the user change the dynamic linker used by ELF code.Ian Lance Taylor1-1/+6
* ld.h (args_type): Add new field interpreter. * lexsup.c (parse_args): Add dynamic-linker to longopts, and handle it. * ldmain.c (main): Initialize command_line.interpreter to NULL. * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get the ELF backend to return the .interp section. If command_line.interpreter is not NULL, set the contents of .interp to it. * ld.texinfo: Mention -dynamic-linker.
1994-06-15 * lexsup.c (parse_args): Sort out the option macros and change theIan Lance Taylor1-22/+23
definitions to make it easier to add a new option.
1994-06-15 * ld.h (ld_config_type): Add new field traditional_format.Ian Lance Taylor1-3/+8
* 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-13 * lexsup.c (parse_args): Treat -i as a synonym for -r.Ian Lance Taylor1-0/+1
1994-06-02 * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdlineIan Lance Taylor1-2/+2
field. (search_head): Declare. (ldfile_add_library_path): Add new cmdline argument in prototype. * ldfile.c (search_head): Make non-static. (search_dirs_type): Move to ldfile.h. (ldfile_add_library_path): Accept cmdline argument, and save it. * lexsup.c (parse_args): Pass true for new cmdline argument of ldfile_add_library_path. (set_default_dirlist): Likewise. * ldmain.c (check_for_scripts_dir): Pass false for new cmdline argument of ldfile_add_library_path. * ldgram.y (ifile_p1): Likewise.
1994-05-27 * ldlang.c (entry_symbol): Make static.Ian Lance Taylor1-1/+1
(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-19 Add support for ELF shared libraries.Ian Lance Taylor1-23/+32
* ld.h (ld_config_type): Add field dynamic_link. * ldmain.c (main): Initialize config.dynamic_link to false. Warn on attempts to use -r with -relax, -call_shared or -s. * lexsup.c (longopts): Separate OPTION_CALL_SHARED from OPTION_NON_SHARED. Add OPTION_IGNORE. Adjust macro values accordingly. Add "dy" and "non_shared" options. Change "Qy" to OPTION_IGNORE for now. Handle OPTION_CALL_SHARED and OPTION_NON_SHARED by setting dynamic_link field accordingly. Handle OPTION_IGNORE by ignoring it. Clear dynamic_link field for -r and -Ur. * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try opening a file with a .so extension first. * emultempl/elf32.em: New file. * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000. (NONPAGED_TEXT_START_ADDR): Likewise. (TEMPLATE_NAME): Define as elf32. (DATA_PLT): Define. * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32. * scripttempl/elf.sc: Add placement for new dynamic sections. Don't use CREATE_OBJECT_SYMBOLS. Define _etext, _edata and _end outside of any section. Don't use ALIGN(8); just let one section VMA follow another. Put .dynbss in .bss. Don't mention debugging sections; they'll be handled correctly anyhow. * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
1994-02-26 * ldgram.y (dirlist_ptr): Removed; not used.Ian Lance Taylor1-0/+1
* lexsup.c: Include ldver.h. * Makefile.in: Rebuilt dependencies.
1994-02-25Add missing newline in einfo message.David MacKenzie1-1/+1
1994-02-25 * lexsup.c (parse_args): Use symbolic numbers for long options.David MacKenzie1-51/+74
Fix misunderstanding in -Y and -call_shared et al.
1994-02-25 Use getopt instead of lex and yacc to parse the command line.David MacKenzie1-0/+322
* ld.texinfo (Options): Document changes to option syntax. * Makefile.in: Update dependencies. * ldver.c (help): Tweak dashes in usage message. * ldgram.y (%union): Remove unused members. Remove %tokens for command line options; add ones for input types. (command_line): Rules removed. (file): Instead of command line, recognize an input type indicator, then use the nonterminal for that type. (defsym_expr): New nonterminal from code formerly in command_line. * ldlex.h: Declare parser input type enum and variable. Don't declare parse_line. * ldlex.l: Remove unused variables. Make some used ones static and comment them. (COMMAND): Start state and its rules removed. At start of yylex, return input state token if at start of input. (lex_redirect): Don't need to set yyout. (ldlex_command): Function removed. * ldmain.c (main): Instead of calling parse_line, set up the redirections and call yyparse directly. * ldmisc.c (vfinfo): If there's no input filename, print nothing, not "command line". * lexsup.c: Remove #if 0'd code. (parse_line): Function removed. (parse_args): Rewrite to use getopt_long_only. (set_default_dirlist): New function from code formerly in ldgram.y:command_line. (set_section_start): New function. * emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em, emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose compiled-in link scripts in "{" and "}", as the grammar no longer wants them to be.