aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
AgeCommit message (Collapse)AuthorFilesLines
2002-08-08Check symbols with undefine version.H.J. Lu1-1/+7
2002-05-222002-05-21 H.J. Lu (hjl@gnu.org)H.J. Lu1-1/+7
* emultempl/elf32.em (gld${EMULATION_NAME}_parse_args): Handle "-z muldefs". (gld${EMULATION_NAME}_list_options): Add "-z muldefs". * ld.texinfo: Updated for --allow-multiple-definition and "-z muldefs". * ldmain.c (main): Initialize the allow_multiple_definition field to false. * lexsup.c (OPTION_ALLOW_MULTIPLE_DEFINITION): New. (ld_options): Add --allow-multiple-definition. (parse_args): Support OPTION_ALLOW_MULTIPLE_DEFINITION.
2002-05-03 * ld.h: Fix formatting.Kazu Hirata1-5/+5
* ldexp.c: Likewise. * ldfile.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * lexsup.c: Likewise. * pe-dll.c: Likewise.
2002-02-112002-02-10 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-7/+0
* lexsup.c: Remove strtoul declaration.
2002-02-102002-02-10 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+4
* ldmain.c: Add prototype for main (). * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H. * emultempl/lnk960.em (lnk960_choose_target): Function should take two arguments.
2001-12-13 * lexsup.c (parse_args): Don't pass shortopts to second call toAlan Modra1-10/+7
getopt functions. Restore optind rather than decrementing before second call. Remove errind as it now duplicates last_optind.
2001-12-07Insert 'PROGRAM' into the text string describing the -N option so that it isNick Clifton1-1/+1
easier to translate into foreign languages.
2001-11-022001-11-01 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-0/+6
* ld.texinfo (Options): Document new option, -nostdlib. * lexsup.c (OPTION_NOSTDLIB): New definition. (ld_options): Add entry for "nostdlib". (parse_args): Handle OPTIONS_NOSTDLIB. * ldfile.c (ldfile_add_library_path): Don't add directories to the search path if they weren't specified on the command line and -nostdlib was specified. * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
2001-10-31Fix infinite parsing loopNick Clifton1-38/+27
2001-10-02 * ldver.h (ld_program_version): Remove declaration.Alan Modra1-16/+1
* lexsup.c (parse_args): Move printing of copyright message.. * ldver.c (ldversion): .. to here. Use BFD_VERSION_STRING in place of BFD_VERSION. (ld_program_version): Remove. * Makefile.am (Makefile): Depend on bfd/configure.in Run "make dep-am" * Makefile.in: Regenerate.
2001-09-29From John Reiser <jreiser@BitWagon.com>Alan Modra1-0/+6
* ldlang.c (lang_common): Conditionally inhibit Common allocation. * lexsup.c: Add --no-define-common commandline option. * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command. * ldlex.l: Likewise. * ld.h: Add command_line.inhibit_common_definition. * ldmain.c (main): Initialize. * ld.texinfo: Document.
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu1-3/+3
2001-08-23 * elf-bfd.h (enum elf_reloc_type_class): New.Jakub Jelinek1-0/+6
(struct elf_backend_data): Add elf_backend_reloc_type_class. (_bfd_elf_reloc_type_class): New. * elfxx-target.h (elf_backend_reloc_type_class): Define. (elfNN_bed): Add elf_backend_reloc_type_class. * elf.c (_bfd_elf_reloc_type_class): New. * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf_i386_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (elf32_sparc_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the reloc is against read-only section. (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of looking up section names for DT_TEXTREL. (sparc64_elf_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field. (elfNN_ia64_hash_table_create): Clear ia64_info. (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only section. (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag instead of looking up section names for DT_TEXTREL. (elfNN_ia64_reloc_type_class): New. (elf_backend_reloc_type_class): Define. * elflink.h (size_dynamic_sections): Add spare DT_NULL tags. (struct elf_link_sort_rela): New. (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New. (elf_bfd_final_link): Call elf_link_sort_relocs. Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if necessary. * bfdlink.h (struct bfd_link_info): Add combreloc and spare_dynamic_tags fields. * emultempl/elf32.em (place_orphan): Place orphan .rel* sections into .rel.dyn resp. .rela.dyn if combreloc. (get_script): If .x linker script is equal to .xn, only put it once into the binary. Add .xc and .xsc scripts. (parse_args): Handle -z combreloc and -z nocombreloc. * scripttempl/elf.sc (.rela.sbss): Fix a typo. For .xc and .xsc scripts put all .rel* or .rela* input sections but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn. * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME is elf. Strip trailing whitespace from script. Generate .xc and .xsc scripts if requested. * ldmain.c (main): Initialize link_info.combreloc and link_info.spare_dynamic_tags. * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define. (ld_options): Add --spare-dynamic-tags option. (parse_args): Likewise. * ld.texinfo: Document -z combreloc and -z nocombreloc. * ldint.texinfo: Document .xc and .xsc linker scripts. * NEWS: Add notes about -z combreloc and SHF_MERGE.
2001-08-12Make --verbose always display linker scriptNick Clifton1-3/+3
2001-06-18 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):Hans-Peter Nilsson1-1/+0
Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections. * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto. * ld.h (args_type): Remove member export_dynamic. All users changed to use struct bfd_link_info member.
2001-06-162001-06-15 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+3
* lexsup.c (parse_args); Save optind to report unrecognized option.
2001-06-15 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:Hans-Peter Nilsson1-0/+1
Set new link_info member export_dynamic. * ldmain.c (main): Initialize new link_info member export_dynamic.
2001-05-22Improve Solaris compatabilityNick Clifton1-2/+3
2001-05-022001-05-02 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+2
* ldfile.c: Include "libiberty.h". * ldlex.l: Likewise. * ldmisc.c (buystring): Removed. * ldmisc.h: Likewise. * ldfile.c: Replace buystring with xstrdup. * ldlang.c: Likewise. * ldlex.l: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * lexsup.c: Likewise. * mpw-eppcmac.c: Likewise.
2001-04-13* ld.texinfo: Document --fatal-warnings.J.T. Conklin1-1/+8
* ld.1: Regenerate. * ldmisc.c (vfinfo): Set flag to inhibit making executable if warnings have been turned into errors. * lexsup.c (OPTION_WARN_FATAL): Define. (ld_options): Entry for --fatal-warnings. (parse_args): Handle OPTION_WARN_FATAL. * ld.h (ld_config_type): Add fatal_warnings field.
2001-04-13bfd/Jakub Jelinek1-1/+7
* libbfd-in.h (_bfd_merge_section): New. (_bfd_write_merged_section): New. (_bfd_merged_section_offset): New. * libbfd.h: Rebuilt. * linker.c (_bfd_generic_link_output_symbols): Handle discard_sec_merge. * aoutx.h (aout_link_write_symbols): Likewise. * pdp11.c (aout_link_write_symbols): Likewise. * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section. (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE sections. (elf_link_sec_merge_syms): New. (elf_link_input_bfd): Call _bfd_merged_section_offset and _bfd_write_merged_section. Handle discard_sec_merge. * elf-bfd.h (struct elf_link_hash_table): Add merge_info field. (struct bfd_elf_section_data): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and SEC_STRINGS section flags and entsize from their ELF counterparts. (_bfd_elf_link_hash_table_init): Initialize merge_info. (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize from their BFD counterparts. * merge.c: New file. * Makefile.am: Add strtab.lo. * Makefile.in: Rebuilt. include/ * bfdlink.h (bfd_link_discard): Add discard_sec_merge. gas/ * config/obj-elf.c (obj_elf_change_section): Add entsize argument, handle SHF_MERGE and SHF_STRINGS. (obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS. (obj_elf_section): Allow additional argument specifying entity size. * write.c (adjust_reloc_syms): Keep relocations against local symbols in SEC_MERGE sections. ld/ * ldmain.c (main): Default to discard_sec_merge. * lexsup.c (OPTION_DISCARD_NONE): Define. (ld_options): Add --discard-none. (parse_args): Handle OPTION_DISCARD_NONE. * ldlang.c (wild_doit): SEC_MERGE should be set in the output section only if SEC_MERGE and SEC_STRINGS flags and entsize of all its input sections match.
2001-03-13Fixtypos in ChangeLogs, fix copyright dates in filesNick Clifton1-1/+2
2001-01-14Extend "ld --unique" functionality.Alan Modra1-3/+6
2001-01-13formatting fixNick Clifton1-1/+1
2001-01-12Update copyright date to 2001Nick Clifton1-2/+2
2000-12-31Fix problems with new EXACTLY_TWO_DASHES command line switch option.Nick Clifton1-3/+11
2000-12-28Requre that long options starting with 'o' only accept a double dash prefix.Nick Clifton1-12/+40
2000-12-12Add link option to allow undefiedn symbols in shared librariesNick Clifton1-2/+10
2000-10-17Added new option --target-help.Chandra Chavva1-0/+7
2000-10-112000-10-10 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-30/+27
* deffile.h: Fix formatting. * lexsup.c: Likewise. * mri.c: Likewise.
2000-09-292000-09-29 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-11/+11
* deffile.h: Fix formatting. * ld.h: Likewise. * ldctor.h: Likewise. * ldemul.h: Likewise. * ldexp.h: Likewise. * ldfile.h: Likewise. * ldlang.h: Likewise. * lexsup.c: Likewise. * mri.c: Likewise. * pe-dll.c: Likewise.
2000-09-05--split-by-reloc, --split-by-file extensions. --unique option.Alan Modra1-6/+18
2000-09-02Add .gnu.linkonce.wi.* to .debug_info sections.Nick Clifton1-11/+0
2000-07-20Add optional style argument to --demangle switch.Nick Clifton1-2/+14
2000-07-202000-07-19 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+4
* emulparams/elf32mcore.sh (PARSE_AND_LIST_ARGS): Removed. (PARSE_AND_LIST_PROLOGUE): New. (PARSE_AND_LIST_LONGOPTS): Likewise. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Likewise. * ldmain.c (main): Clear link_info.flags and link_info.flags_1. * lexsup.c (ld_options): Comment out 'z'. (parse_args): Likewise. * emultempl/elf32.em: Include "elf/common.h". (gld_${EMULATION_NAME}_parse_args): Defined. Handle some -z options. (gld_${EMULATION_NAME}_list_options): Likewise. * ld.texinfo: Add documentation for the recognized -z options.
2000-07-08Fix --section-start=xxxxAlan Modra1-4/+9
2000-05-22Patch from Thomas de Lellis to implement --section-startNick Clifton1-0/+36
2000-05-182000-05-18 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+1
* lexsup.c (parse_args): `i' == `r', not `q'.
2000-05-17Fix typo in previous deltaNick Clifton1-2/+2
2000-05-17Apply patch from Richard Gorton <gorton@scrugs.lkg.dec.com> to implementNick Clifton1-0/+5
--emit-relocs switch to the linker to preserve relocs in an output executable
2000-05-15Update printed copyright.Alan Modra1-1/+1
2000-05-03Fix 64 bit target section start on 32 bit machine.Alan Modra1-3/+3
2000-04-04Move translated part of bug report string back into .c files soAlan Modra1-1/+1
xgettext can find it. Regnerate .pot files.
2000-04-03Move bug report string to one place.Alan Modra1-2/+2
1999-09-121999-09-12 Donn Terry <donn@interix.com>Ian Lance Taylor1-1/+1
* lexsup.c (parse_args): Use strtoul for --split-by-reloc argument.
1999-09-121999-09-12 Donn Terry <donn@interix.com>Ian Lance Taylor1-0/+3
* lexsup.c (parse_args): If we get an unrecognized argument, mention --help.
1999-08-06 * lexsup.c (is_num): Reindent.Ian Lance Taylor1-12/+20
(parse_args): Mention program name in error message.
1999-06-23 * ldmain.c (main): Initialize link_info.init_function andMark Mitchell1-0/+14
link_info.fini_function. * lexsup.c (OPTION_INIT): New macro. (OPTION_FINI): Likewise. (ld_options): Add descriptions for them. (parse_args): Handle them.
1999-06-09restore previous format of --help outputNick Clifton1-2/+4
1999-05-28Minor formatting changes.Nick Clifton1-4/+4