Commit Graph

780 Commits

Author SHA1 Message Date
Charles Wilson 0d888aac30 2001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
* emultempl/pe.em(make_import_fixup): change signature to
        take asection as well as arelec; we need this for proper
        error reporting.  Only call pe_create_import_fixup() if
        there is no attempt to add a constant addend to the reloc;
        otherwise, report error condition.
        * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
        since final argument is a pointer to make_import_fixup().
        Change call to cb() to match make_import_fixup() signature.
        (make_import_fixup_mark): make buffer_len unsigned.
        * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
2001-09-12  Charles Wilson  <cwilson@ece.gatech.edu>
        * ld.texinfo: add verbose documentation for auto-import
        direct-addressing workaround, to compliment the terse
        error message.
2001-09-12 15:58:10 +00:00
Catherine Moore cedacdc05a * scripttempl/v850.sc: Add gcc_except_table sections. 2001-09-12 14:09:18 +00:00
Jeff Law 38be0bb1e6 * emulparams/h8300helf.sh: Move stack to a much higher memory address.
* emulparams/h8300self.sh: Similarly.
2001-09-07 17:35:04 +00:00
Tom Rix 1fdf02497c Fix import symbols for AIX. 2001-09-06 15:20:01 +00:00
Nick Clifton 559e4713db Set correct value for default (PE) stack size. 2001-09-05 16:00:13 +00:00
Andreas Jaeger 9b5799b87b * emultempl/beos.em: Declare prototypes for comparions functions,
adjust definitions.
2001-09-03 07:29:50 +00:00
Andreas Jaeger 48f6162b7a * emultempl/aix.em: Add missing prototype.
* emultempl/lnk960.em: Likewise.
	* emultempl/vanilla.em: Likewise.
	* emultempl/armcoff.em: Likewise.
	* emultempl/armelf_oabi.em: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/gld960c.em: Likewise.
	* emultempl/gld960.em: Likewise.

	* emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
	for prototype declaration.
2001-09-03 06:43:37 +00:00
Eric Christopher 39e5585e1b 2001-08-31 Eric Christopher <echristo@redhat.com>
Jason Eckhardt  <jle@redhat.com>

	* ldmain.c (get_emulation): Add support for -mips32 and -mips64.
2001-08-31 21:28:05 +00:00
Andreas Jaeger 3fc90ddbe3 * emultempl/pe.em: Add missing prototypes.
(gld_${EMULATION_NAME}_after_open): Remove extra args to
	pe_find_data_imports.
	(pr_sym): Add unused attribute.
2001-08-31 13:30:13 +00:00
Phil Blundell d43ded80a7 2001-08-29 Joel Sherrill <joel@OARcorp.com>
* configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
	default from coff to elf.
2001-08-29 18:47:28 +00:00
Jeff Law 3946dd2f8d * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
ARCH specification.
	* emulparams/h8300self.sh: Similarly.
2001-08-29 17:35:27 +00:00
Nick Clifton 70d0c6e9db Add missing changelog entry 2001-08-29 17:18:52 +00:00
Joern Rennecke 8af6dd4198 * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
eh8300self.o .
	(eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
	* configure.tgt (h8300-*-elf*): New case.
	* emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
	* emulparams/h8300self.sh: New file.
	* Makefile.in: Regenerated.
2001-08-29 12:51:26 +00:00
Alan Modra 5c67d4bb59 * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
(eelf64ppc.c, eelf64lppc.c): Add make targets.
	Run "make dep-am"
	* Makefile.in: Regenerate.
	* configure.tgt: Add powerpc64 support.  Move pdp11, pjl, pj
	entries to correct alphabetical position.
	* emulparams/elf64ppc.sh: New.
	* emulparams/elf64lppc.sh: New.
2001-08-27 10:45:55 +00:00
Nick Clifton 081310158f Declare BSIZE as static 2001-08-27 08:52:50 +00:00
Jakub Jelinek db6751f2e7 * elf-bfd.h (enum elf_reloc_type_class): New.
(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-23 15:14:18 +00:00
H.J. Lu 63d069c06f 2001-08-22 H.J. Lu <hjl@gnu.org>
* emulparams/elf32fr30.sh: Add a newline.
2001-08-22 16:00:25 +00:00
Andreas Jaeger 948f9114c9 * deffilep.y: Add missing prototypes.
* pe-dll.c: Likewise.
2001-08-21 11:42:57 +00:00
Alan Modra 2af022575a * ldlang.c (insert_pad): Fix typos in last patch. 2001-08-20 03:09:07 +00:00
Alan Modra c0c330a70f * ldlang.c (insert_pad): Use offsetof macro.
(lang_size_sections): Always neuter padding statements.
	* emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
2001-08-20 01:21:08 +00:00
Alan Modra ae7fb08f1a * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
passed to lang_size_sections.
	(pe_exe_fill_sections): Likewise.
	* emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
	(gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
2001-08-20 00:22:41 +00:00
Alan Modra fab80407fe * emultempl/aix.em: Formatting fixes. 2001-08-18 15:42:26 +00:00
Alan Modra b3327aadfd * ldlang.c (insert_pad): Make use of an existing pad statement if
available.  Move code calculating alignment, adjusting section
	alignment power, and adjusting dot to ..
	(size_input_section): .. here.  Remove unused relax param.
	(lang_size_sections): Change boolean `relax' param to boolean *.
	Adjust call to size_input_section.  Make use of insert_pad to
	place pad after the assignment statement.  If relaxing, zap
	padding statements.
	(reset_memory_regions): Reset output_bfd section sizes too.
	(relax_again): Move to..
	(lang_process): ..here.  Adjust call to lang_size_sections, and
	remove duplicated code.
	* ldlang.h (lang_size_sections): Change `relax' param to boolean *.
2001-08-18 14:54:26 +00:00
Alan Modra 563e308f24 * ld.texinfo: Document that fill values now use the four least
significant bytes.
	* emulparams/elf32fr30.sh (NOP): Update.
	* emulparams/elf32mcore.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf_i386.sh: Likewise.
	* emulparams/elf_i386_be.sh: Likewise.
	* emulparams/elf_i386_chaos.sh: Likewise.
	* emulparams/elf_i386_ldso.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/i386moss.sh: Likewise.
	* emulparams/i386nw.sh: Likewise.
	* emulparams/m68kelf.sh: Likewise.
	* scripttempl/elf.sc: Update NOP comment.
	* scripttempl/elfi370.sc: Likewise.
	* scripttempl/elfm68hc11.sc: Likewise.
	* scripttempl/elfm68hc12.sc: Likewise.
	* scripttempl/nw.sc: Likewise.
2001-08-17 09:51:08 +00:00
Tom Rix b90e1c6f3e Fix for ld 2001-08-15 17:10:18 +00:00
Alan Modra cde43e70f1 * emultempl/elf32.em: Formatting fixes.
(output_prev_sec_find): Test for bfd_ind_section too;  do so by
	looking at sec->owner.
	(output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
	(gld${EMULATION_NAME}_place_orphan): Add a few comments.  Remove
	unused code, and reorganize orphan section placement code.
2001-08-14 04:40:38 +00:00
Alan Modra 39dcfe18ca (wild_doit): Rename to lang_add_section. 2001-08-14 02:01:31 +00:00
Richard Henderson 908d20b308 * emultempl/needrelax.em: New file.
* emulparams/elf64_ia64.sh (EXTRA_EM_FILE): Reference it.
        * Makefile.am (eelf64_ia64.c): Depend on it.
        * Makefile.in: Rebuild.
2001-08-13 20:40:31 +00:00
Alan Modra 22af9fd35c * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
output_section is set non-NULL.
2001-08-13 14:28:57 +00:00
Alan Modra 0f33d40bfc * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
`true' for SEC_EXCLUDE sections so that the generic code doesn't
	needlessly create an output_section_statement.  Treat a correctly
	named output_section_statement with NULL bfd_section as compatible.
2001-08-13 10:56:21 +00:00
Hans-Peter Nilsson 55ab6103c5 * emultempl/generic.em: Support EXTRA_EM_FILE.
(ld_${EMULATION_NAME}_emulation): Support emulation parameters
	LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
	LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
	LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
	LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
	LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
	LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
	LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
	LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
	LDEMUL_FIND_POTENTIAL_LIBRARIES.
2001-08-13 07:24:58 +00:00
Richard Henderson 24098abb6c * scripttempl/elf.sc, scripttempl/elfd30v.sc,
scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
        scripttempl/v850.sc: Keep .jcr data.
2001-08-12 20:19:49 +00:00
Nick Clifton b9a8de1ea3 Make --verbose always display linker script 2001-08-12 07:59:28 +00:00
Andreas Jaeger 0218d1e4c2 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
to build warnings.
	* configure: Regenerate.
2001-08-10 10:56:47 +00:00
Alan Modra 738108961e * emultempl/elf32.em (output_prev_sec_find): Add missing prototype. 2001-08-09 14:44:18 +00:00
Alan Modra 5253f23b62 * scripttempl/elf.sc: Move non-text .dynamic section before
.plt/.got/.sdata* group.
	(OTHER_GOT_SECTIONS): Move to immediately after .got.
	(OTHER_SDATA_SECTIONS): Add.
	* emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
	OTHER_GOT_SECTIONS.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32b4300.sh: Likewise.
	* emulparams/elf32bmip.sh: Likewise.
	* emulparams/elf32bmipn32.sh: Likewise.
	* emulparams/elf32bsmip.sh: Likewise.
	* emulparams/elf32btsmip.sh: Likewise.
	* emulparams/elf32ebmip.sh: Likewise.
	* emulparams/elf32elmip.sh: Likewise.
	* emulparams/elf32l4300.sh: Likewise.
	* emulparams/elf32lmip.sh: Likewise.
	* emulparams/elf32lsmip.sh: Likewise.
	* emulparams/elf32ltsmip.sh: Likewise.
	* emulparams/elf64bmip.sh: Likewise.
	* emulparams/elf64btsmip.sh: Likewise.
	* emulparams/elf64ltsmip.sh: Likewise.
2001-08-09 14:25:59 +00:00
Alan Modra 179c732cf6 * genscripts.sh: Source the emulparams script before each output
script is generated so that variables like `RELOCATING' may affect
	variables defined in the emulparams script.
2001-08-08 13:14:38 +00:00
Alan Modra 20713691c2 * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
order.
2001-08-04 04:14:10 +00:00
Alan Modra 3fd367102d * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
ie. iterate over wild_statement.section_list.
	(gld${EMULATION_NAME}_place_orphan): Likewise.
2001-08-04 01:21:43 +00:00
Stephane Carrez de0b18539d * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
.fini[0-4] sections used by _exit
	(CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
	(*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
	* scripttempl/elfm68hc11.sc: Likewise.
2001-08-03 20:41:26 +00:00
H.J. Lu ff7e6f8868 2001-08-03 H.J. Lu <hjl@gnu.org>
* emultempl/beos.em (init): Add the missing initialization.
2001-08-03 19:19:42 +00:00
Alan Modra b6bf44ba1b * ld.texinfo (Input Section Basics): Clarify ordering of output
sections.
	* ldlang.c (callback_t): Add wildcard_list param.
	(walk_wild_section): Remove "section" param.  Rewrite for
	lang_wild_statement_type change.  Remove unique_section_p test.
	(walk_wild_file): Remove "section" param.
	(walk_wild): Remove "section" and "file" params.
	(lang_gc_wild): Likewise.
	(wild): Likewise.  Modify for lang_wild_statement_type change.
	(wild_sort): Likewise.  Add "sec" param.
	(gc_section_callback): Likewise.
	(output_section_callback): Likewise.  Do unique_section_p test.
	(map_input_to_output_sections): Modify call to wild.
	(lang_gc_sections_1): Likewise.
	(print_wild_statement): Modify for lang_wild_statement_type
	change.
	(lang_add_wild): Replace filename, filenames_sorted param with
	filespec.  Replace section_name, sections_sorted,
	exclude_filename_list with section_list.
	* ldlang.h (lang_add_wild): Here too.
	(lang_wild_statement_type): Replace section_name, sections_sorted,
	and exclude_filename_list with section_list.
	* ldgram.y (current_file): Delete.
	(%union): Add wildcard_list.
	(file_NAME_list): Set type to wildcard_list.  Build a linked list
	rather than calling lang_add_wild for each entry.
	(input_section_spec_no_keep): Call lang_add_wild here instead.
	* ld.h (struct wildcard_list): Declare.
	* mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
2001-08-03 01:11:21 +00:00
Charles Wilson b044cda1de 2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
* ldmain.c (main): initialize link_info.pei386_auto_import
        * pe-dll.c: new tables for auto-export filtering
        (auto_export): change API, pass abfd for contextual filtering.
        Loop thru tables of excluded symbols instead of comparing
        "by hand".
2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
        * pe-dll.c: new variable pe_dll_enable_extra_debug. New
        static variable current_sec (static struct sec *). Add
        forward declaration for add_bfd_to_link.
        (process_def_file): Don't export undefined symbols. Do not
        export symbols starting with  "_imp__".  Call auto_export()
        with new API.
        (pe_walk_relocs_of_symbol): New function.
        (generate_reloc): add optional extra debugging
        (pe_dll_generate_def_file): eliminate extraneous initial blank
        line in output
        (make_one): enlarge symtab to make room for __nm__ symbols
        (DATA auto-import support).
        (make_singleton_name_thunk): New function.
        (make_import_fixup_mark): New function.
        (make_import_fixup_entry): New function.
        (pe_create_import_fixup): New function.
        (add_bfd_to_link): Specify that 'name' argument is a CONST
        char *.
        * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
        declare new functions pe_walk_relocs_of_symbol and
        pe_create_import_fixup.
        * emultempl/pe.em: add new options --enable-auto-import,
        --disable-auto-import, and --enable-extra-pe-debug.
        (make_import_fixup): New function.
        (pe_find_data_imports): New function.
        (pr_sym): New function.
        (gld_${EMULATION_NAME}_after_open): Add optional extra pe
        debugging. Call pe_find_data_imports.  Mark .idata as DATA, not
        CODE.
2001-08-02  Charles Wilson  <cwilson@ece.gatech.edu>
        * ld.texinfo: add additional documentation for
        --export-all-symbols.  Document --out-implib,
        --enable-auto-image-base, --disable-auto-image-base,
        --dll-search-prefix, --enable-auto-import, and
        --disable-auto-import.
        * ldint.texinfo: Add detailed documentation on auto-import
        implementation.
2001-08-02 23:12:02 +00:00
Nick Clifton 156e34dd45 Fix computation in SECTIONS example. 2001-07-30 18:12:07 +00:00
Alan Modra d623142740 Update dependencies with "make dep-am". 2001-07-24 10:08:32 +00:00
Alan Modra e14ec88b39 * ldcref.c (check_section_sym_xref): New function.
(check_nocrossrefs): Call it.
	(check_nocrossref): Interate over h->refs here instead of..
	(check_refs): ..here.  Pass in the symbol name, section, and bfd
	rather than hash_entry pointers.
	(struct check_refs_info): Keep symbol name rather than hash entry.
	Remove "same".
	(check_reloc_refs): Tweak for above changes in check_refs_info.
	Only report references to section syms when symname is NULL to
	prevent duplicate messages for the same reloc.
2001-07-23 07:54:04 +00:00
Nick Clifton c7d701b094 Use stderr if config.map_file is not available. Do not print NULL trees. 2001-07-19 16:41:00 +00:00
Nick Clifton 1545243be0 If a region is specified assign it to all sections inside the overlay unless they have been assigned to the own, non-default, memory region. 2001-07-19 16:21:39 +00:00
Nick Clifton 1b577b00bd Change bug reporting email address. 2001-07-19 10:43:13 +00:00
H.J. Lu 5030876b5d 2001-07-14 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (output_prev_sec_find): Never return
	bfd_abs_section_ptr, bfd_com_section_ptr nor
	bfd_und_section_ptr.
2001-07-14 16:36:25 +00:00
Nick Clifton 18c7a9a534 Fix dependency for em32relf.c 2001-07-14 15:47:17 +00:00
Matthew Green 9ffecff1ce * configure.tgt (i386-*-netbsdelf*): New target.
(i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
2001-07-14 14:45:42 +00:00
Jakub Jelinek 95500e1ca4 * emultempl/elf32.em (output_prev_sec_find): New.
(place_orphan): Use it.
2001-07-13 07:25:18 +00:00
H.J. Lu e97cb84f5a 2001-07-11 H.J. Lu <hjl@gnu.org>
* ldmain.c (main): Fix typos in the last change.
2001-07-11 19:50:56 +00:00
Jakub Jelinek 7333607ede 2001-07-11 Jakub Jelinek <jakub@redhat.com>
* ldmain.c (main): Disallow -F and -f without -shared.
2001-07-11 14:19:05 +00:00
Nick Clifton d29d80f20c Check for the output_bfd not having any coff_data structure allocated to it. 2001-07-11 08:11:16 +00:00
David O'Brien c2a1a436ff 2001-07-09 David O'Brien <obrien@FreeBSD.org>
* emultempl/elf32.em: Do not assuming that contents of the buffer
	returned from basename function will remain unchanged accross other
	function calls.

NOTE: DJ Delorie recomends doing a basename()->lbasename() conversion.

Approved by:  DJ Delorie
              <200107100030.UAA01223@envy.delorie.com>
2001-07-10 00:38:16 +00:00
H.J. Lu 63653551a8 2001-07-03 H.J. Lu <hjl@gnu.org>
* scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
	2001-07-03. It creates dynamic entries even for static binaries.
2001-07-03 23:22:20 +00:00
H.J. Lu d303a449f2 2001-07-03 Jakub Jelinek <jakub@redhat.com>
* scripttempl/elf.sc (DYNAMIC_PAD): New variable.
	(DYNAMIC): Use it to reserve few dynamic entries for
	post-linking tools.
2001-07-03 17:40:14 +00:00
Alan Modra 9f22353f5b * emulparams/hppa64linux.sh: New file.
* configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh
	* Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o
	(ehppa64linux.c): Add rule to make it.
	Run "make dep-am".
	* Makefile.in: Regenerate.
2001-06-27 08:42:29 +00:00
Hans-Peter Nilsson 62bf86b426 * ld.texinfo (Options, -r): Mention restrictions when using
different object formats.
2001-06-20 22:40:13 +00:00
Hans-Peter Nilsson 429d935daa * ldlang.c (lang_check): Emit fatal error if relocatable link
between different object flavours with relocations in input.
2001-06-19 19:57:39 +00:00
H.J. Lu cb840a31ad 2001-06-19 H.J. Lu <hjl@gnu.org>
* ld.texinfo (-E, --export-dynamic): Mention --version-script.
	(--version-script): Mention the language support.
2001-06-19 15:22:39 +00:00
H.J. Lu 9bf03accc3 2001-06-19 H.J. Lu <hjl@gnu.org>
* ldlang.c (lang_check): Revert the change mode on 2001-06-15.
2001-06-19 14:39:02 +00:00
Nick Clifton c45021f2d2 Remove auot generated man pages 2001-06-19 11:57:29 +00:00
Hans-Peter Nilsson 605d9b3a4f * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
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-18 22:20:57 +00:00
Hans-Peter Nilsson 6caa99ab75 * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
$(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
	* Makefile.in: Regenerate.
2001-06-18 20:19:52 +00:00
H.J. Lu 6f9efd9751 2001-06-18 H.J. Lu <hjl@gnu.org>
* ldlang.c (init_os): Add the newline to the einfo call.
	(lang_check): Likewise.
	(lang_do_version_exports_section): Likewise.
2001-06-18 17:23:52 +00:00
H.J. Lu 5af9fd8b93 2001-06-15 H.J. Lu <hjl@gnu.org>
* lexsup.c (parse_args); Save optind to report unrecognized
	option.
2001-06-16 03:41:45 +00:00
Hans-Peter Nilsson 7e66c3f530 * ldlang.c (lang_check): Emit fatal error if relocatable link
between different object flavours.
2001-06-15 13:13:46 +00:00
Hans-Peter Nilsson 2a096f0438 * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
Set new link_info member export_dynamic.
	* ldmain.c (main): Initialize new link_info member export_dynamic.
2001-06-15 13:02:23 +00:00
Nick Clifton 6770ec8c9e Chnage load_symbols() to a boolean function 2001-06-15 09:00:11 +00:00
Alan Modra b6a71ccaa1 Move an entry to the correct ChangeLog. 2001-06-10 13:41:43 +00:00
Alan Modra 8529105a0e * ldlang.c (record_bfd_errors): Remove.
* emultempl/aix.em: Fix copyright dates.
2001-06-08 01:58:20 +00:00
Andreas Jaeger 8f3aa7a03f * emulparms/elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
(TEXT_START_ADDR): Likewise.
2001-06-07 11:18:18 +00:00
Alan Modra 3277f888eb * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390. 2001-06-06 12:11:23 +00:00
DJ Delorie 3763134dca * emultempl/pe.em (init): Reduce default stack reserve to 0x200000. 2001-06-05 00:48:41 +00:00
H.J. Lu 5929ebc003 2001-05-31 H.J. Lu <hjl@gnu.org>
* ldlang.c (open_input_bfds): Don't change the bfd error
	handler whilst loading symbols.
2001-05-31 21:14:59 +00:00
Nick Clifton c04a062df3 Rmeove i370-mvs architecture - it is not supported. 2001-05-28 08:25:20 +00:00
H.J. Lu 96fcab3e8d 2001-05-25 H.J. Lu <hjl@gnu.org>
* emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
	like emulparams/aixppc.sh.
2001-05-25 22:49:14 +00:00
H.J. Lu db8d4f2320 2001-05-25 H.J. Lu <hjl@gnu.org>
* emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
	setting of output_filename after bfd_scan_arch.
	* emultempl/pe.em: Likewise.
2001-05-25 22:48:14 +00:00
H.J. Lu 5f64210127 2001-05-25 H.J. Lu <hjl@gnu.org>
* emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
	like emulparams/aixppc.sh.

	* emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
	instead of ${srcdir}/emultempl/stringify.sed.
2001-05-25 21:19:46 +00:00
Timothy Wall 64e9ece0ca monterey updates 2001-05-25 12:42:28 +00:00
Alan Modra c709b09623 s/linuxaout/linux*aout/, s/linuxoldld/linux*oldld/ 2001-05-25 07:21:01 +00:00
H.J. Lu 6cbdcc6fa9 2001-05-24 H.J. Lu <hjl@gnu.org>
* emultempl/stringify.sed: Removed again.
2001-05-25 05:56:38 +00:00
H.J. Lu 86af25fe1d 2001-05-24 H.J. Lu <hjl@gnu.org>
* emultempl/aix.em (OUTPUT_ARCH): Defined.
	(gld${EMULATION_NAME}_before_parse): Initialize
	ldfile_output_architecture, ldfile_output_machine and
	ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
	* emultempl/beos.em: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultempl/linux.em: Likewise.
	* emultempl/mipsecoff.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/sunos.em: Likewise.
2001-05-25 05:39:22 +00:00
Tom Rix 3b1b01cf25 Support for xcoff64 2001-05-24 20:59:23 +00:00
Alexandre Oliva 57e6abd277 * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
variable to avoid non-portable shell construct.
2001-05-24 02:44:06 +00:00
Nick Clifton d1cf510e5e Add MIPS r12k support 2001-05-23 17:26:40 +00:00
Nick Clifton 506eee2253 Improve Solaris compatability 2001-05-22 14:00:18 +00:00
Alan Modra d1778b88f8 Add a flag to asection, linker_has_input, and use it to reliably
determine whether an input section is the first one assigned to
an output section.
2001-05-17 03:58:45 +00:00
DJ Delorie 02649152cc * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
* Makefile.in: Ditto.
2001-05-14 16:55:23 +00:00
Jakub Jelinek 579f31ac74 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
sections as well.
	(elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
	to .gnu.linkonce.t.FOO text section.

	* readelf.c (process_unwind): Print all unwind sections, not just
	one.

	* config/tc-ia64.c (special_linkonce_name): New.
	(make_unw_section): Map .gnu.linkonce.t.FOO text section into
	.gnu.linkonce.ia64unw{,i}.FOO.
	(ia64_elf_section_type): Handle .gnu.linkonce.ia64unw{,i}.FOO.
	(dot_endp): Add comment about it.

	* elf/ia64.h (ELF_STRING_ia64_unwind_once): Define.
	(ELF_STRING_ia64_unwind_info_once): Define.

	* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
	.gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
	output sections.
	* emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
2001-05-11 12:36:47 +00:00
Jakub Jelinek 8550eb6e64 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
fields, change sec into secinfo.
	(struct sec_merge_info): Add chain, remove last fields.
	(struct sec_merge_sec_info): Add next, sec, psecinfo fields.
	(sec_merge_hash_lookup): If lookup could not use a string only
	because it has bad alignment, mark the old string for deletion.
	(sec_merge_add): Add secinfo argument. Don't compute entry's
	position, instead record the section.
	(sec_merge_emit): Update for the sec into secinfo change in
	struct sec_merge_hash_entry.
	(_bfd_merge_section): Only record the section for merging, defer
	putting strings into the hash table.
	(cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
	_bfd_merge_sections): New functions.
	(_bfd_merged_section_offset): Update for the sec_merge_hash_entry
	changes.
	* libbfd-in.h (_bfd_merge_sections): Add prototype.
	(_bfd_nolink_bfd_merge_sections): Define.
	* libbfd.h: Likewise.
	(bfd_generic_merge_sections): Add prototype.
	* targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
	(struct bfd_target): Likewise.
	* bfd.c (bfd_merge_sections): Define.
	* bfd-in2.h: Rebuilt.
	* elf.c (_bfd_elf_merge_sections): New function.
	* elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
	* elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
	* reloc.c (bfd_generic_merge_sections): New function.
	* vms.c (vms_bfd_merge_sections): New function.
	* aout-adobe.c (aout_32_bfd_merge_sections): Define.
	* aout-target.h (MY_bfd_merge_sections): Define.
	* aout-tic30.c (MY_bfd_merge_sections): Define.
	* binary.c (binary_bfd_merge_sections): Define.
	* bout.c (b_out_bfd_merge_sections): Define.
	* coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
	* coffcode.c (coff_bfd_merge_sections): Define.
	* coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
	* i386msdos.c (msdos_bfd_merge_sections): Define.
	* i386os9k.c (os9k_bfd_merge_sections): Define.
	* ieee.c (ieee_bfd_merge_sections): Define.
	* ihex.c (ihex_bfd_merge_sections): Define.
	* nlm-target.h (nlm_bfd_merge_sections): Define.
	* oasys.c (oasys_bfd_merge_sections): Define.
	* ppcboot.c (ppcboot_bfd_merge_sections): Define.
	* som.c (som_bfd_merge_sections): Define.
	* srec.c (srec_bfd_merge_sections): Define.
	* tekhex.c (tekhex_bfd_merge_sections): Define.
	* versados.c (versados_bfd_merge_sections): Define.
	* xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.

	* ldlang.c (lang_process): Call bfd_merge_sections.
2001-05-11 12:23:48 +00:00
Alan Modra 8e5a525cbb * ldgram.y: Fix typo. 2001-05-07 09:20:25 +00:00
H.J. Lu 1c9acd948f 2001-05-03 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em: Include "libiberty.h".
	(gld${EMULATION_NAME}_vercheck): Call basename () to get the
	basename of the bfd filename.
	(gld${EMULATION_NAME}_stat_needed): Likewise.
	(gld${EMULATION_NAME}_try_needed): Likewise.
	(gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
2001-05-03 06:26:26 +00:00
H.J. Lu 14fe918ef2 2001-05-02 H.J. Lu <hjl@gnu.org>
* emultempl/pe.em: Include <ctype.h>.
2001-05-02 21:01:03 +00:00
Nick Clifton c7e4034828 Add gas and ld support for openrisc 2001-05-02 18:14:31 +00:00
H.J. Lu d1b2b2dcb9 2001-05-02 H.J. Lu <hjl@gnu.org>
* 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-05-02 16:42:55 +00:00
Andreas Jaeger 35714f2a5d * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value. 2001-04-30 09:37:08 +00:00
Nick Clifton 884fb58eeb Give emulation a chance to process unrecognized file before fatal error is
reported, not after.
2001-04-28 18:00:10 +00:00
Nick Clifton 87748b3227 Add support for arm-vxworks target 2001-04-27 17:12:18 +00:00
J.T. Conklin 7ce691aec4 * ld.texinfo: Document --fatal-warnings.
* 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-13 02:22:23 +00:00
Jakub Jelinek f5fa8ca231 bfd/
* 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-04-13 00:34:36 +00:00
H.J. Lu fdec3cfc83 2001-04-05 Steven J. Hill <sjhill@cotw.com>
* Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
	(ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
	(eelf32ltsmip.c): New target.
	(eelf64btsmip.c): Likewise.
	(eelf64ltsmip.c): Likewise.
	* Makefile.in: Regenerated.

	* configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
	target.
	(mips*-*-linux-gnu*): Likewise.

	* emulparams/elf32ltsmip.sh: New. Traditional little endian
	MIPS taget.
	* emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
	target.
	* emulparams/elf64ltsmip.sh: New. Traditional 64bit little
	endian target.
2001-04-08 05:13:57 +00:00
Hans-Peter Nilsson 589bad82a2 * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
correct value of __Stext here.
	(TEXT_START_SYMBOLS): Define; always define __Stext, to start of
	.startup section.

	* emulparams/crislinux.sh: Remove FIXME.
2001-04-05 20:37:54 +00:00
Alan Modra 94202e16cf Bump page size to 64k 2001-04-02 01:21:27 +00:00
Hans-Peter Nilsson 1268a053f8 * configure.tgt (cris-*-*): Change default emulation to criself.
(cris-*-*aout*): New rule.
2001-03-27 02:37:41 +00:00
Alan Modra d85e9ff7b1 Go to 16k page size on hppa-linux. 2001-03-27 00:42:47 +00:00
Andreas Jaeger 0879a67a8f 2001-03-26 Andreas Jaeger <aj@suse.de>
* binutils.texi (nm): Fix texi syntax.

2001-03-26  Andreas Jaeger  <aj@suse.de>

	* ld.texinfo (Overview): Fix syntax in texi code.
2001-03-26 07:02:59 +00:00
Nick Clifton 0285c67df1 Automate generate on man pages 2001-03-25 20:32:31 +00:00
Nick Clifton c20ec07b9a Support the GCC flags '-ffunction-sections' and '-fdata-sections'.
Set the VMA of STABS sections to zero.
2001-03-23 23:05:07 +00:00
Ulrich Drepper cc5ce05235 * emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
is an absolute path look only for this file and not along the path.
2001-03-20 18:39:21 +00:00
Ulrich Drepper a1ab1d2aa3 * emultempl/elf32.em (OPTION_GROUP): New macro.
Add new option Bgroup to longopts.
	(gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
	(gld*_list_options): Add -Bgroup and -z defs.
	* ld.1: Document -Bgroup and -z defs.
	* ld.texinfo: Likewise.
2001-03-17 21:24:26 +00:00
Nick Clifton a2b64bede3 Fixtypos in ChangeLogs, fix copyright dates in files 2001-03-13 06:14:29 +00:00
Michael Meissner 788fca5a32 Add support for -fdata-sections 2001-03-08 02:20:25 +00:00
Alan Modra 1c7566d167 * emultempl/m68kelf.em (m68k_elf_after_allocation): Call
after_allocation_default, not gld..._before_allocation.
2001-03-05 05:02:03 +00:00
Matthew Hiller c19bd1c6f4 *** empty log message *** 2001-03-01 19:39:30 +00:00
Matthew Hiller 1688b748f1 2001-02-28 Matt Hiller <hiller@redhat.com>
* testsuite/ld-scripts/crossref.exp: Initialize flags to
	[big_or_little_endian].
	* testsuite/ld-undefined/undefined.exp: Ditto, and include $flags
	in ld invocations.
	* testsuite/lib/ld-lib.exp (big_or_little_endian): Recognize -EB,
	-eb, EL and el.
	(is_endian_output_format): New function.
	(default_ld_link): Set flags to [big_or_little_endian] only if ld
	is being invoked such that the output format being used is of
	known endianness.
	(default_ld_simple_link): Ditto.
2001-03-01 19:13:27 +00:00
Alan Modra 27b7e12d2d Bump version to 2.11.90, fix missing dependencies in bfd/,
and run "make dep-am".
2001-02-27 06:43:56 +00:00
Timothy Wall 2bc551c701 Add aix5 settings. 2001-02-27 03:23:00 +00:00
Nick Clifton 1276aefac0 BFD: Catch & report unhandled PE section flags.
LD: Catch BFD errors whilst loading symbols and do not produce an executable.
2001-02-27 01:38:06 +00:00
Timothy Wall 41c4999810 Add ia64-*-aix* configuration. 2001-02-22 17:24:33 +00:00
Kazu Hirata 1ac7e077c9 Fix a typo. 2001-02-21 00:19:45 +00:00
H.J. Lu 78f85fd798 2001-02-20 H.J. Lu <hjl@gnu.org>
* ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
	false if we found the file.
2001-02-20 21:07:24 +00:00
David O'Brien fb33b90691 001-02-18 David O'Brien <obrien@FreeBSD.org>
* configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
	FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.

Approved by:  Philip Blundell <philb@gnu.org>
              Message-Id: <E14URxF-00023n-00@kings-cross.london.uk.eu.org>
2001-02-19 06:51:51 +00:00
Nick Clifton e135f41bc2 Add PDP-11 support 2001-02-18 23:33:11 +00:00
David O'Brien a842aceb48 2001-02-17 David O'Brien <obrien@FreeBSD.org>
* configure.host: Add a generic FreeBSD configuration entry such that
	all [modern] FreeBSD systems on all platforms will look the same.

Approved by:  Alan Modra <alan@linuxcare.com.au>
              <Pine.LNX.4.21.0102172155140.30011-100000@front.linuxcare.com.au>
2001-02-18 02:17:24 +00:00
H.J. Lu 24174db0fa 2001-02-14 H.J. Lu <hjl@gnu.org>
* configure.tgt: Remove mention of earmelf_linux26.
2001-02-14 18:34:13 +00:00
Richard Henderson 30c3c13a92 * emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove. 2001-02-13 23:07:54 +00:00
H.J. Lu b46a87b160 2001-02-13 H.J. Lu <hjl@gnu.org>
* ldexp.h (node_type): Add etree_provided.
	* ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
	type to etree_provided if defined by PROVIDE. Allow updating
	for etree_provided.
	(exp_print_tree): Handle etree_provided.
	* mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
	etree_provided.
2001-02-13 22:23:33 +00:00
Richard Henderson f3988fd901 * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add
.IA_64.unwind.* pattern to unwind table section and
        .IA_64.unwind_info* pattern to unwind info section.
2001-02-10 01:44:39 +00:00
Nick Clifton a85d7ed0f0 Add s390 support 2001-02-10 00:58:38 +00:00
Jakub Jelinek 780248c402 * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
targ_extra_libpath.
	(sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
2001-02-09 15:55:14 +00:00
Phil Blundell 0e2534bd04 2001-02-06 Philip Blundell <philb@gnu.org>
* Makefile.am: Remove mention of earmelf_linux26.
	* Makefile.in: Regenerate.
2001-02-06 08:19:34 +00:00
Phil Blundell 46c1ea57dc 2001-02-04 Philip Blundell <philb@gnu.org>
* emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
	* emulparams/armelf_linux26.sh: Delete.
	* configure.tgt: Remove mention of armelf_linux26 emulation.
2001-02-04 14:01:35 +00:00
Nick Clifton 0088edd2a0 Replace occurances of -oformat with --oformat. 2001-02-01 18:44:43 +00:00
Alan Modra 02aa14fb32 (lang_leave_overlay): Don't set lma_region when load_base is specified. 2001-01-25 02:31:42 +00:00
Hans-Peter Nilsson f813923cf3 * emultempl/elf32.em: Correct spelling in comments and listed
options.
2001-01-24 06:14:09 +00:00
Alan Modra c1eb148815 Only set lma_region from the default for the first section
of a group of overlay sections.
2001-01-23 11:48:28 +00:00
Alan Modra d9fc371418 Allow Maciej to select weird --libdir options and still select
tooldir correctly.
2001-01-22 13:50:17 +00:00
Jim Wilson 6be0ca9435 Fix gp overflow problem with Intel compiler.
* emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Add IA_64.unwind
	and IA_64.unwind.info.
2001-01-16 23:44:26 +00:00
H.J. Lu b92473047e 2001-01-16 H.J. Lu <hjl@gnu.org>
* ldlang.c (lang_check): Merge the private data only if the
	input file has contents.
2001-01-16 21:04:29 +00:00
Alan Modra d952f17a9d Linux target variants for elfxx-hppa. 2001-01-14 11:12:53 +00:00
Alan Modra ffd6e9debc Automatically enable --unique=.text for elf32-hppa. 2001-01-14 07:39:01 +00:00
Alan Modra 577a062318 Extend "ld --unique" functionality. 2001-01-14 04:36:35 +00:00
Nick Clifton b7ed8fad53 formatting fix 2001-01-13 19:45:52 +00:00
Nick Clifton d0398d6ac6 Update copyright date to 2001 2001-01-12 18:01:56 +00:00
Phil Blundell 350fdb00d3 Add support for cygwin libraries 2001-01-12 12:43:10 +00:00
Nick Clifton 2f6d2f8520 Rotate ChangeLogs 2001-01-11 19:01:42 +00:00
Kazu Hirata 69f069696b 2001-01-10 Kazu Hirata <kazu@hxi.com>
* scripttempl/h8500.sc: Fix formatting.
	* scripttempl/h8500b.sc: Likewise.
	* scripttempl/h8500c.sc: Likewise.
	* scripttempl/h8500m.sc: Likewise.
	* scripttempl/h8500s.sc: Likewise.
2001-01-10 18:58:36 +00:00
Kazu Hirata 60c6797e42 2001-01-10 Kazu Hirata <kazu@hxi.com>
* scripttempl/h8300.sc: Fix formatting.  Fix a comment typo.
	* scripttempl/h8300h.sc: Fix formatting.
	* scripttempl/h8300s.sc: Likewise.
2001-01-10 11:42:27 +00:00
David O'Brien 482e8b3206 2000-01-07 David O'Brien <obrien@BSDi.com>
* emultempl/elf32.em: Only perform Linux ld hints processing when
	targeting Linux.

Approved by:  Nick Clifton <nickc@redhat.com>
              Message-Id: <200101040127.RAA15127@elmo.cygnus.com>
2001-01-08 05:25:58 +00:00
Phil Blundell d7ed7ca67b 2001-01-07 Philip Blundell <philb@gnu.org>
* ld.texinfo (Bug Reporting): Update email address for reports.
2001-01-07 15:12:04 +00:00
Nick Clifton 0fc3347a5c Fix problems with new EXACTLY_TWO_DASHES command line switch option. 2000-12-31 19:56:04 +00:00
Nick Clifton e4897a3288 Requre that long options starting with 'o' only accept a double dash prefix. 2000-12-28 19:54:33 +00:00
Nick Clifton 1122a5fc50 Add --no-default-excludes option for PE targets 2000-12-26 20:55:30 +00:00
Nick Clifton 037849a9a0 Revert the last beautification with "innocent" whitespace,
it breaks the K&R C preprocessor.
2000-12-13 18:28:52 +00:00
DJ Delorie 7ec229cebe * ld.texinfo: Add notes about --whole-archive and gcc. 2000-12-12 22:37:20 +00:00
Nick Clifton b79e8c7865 Add link option to allow undefiedn symbols in shared libraries 2000-12-12 20:53:02 +00:00
Geoffrey Keating 9a8e2505e8 * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS):
.fixup is actually read/write.
	* emulparams/elf32lppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/elf32ppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
	* emulparams/elf32lppcsim.sh (OTHER_READWRITE_SECTIONS): Likewise.
2000-12-12 20:15:21 +00:00
Jan Hubicka b8355149f8 * NEWS: Add note about x86_64 architecture.
* MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer.
2000-12-11 13:49:46 +00:00
DJ Delorie 93b63cd3a0 * scripttempl/i386go32.sc: Use PROVIDE with _etext, _edata, _end.
Set DWARF2 sections to a VMA of zero.
2000-12-06 16:39:51 +00:00
Nick Clifton 24f6971a0f Update RTEMS targets 2000-12-01 18:28:58 +00:00
Nick Clifton 2be3aa031f Add support for x86_64-*-linux-gnu* target 2000-11-30 19:30:33 +00:00
Hans-Peter Nilsson 8c8998585a * emulparams/crislinux.sh (ENTRY): Change back to _start.
(TEXT_START_SYMBOLS): Remove conditional setting of __start.

	* scripttempl/crisaout.sc: Change all RELOCATING not related to
	merging non-a.out sections into CONSTRUCTING.
2000-11-30 15:08:44 +00:00
Nick Clifton e47b9e39bc Move GNU Free Documentation License from the output into a comment 2000-11-28 20:40:35 +00:00
David O'Brien ad95f82a09 2000-11-28 David O'Brien <obrien@dragon.nuxi.com>
* emulparams/elf64alpha.sh (ENTRY): Remove leading underscore as ELF
	does not use them.

Approved by:  Richard Henderson <rth@twiddle.net>
              Message-ID: <20001127014059.A16638@twiddle.net>
2000-11-28 10:43:11 +00:00
David O'Brien fd89e65f16 2000-11-25 David O'Brien <obrien@FreeBSD.org>
* ld.1: Remove old date so it does not give the impression the
	manpage is way out of date.

Approved by:  Nick Clifton <nickc@redhat.com>
              <200011250036.QAA09984@elmo.cygnus.com>
2000-11-25 10:58:09 +00:00
Nick Clifton 077b8428ab Add ARM v5t, v5te and XScale support 2000-11-25 00:21:40 +00:00
Nick Clifton 49425d281c Remove redundant init of config.make_executable to true. 2000-11-24 21:31:21 +00:00
Richard Henderson d34802440c * emulparams/elf64alpha.sh (MAXPAGESIZE): Typo -- 64k, not 1M. 2000-11-15 23:16:30 +00:00
Kazu Hirata 1ce7de8b08 2000-11-14 Kazu Hirata <kazu@hxi.com>
* scripttempl/h8300.sc: Fix formatting.
	* scripttempl/h8300h.sc: Likewise.
	* scripttempl/h8300s.sc: Likewise.
2000-11-14 19:17:53 +00:00
Denis Chertykov 208d5cd0ad * scripttempl/elf32avr.sc: Fix bug in .eeprom segment. 2000-11-13 22:26:38 +00:00
Phil Blundell 2e41854770 2000-11-09 Philip Blundell <pb@futuretv.com>
* emultempl/pe.em: Define ___start_SECNAME and ___stop_SECNAME
	around orphan sections whose names can be represented in C.
2000-11-13 10:15:23 +00:00
Jim Wilson c940e6fcdf Handle srdata sections emitted by Intel compiler.
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): New local
	hold_sdata.  If SEC_SMALL_DATA set, set place to hold_sdata.
2000-11-08 00:39:32 +00:00
Nick Clifton cf055d540c Add GNU Free Documentation License 2000-11-06 20:27:26 +00:00
Nick Clifton 704c465c23 Add GNU Free Documentation License 2000-11-06 19:24:16 +00:00
Alan Modra dca7760fb5 * ldlex.l (yy_create_string_buffer): Init all structure fields.
* Makefile.am (DISTCLEANFILES): Add stringify.sed.
Move 2000-11-02 Makefile.in changes to this file.
2000-11-05 06:27:15 +00:00
Nick Clifton 40a633d5ca Use ${CONSTRUCTING...} to enclose constructors and destructors. 2000-11-03 19:49:05 +00:00
Nick Clifton 59ff2774bb Add support for *-storm-chaos target 2000-11-02 23:03:24 +00:00
Jakub Jelinek 645571e107 * emulparams/elf64_sparc.sh (TEXT_START_ADDR,
NONPAGED_TEXT_START_ADDR): Set to 4GB for Solaris targets.
	Fix sed invocation, so that it coped with '/' in Solaris 64bit
	library path suffix.
	Based on patch by Andrew Macleod <amacleod@cygnus.com>.
2000-10-20 10:58:32 +00:00
Hans-Peter Nilsson c5975a4546 * scripttempl/crisaout.sc (.text, .data): Pad, with ALIGN (32),
for consecutive sections.
2000-10-18 13:10:12 +00:00
Chandra Chavva ea20a7da87 Added new option --target-help. 2000-10-17 20:10:20 +00:00
Nick Clifton 6e45556a36 Add tests of return values from bfd function calls 2000-10-16 19:08:45 +00:00
Nick Clifton 102c86f873 Oops - fix mistake in previous delta where unused variable 'nsyms' was
deleted, but along with its (necessary) call to bfd_canonicalize_symtab.
2000-10-13 20:41:08 +00:00
Nick Clifton b9a6918857 Add #ifdef DLL_SUPPORT around use of pe_dll_search_prefix. 2000-10-13 20:16:03 +00:00
DJ Delorie 627427debc * emultempl/pe.em (pe_dll_search_prefix): New variable,
(longopts): New --dll-search-prefix option.
(gld_${EMULATION_NAME}_list_options): Document.
(gld_${EMULATION_NAME}_parse_args): Handle.
(gld_${EMULATION_NAME}_open_dynamic_archive): When linking
dynamically, search for a dll named '<prefix><basename>.dll'
in preference to 'lib<basename>.dll' if --dll-search-prefix
is specified.
2000-10-12 19:18:20 +00:00
Alan Modra 24376d1b58 Another try at correcting relocations against discarded
link-once section symbols.
2000-10-12 03:44:51 +00:00
Kazu Hirata e47d05ade6 2000-10-10 Kazu Hirata <kazu@hxi.com>
* deffile.h: Fix formatting.
	* lexsup.c: Likewise.
	* mri.c: Likewise.
2000-10-11 00:16:07 +00:00
DJ Delorie 23a87948dd * pe-dll.c (make_one): Do not generate code thunk for DATA
exports.
(process_def_file): deduce DATA flag for auto-export sumbols.
2000-10-10 03:28:01 +00:00
Kazu Hirata 7bfd51a382 2000-10-09 Kazu Hirata <kazu@hxi.com>
* pe-dll.c: Revert some formatting fixes.
2000-10-09 15:46:45 +00:00
Kazu Hirata 89cdebba13 2000-10-09 Kazu Hirata <kazu@hxi.com>
* ldcref.c: Fix formatting.
	* ldctor.h: Likewise.
	* ldemul.c: Likewise.
	* ldemul.h: Likewise.
	* ldexp.c: Likewise.
	* ldexp.h: Likewise.
	* ldfile.c: Likewise.
	* ldfile.h: Likewise.
	* ld.h: Likewise.
	* ldlang.c: Likewise.
	* ldlang.h: Likewise.
	* ldmain.c: Likewise.
2000-10-09 15:09:17 +00:00
Kazu Hirata 86b1cc60c0 2000-10-09 Kazu Hirata <kazu@hxi.com>
* pe-dll.c: Fix formatting.
2000-10-09 07:01:29 +00:00
Kazu Hirata d643799dab 2000-10-08 Kazu Hirata <kazu@hxi.com>
* pe-dll.c: Fix formatting.
2000-10-09 01:37:11 +00:00
Kazu Hirata 08da4cac4a 2000-10-05 Kazu Hirata <kazu@hxi.com>
* ldlang.c: Fix formatting.
2000-10-05 13:03:30 +00:00
DJ Delorie c2a94a7afd * pe-dll.c (fill_edata): initialize entire block
(make_one): fill in correct section.
2000-10-03 22:07:17 +00:00
Kazu Hirata 8c95a62eae 2000-10-03 Kazu Hirata <kazu@hxi.com>
* ldexp.c: Fix formatting.
2000-10-03 07:31:55 +00:00
DJ Delorie 486e80e2d5 * emultempl/pe.em (gld_*_after_open): detect case where there two
import libraries for same dll; rename one to ensure proper link
order.

* pe-dll.c (process_def_file): compare ordinals to -1, not 0; fix
typo
(generate_edata): fix typo
2000-10-02 14:39:46 +00:00
Hans-Peter Nilsson 24dd9f7582 * scripttempl/crisaout.sc (ENTRY): Now __start.
(.text): Add default setting for __start.
	Remove CONSTRUCTORS handling.
	(/DISCARD/): Add .gnu.warning.*.
	* emulparams/crislinux.sh (ENTRY): Now __start.
	(TEXT_START_SYMBOLS): New; provide __Stext and __start default.
	* emulparams/criself.sh (OUTPUT_FORMAT): Now elf32-us-cris.
	(ENTRY): Now __start.
	(INITIAL_READONLY_SECTIONS): Add KEEP for .startup.
	(EXECUTABLE_SYMBOLS): Add default setting for __start.
2000-09-29 19:03:57 +00:00
Kazu Hirata 5cc18311d9 2000-09-29 Kazu Hirata <kazu@hxi.com>
* 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-29 13:21:41 +00:00
Kazu Hirata 4de2d33d1b 2000-09-29 Kazu Hirata <kazu@hxi.com>
* ldcref.c: Fix formatting.
	* ldctor.c: Likewise.
	* ldemul.c: Likewise.
	* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
2000-09-29 11:18:18 +00:00
DJ Delorie 45b1f63c8c * pe-dll.c (process_def_file): Uninitialized data wasn't
exported with --export-all-symbols switch.

* pe-dll.c (fill_edata): rearrange the data so that ordinals and
noname work properly.
2000-09-28 20:53:40 +00:00
Alan Modra 47d89dba5e .plt stub for lazy linking, --stub-group-size=N ld switch,
import stub fix, extra DIR14F reloc to fix abort in tc_gen_reloc
2000-09-27 17:30:19 +00:00
Nick Clifton 36bdbeeca5 Conditionalise the embedded relocs feature on the m68*-*-elf target 2000-09-22 00:41:50 +00:00
Kazu Hirata 6d5e62f8b5 2000-09-21 Kazu Hirata <kazu@hxi.com>
* ldmain.c: Fix formatting.
	* ldmisc.c: Likewise.
	* ldver.c: Likewise.
	* ldwrite.c: Likewise.
2000-09-21 20:21:59 +00:00
Alan Modra e2eb67d9cb Silence gcc warning. 2000-09-21 14:21:24 +00:00
Alan Modra b3ea35849f Handle out of memory situations. 2000-09-20 04:20:26 +00:00
Alan Modra 25f7275229 Group stub sections. 2000-09-18 12:22:43 +00:00
Nick Clifton 0752970ef8 add support for embedded relocs in m68k ELF port 2000-09-15 18:52:52 +00:00
Alan Modra 92b7e9d81a (DATA_START_SYMBOLS): Provide $global$ only as needed. 2000-09-15 10:42:27 +00:00
Nick Clifton 9b14b192bb Disable relaxation if multiple symbol definitions are encountered - otherwise
the linker could abort with an assertion failure.
2000-09-14 01:39:42 +00:00
Nick Clifton 891fa26635 Fix formatting 2000-09-10 19:53:58 +00:00
H.J. Lu 5d64ca4ed3 2000-09-07 H.J. Lu <hjl@gnu.org>
* configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
	* configure: Rebuild.
2000-09-07 21:08:51 +00:00
H.J. Lu dd94604f29 2000-09-07 H.J. Lu <hjl@gnu.org>
* Makefile.am (lexsup.o): Also depend on $(INCDIR)/demangle.h.
	* Makefile.in: Rebuild.
2000-09-07 19:52:17 +00:00
Alan Modra ed15ac6a0a Fix an orphan section problem caused by weird linker scripts. 2000-09-07 09:09:19 +00:00
Alan Modra 71bfc0aef6 Fix list handling for orphan section output statements. 2000-09-07 07:08:58 +00:00
Alexandre Oliva 4a428502cb * configure.tgt (sh-*-linux*): Added.
* Makefile.am: Added eshelf_linux and eshlelf_linux.
* Makefile.in: Rebuilt.
* emulparams/shelf_linux.sh: New file.
* emulparams/shlelf_linux.sh: New file.
2000-09-07 04:32:05 +00:00
Alan Modra f998903041 Fix place_orphan crash. 2000-09-06 15:28:25 +00:00
Alexandre Oliva 58cccadbd4 * configure: Rebuilt with new libtool.m4. 2000-09-06 13:57:41 +00:00
Alan Modra 50bbae350b Correct gas/ChangeLog 2000-06-23 entry, which I thought I'd fixed
already.  Other changes are whitespace.
2000-09-06 02:58:59 +00:00
Nick Clifton 5b343f5ae8 Regenerate files using fixed aclocal install. 2000-09-06 00:13:34 +00:00
Alan Modra 3231d22e8f Shared lib support for elf32-hppa 2000-09-05 04:07:46 +00:00
Alan Modra 5f992e6228 A tidy of ld/ldlang.c, and add missing Makefile dependencies
I should have added with the 2000-07-28 patch.
2000-09-05 03:21:16 +00:00
Alan Modra a854a4a7c8 --split-by-reloc, --split-by-file extensions. --unique option. 2000-09-05 03:05:19 +00:00
Nick Clifton 6ddeca85d5 Fix formatting and spelling msitakes 2000-09-03 19:47:59 +00:00
Nick Clifton 18e03609ef Increase minor version number (to 2.10.91) to help tools detect the new
ability to support removal of duplciate DWARF@ debug information.
2000-09-02 21:35:47 +00:00
Nick Clifton 3a9d486c00 Add .gnu.linkonce.wi.* to .debug_info sections. 2000-09-02 20:43:22 +00:00
Alexandre Oliva ac48eca1ad * acinclude.m4: Include libtool and gettext macros from the
top level.
* aclocal.m4, configure: Rebuilt.
2000-08-31 09:46:11 +00:00
Nick Clifton c13b1b775b When choosing the target for a particular endianness, do nothing if the target
is not supported.
2000-08-25 20:44:09 +00:00
H.J. Lu dcb0bd0eef 2000-08-24 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
	check -rpath nor LD_RUN_PATH for cross link.
	* ld.texinfo: Document the change.
2000-08-25 20:24:11 +00:00
Hans-Peter Nilsson 5bcac8a48e * NEWS: Mention support for CRIS. 2000-08-24 17:42:52 +00:00
H.J. Lu 6dd8c765d3 2000-08-23 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
	the current runpath list from bfd_elf_get_runpath_list ()
	before search.
2000-08-23 23:03:00 +00:00
H.J. Lu a8175964e0 Change News to NEWS. 2000-08-23 16:42:13 +00:00
H.J. Lu ec4eb78a39 2000-08-22 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
	the DT_RPATH/DT_RUNPATH entries for DT_NEEDED after
	LD_LIBRARY_PATH for native linker. Display the needed DSO if
	trace_file_tries is non-zero.
	(gld${EMULATION_NAME}_try_needed): Report the needed DSO found
	if trace_file_tries is non-zero.

	* ld.texinfo: Document the usage of DT_RPATH/DT_RUNPATH.
	* News: Mention it.
2000-08-22 19:34:37 +00:00
Jason Eckhardt 22b36938e7 2000-08-14 Jason Eckhardt <jle@cygnus.com>
* NEWS: Mention i860 support.
2000-08-14 18:50:13 +00:00
Andreas Schwab d73e9da0eb * scripttempl/elf.sc: Fix last change to use correct comment
syntax.
2000-08-14 08:59:40 +00:00
Geoffrey Keating 9ac4db9c1c * scripttempl/elf.sc: Add a comment giving the correspondence
between sections, per-datum sections, and linkonce sections.  Make
the comment true even for .bss, .sdata, .sdata2, .sbss, and
.sbss2.
2000-08-10 23:43:57 +00:00
Jason Eckhardt 165589e4ad 2000-08-10 Jason Eckhardt <jle@cygnus.com>
* emulparams/elf32_i860.sh: New file.
        * configure.tgt: Recognize new target i860-stardent-{sysv4*|elf*}.
        * Makefile.am (ALL_EMULATIONS): Add eelf32_i860.o.
        (eelf32_i860.c): New rule.
        * Makefile.in: Regenerate.
2000-08-10 20:40:39 +00:00
Nick Clifton 345a835d18 Add defintion of ENTRY 2000-08-10 19:07:26 +00:00
Nick Clifton e374f1d977 Refer to -rpath not --rpath in error message 2000-08-09 00:51:42 +00:00
Nick Clifton 236d5abf99 Define __bss_size symbol to indicate the final size of .bss section. 2000-08-08 22:04:32 +00:00
Alan Modra 4b209b2234 Keep track of last optind value, and rename a couple of functions
for consistency.
2000-08-04 04:41:33 +00:00
Alan Modra 28423a689e Select elf for Unixware 7 (ix86-*-sysv5*) 2000-08-03 01:01:05 +00:00
H.J. Lu b2009ff751 2000-07-27 H.J. Lu <hjl@gnu.org>
* emulparams/elf64alpha.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.
	(PARSE_AND_LIST_EPILOGUE): Likewise.
2000-07-28 01:53:29 +00:00
Alan Modra 41392f033d Add some shell variables and shell code to elf32.em
to allow elf32.em to be used by ports that require
some minor variations or a few extra functions.
Implement for hppaelf and armelf.
Fix header file include order in m68kcoff.em
2000-07-28 01:33:14 +00:00
Alan Modra 04925e1e0b Move functions around in preparation for next patch 2000-07-28 01:07:09 +00:00
Nick Clifton 88cdf29775 Implement -taso command line option. 2000-07-28 00:57:45 +00:00
Nick Clifton 20bccb3485 Applied Michael's Sokolov's patch to implement --embedded-relocs for m68k coff. 2000-07-21 23:31:53 +00:00
H.J. Lu 699845ef7b 2000-07-20 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (longopts): Duplicate "disable-new-dtags"
	and "disable-new-dtags" to stop getopt from treating -d/-e as
	abbreviations for these options.
2000-07-20 21:59:40 +00:00
H.J. Lu 6c1439be21 2000-07-20 H.J. Lu <hjl@gnu.org>
* ld.texinfo: Add documentation for --disable-new-dtags and
	--enable-new-dtags.

	* ldmain.c (main): Initialize link_info.new_dtags to false.

	* emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
	--disable-new-dtags and --enable-new-dtags.
	(gld_${EMULATION_NAME}_list_options): Likewise.
2000-07-20 21:18:23 +00:00
Nick Clifton 28c309a287 Add optional style argument to --demangle switch. 2000-07-20 18:02:56 +00:00
Hans-Peter Nilsson 9d06555c53 * Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
ecrislinux.o.
	(ecrisaout.c, ecriself.c, ecrislinux.c): New rules.
	Regenerate dependencies.
	* Makefile.in: Rebuild.
	* configure.tgt (cris-*-*): New target.
	* emulparams/crisaout.sh, emulparams/criself.sh,
	emulparams/crislinux.sh, scripttempl/crisaout.sc: New files.
	* po/POTFILES.in, po/ld.pot: Regenerate.
2000-07-20 17:16:06 +00:00
H.J. Lu 19e3be22a4 2000-07-20 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld_${EMULATION_NAME}_list_options):
	Print out ignored -z options.
2000-07-20 16:13:26 +00:00
H.J. Lu e0ee487bb5 2000-07-19 H.J. Lu <hjl@gnu.org>
* 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-20 03:25:10 +00:00
H.J. Lu 49e56c493d 2000-07-19 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
	bfd_elf_set_dt_needed_soname ().
2000-07-20 03:17:32 +00:00
DJ Delorie 9d68bc829c * pe-dll.c (pe_dll_id_target): check object target name also 2000-07-19 00:04:04 +00:00
Hans-Peter Nilsson 53db15ed2a * scripttempl/elf.sc (.init): Only do ${INIT_START} and
${INIT_END} if relocating.
	(.fini): Likewise ${FINI_START} and ${FINI_END}.
2000-07-17 22:41:08 +00:00
DJ Delorie 0ad8cf4c25 * src/ld/emultempl/pe.em (gld_*_open_dynamic_archive): New search
order for dynamic library '-lfoo' on pei386: libfoo.dll.a,
foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility
errors introduced by the old dynamic lib search order.
2000-07-17 18:59:58 +00:00
DJ Delorie 874c8c99db * pe-dll.c (process_def_file): auto-export data items also
(pe_process_import_defs): also see if _imp_ form needed
2000-07-17 18:40:47 +00:00
DJ Delorie 5b4cf3f497 * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
for dll import libraries
2000-07-13 00:51:40 +00:00
Nick Clifton 062739d151 Support the g++ attribute init_priority in gcc 2.95.2 and later. 2000-07-12 16:41:29 +00:00
Nick Clifton 1c64c4ed86 Fix formatting and add missing new lkine at end of error message 2000-07-11 20:17:02 +00:00
Alan Modra b71e277823 Remove some forward declarations in ldemul.h and ldfile.h, and
re-arrange header include order.
Fix shadowing warnings in ldlang.h
Fix compile errors in mpw-elfmips.c
2000-07-11 03:42:41 +00:00
H.J. Lu 2ef53d6665 2000-07-10 H.J. Lu <hjl@gnu.org>
* emultempl/pe.em (pe_enable_stdcall_fixup): Protect with
	DLL_SUPPORT.
	(strhash): Likewise.
	(compute_dll_image_base): Likewise.
	(pe_undef_found_sym): Likewise.
	(pe_undef_cdecl_match): Likewise.
	(gld_${EMULATION_NAME}_open_dynamic_archive): Mark the
	argument "arch" with ATTRIBUTE_UNUSED.
2000-07-10 17:20:35 +00:00
Alan Modra 9a8cbb092b Warning fix and remove extraneous hppa*-*-linux-gnu*. 2000-07-10 17:15:11 +00:00
Alan Modra 4900fc0695 hppaelf.em: Merge from elf32.em and implement multiple linker stubs.
Makefile.am: Re-enable ehppaelf.o, add ehppalinux.o
configure.tgt: targ_emul=hppalinux for hppa*linux
2000-07-09 08:45:29 +00:00
Alan Modra 227aeb0758 Fix --section-start=xxxx 2000-07-08 13:35:05 +00:00
DJ Delorie 28609fd471 minor formatting change 2000-07-07 20:10:28 +00:00
DJ Delorie 602e90d3d5 * ld/emultempl/pe.em: institute the following search order for
dynamic libraries on pei386: libfoo.dll.a, foo.dll.a (import
libs), libfoo.dll, foo.dll (link direct to dll).  Fall back to
static lib (libfoo.a) if none of the above are found.
2000-07-07 20:09:28 +00:00
DJ Delorie 5f577f7d70 * ld/emultempl/pe.em (pe_enable_auto_image_base): New variable.
(longopts): New --{enable,disable}-auto-image-base options.
(gld_${EMULATION_NAME}_list_options): Document.
(gld_${EMULATION_NAME}_parse): Handle.
(strhash): New static function.
(compute_dll_image_base): New static function.
(gld_${EMULATION_NAME}_set_symbols): Use.
2000-07-07 20:01:35 +00:00
DJ Delorie 302ab118e1 add MAINTAINERS files 2000-07-05 19:28:06 +00:00
Ulf Carlsson 3548145dcb 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
* configure.tgt: Add traditional mips (mips*-*-sysv4*) target.
        * emulparams/elf32btsmip.sh: New file.
        * Makefile.am: Add traditional mips target.
        * Makefile.in: Rebuild.
2000-07-02 01:15:56 +00:00
H.J. Lu 6779803381 2000-07-01 H.J. Lu <hjl@gnu.org>
* Makefile.am (EXTRA_ld_new_SOURCES): Set to deffilep.y for
	automake to use YLWRAP.
	* Makefile.in: Rebuild.
2000-07-01 19:26:41 +00:00
Alan Modra 0bdaf48bac Fix 2000-06-22. grep after running dep.sed 2000-07-01 01:41:09 +00:00
Timothy Wall c9e769c2b1 Remove unimplemented "PAGE N:" flag from default linker script. 2000-06-30 12:36:38 +00:00
Nick Clifton 65aa24b6e8 Applied Marek Michalkiewicz <marekm@linux.org.pl>'s patch to ehance the AVR port. 2000-06-27 01:45:30 +00:00
Alan Modra 4667035e30 arm-elf does --gc-sections too. 2000-06-24 04:48:41 +00:00
Alan Modra 1581f8c9fe Ensure /usr/include and the like stay out of dependencies. 2000-06-22 13:01:43 +00:00
H.J. Lu 0158099299 2000-06-21 H.J. Lu <hjl@gnu.org>
* Makefile.am: Rebuild dependency.
	* Makefile.in: Rebuild.
2000-06-22 03:35:54 +00:00
H.J. Lu bbeb2e037c 2000-06-20 H.J. Lu <hjl@gnu.org>
* Makefile.am: Rebuild dependency.
	* Makefile.in: Rebuild.
2000-06-20 20:41:02 +00:00
Timothy Wall 74459f0e3e tic54x/ibmc54xdsp target for ld. 2000-06-20 13:29:07 +00:00
Alan Modra 2ab47eed68 Correct pointer comparisons relying on NULL less than any other pointer.
Alexander Aganichev's fix for ieee.c
2000-06-20 12:33:21 +00:00
Alan Modra 919e40930f Move "Changes in version 2.10" to where it belongs. 2000-06-19 02:36:45 +00:00
Alan Modra 987fd5b44e Update list of targets supporting --gc-sections.
KEEP .eh_frame contents.
2000-06-19 02:05:53 +00:00
Nick Clifton 60bcf0fa8c Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add support
for m68hc11 and m68hc12 processors.
2000-06-19 01:22:44 +00:00
Alan Modra c7c544834a Correctly set SEC_READONLY for .text section. 2000-06-15 09:09:13 +00:00
H.J. Lu bcef29e60c 2000-06-13 H.J. Lu <hjl@gnu.org>
* configure: Regenerate.
2000-06-13 19:11:54 +00:00
David O'Brien 946efd95b8 * configure.in (VERSION): Update to show this is the CVS mainline.
Approved by:	Nick Clifton <nickc@cygnus.com>
		Message-Id: <200005222205.PAA14565@elmo.cygnus.com>
2000-06-08 19:00:02 +00:00
David O'Brien 57a6fd078e * emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
input objects to be ECOFF.
(check_sections): einfo takes %B, not %P, to print a BFD name.

Approved by:	Nick Clifton <nickc@cygnus.com>
		Message-Id: <200006081748.KAA12555@elmo.cygnus.com>
2000-06-08 18:39:43 +00:00
H.J. Lu e06cae3665 2000-06-05 Michael Matz <matz@ifh.de>
* ldgram.y (vers_defns): Handle 'extern "C++" { ... }' in
	 version scripts.

	 * ldlex.l (V_IDENTIFIER): Accept `::' in symbols.
2000-06-05 16:16:31 +00:00
Denis Chertykov 2f0b56c07d * emulparams/avr1200.sh (STACK): Define as 0.
* emulparams/avr23xx.sh (STACK): Define as last internal SRAM address.
	* emulparams/avr4433.sh (STACK): Likewise.
	* emulparams/avr44x4.sh (STACK): Likewise.
	* emulparams/avr85xx.sh (STACK): Likewise.
	* emulparams/avrmega103.sh (STACK): Likewise.
	* emulparams/avrmega161.sh (STACK): Likewise.
	* emulparams/avrmega603.sh (STACK): Likewise.
	* scripttempl/elf32avr.sc (__data_start): Define for gcrt1.
	(__stack): Define from ${STACK} for main().
2000-05-27 15:36:58 +00:00
Alan Modra 2114f57b93 Update dependencies. 2000-05-26 14:14:21 +00:00
Alan Modra 5af11cab92 Eli Zaretskii's DOSish file name patches. 2000-05-26 13:11:57 +00:00
Nick Clifton 1f0df59a27 When deciding if ".text" section should be read-only, don't forget to reset
SEC_READONLY because it could be already set.
2000-05-23 21:03:35 +00:00
Nick Clifton 176355da99 Patch from Thomas de Lellis to implement --section-start 2000-05-22 21:58:40 +00:00
H.J. Lu 8c5ff9729d 2000-05-18 H.J. Lu <hjl@gnu.org>
* lexsup.c (parse_args): `i' == `r', not `q'.
2000-05-18 22:01:04 +00:00
Jeff Law 0b76fe778f * configure.tgt (hppa*64*-*-*): Enable PA64 target. 2000-05-18 16:48:14 +00:00
Nick Clifton a712da2085 Apply patch from Richard Gorton <gorton@scrugs.lkg.dec.com> to implement
--emit-relocs switch to the linker to preserve relocs in an output executable
2000-05-17 19:38:53 +00:00
Nick Clifton 690a460e0c Apply patch from Charles Wilson to make PE ports search for dynamic libraries
in foo.dll and libfoo.dll before libfoo.a.
2000-05-16 20:53:26 +00:00
Alan Modra c2f1343c8b Update printed copyright. 2000-05-15 02:17:52 +00:00
Alan Modra 897083bdcd Quell some gcc warnings by defining textdomain and bindtextdomain
as intl/libgettext.h does.
2000-05-13 13:05:36 +00:00
H.J. Lu cd4c806ac9 2000-05-10 H.J. Lu <hjl@gnu.org>
* ldlang.c (open_input_bfds): Don't load the same file within
	a group again if the whole archive has been loaded already.
2000-05-10 23:12:35 +00:00
Alan Modra 9369728402 Fix 64 bit target section start on 32 bit machine. 2000-05-03 11:22:42 +00:00
Jim Wilson 99a4150f8b Fix just added ia64-linux support to conform with others.
* configure.host (ia64-*-linux-gnu*): Change gcc to ${CC}.
2000-05-02 00:58:51 +00:00
Jim Wilson ebd6fc2935 Ld testsuite support for ia64-linux.
* configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
	host "ia64-*-linux-gnu*".
2000-05-02 00:39:34 +00:00
Alan Modra a1934524a3 Correctly check gcc version. 2000-04-29 00:56:29 +00:00
Jeff Law 730a39a0a3 * Makefile.am: Add PA64 support. Add missing dependencies for
PA32 elf support.
        * Makefile.in: Rebuilt.
        * configure.tgt: Add PA64 support (currently disabled).
2000-04-25 17:21:28 +00:00
Alan Modra aea4bd9d34 place_orphan optimisations 2000-04-25 05:14:16 +00:00
Nick Clifton 2b5fc1f5d0 Note that output section data commands can only appear inside output section
descriptions and not between them.
2000-04-25 00:27:24 +00:00
Jeff Law d8475ff6b6 * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support. 2000-04-21 21:52:48 +00:00
Jim Wilson 800eeca487 IA-64 ELF support. 2000-04-21 20:22:24 +00:00
Richard Henderson c9637625e4 * scripttempl/elfd30v.sc: Place .gcc_except_table. 2000-04-21 17:29:15 +00:00
Alan Modra 28ea9521fe Match space at start of file name, not end. 2000-04-20 02:13:01 +00:00
H.J. Lu 20d04697a8 2000-04-18 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
	lang_leave_output_section_statement () after calling
	lang_enter_output_section_statement ().
	* emultempl/armelf.em: Likewise.
2000-04-18 23:39:03 +00:00
Alan Modra 5ba474214c Yet another set of fixes for orphan sections. 2000-04-18 05:53:41 +00:00
Geoffrey Keating bdbe570575 * scripttempl/elfppc.sc: Remove.
* emulparams/elf32ppc.sh: Use elf.sc.
* emulparams/elf32lppc.sh: Use elf.sc.
* emulparams/elf32ppclinux.sh: Use elf.sc.
* emulparams/elf32ppcsim.sh: New file.
* emulparams/elf32lppcsim.sh: New file.
* Makefile.am: Update dependencies.  Add elf32ppcsim ad elf32lppcsim.
(ALL_EMULATIONS): Add elf32ppcsim ad elf32lppcsim.
* Makefile.in: Regenerate.
* configure.tgt (powerpc-*): Add elf32ppcsim and elf32lppcsim.
2000-04-14 21:18:23 +00:00
Alan Modra 01cc8ff856 Zero start address of orphan ~(SEC_LOAD | SEC_ALLOC) sections. 2000-04-14 01:58:29 +00:00
Geoffrey Keating 6c86c54107 * scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
Add new BSS_PLT variable for when .plt need not be contained in
the file.  Move _etext so that it is also after .fini, and provide
both etext and _etext with a leading underscore.  Mark the start
and end of .sbss.
2000-04-13 23:32:48 +00:00
Alan Modra 6a345e871d Keep output orphan sections in the same order as input. 2000-04-12 02:43:37 +00:00
Alan Modra 8be867464d Remove extraneous paragraph. 2000-04-11 11:39:38 +00:00
Andrew Cagney a2d91340f3 Remove ``-W -Wall'' from top-level Makefile/configure.
Add ``-W -Wall'' to sub-directories bfd, binutils, gas gprof, ld and
opcodes by the addition of WARN_CFLAGS to Makefile.am and configury to
set it.  Add configure option --enable-build-warnings.
Re-generate all and sundry using auto*-000227.
2000-04-09 12:17:43 +00:00
Alan Modra 8ad3436c79 Move translated part of bug report string back into .c files so
xgettext can find it.  Regnerate .pot files.
2000-04-04 14:32:35 +00:00
Alan Modra 41b49281c1 Use "gcc -MM" for dependencies, and update them. 2000-04-04 10:53:56 +00:00
Alan Modra c20f4f8c21 Move bug report string to one place. 2000-04-03 14:10:05 +00:00
Alan Modra adde6300e0 ATMEL AVR microcontroller support. 2000-03-27 08:39:14 +00:00
H.J. Lu 9282ff4155 2000-03-09 Andreas Jaeger <aj@suse.de>
* Makefile.am (check-DEJAGNU): Also unset LANG.
	* Makefile.in: Rebuild.
2000-03-09 16:41:21 +00:00
Ian Lance Taylor a999880517 * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
archive.
2000-03-06 18:08:38 +00:00
Nick Clifton f9bc20e78d Include getopt.h 2000-03-02 18:37:14 +00:00
Ian Lance Taylor 4e277b3808 * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware. 2000-03-02 01:35:52 +00:00
Nick Clifton f0c87f889d Fix building with --enable-targets=all. 2000-03-01 20:54:37 +00:00
H.J. Lu b6f29aaaea 2000-03-01 H.J. Lu <hjl@gnu.org>
* ldmain.c (undefined_symbol): Take one more arg, fatal, to
	indicate if the undefined symbol is a fatal error or not.
	Don't delete the output file if "fatal" is false.
2000-03-01 19:37:03 +00:00
H.J. Lu af28fce3e5 2000-02-29 H.J. Lu <hjl@gnu.org>
* Makefile.am (check-DEJAGNU): Also pass LIBS="$(LIBS)".
	Set LC_COLLATE and LC_ALL to null and export them. It is for
	sort which expects the C locale.
	Add $(LIBS) to all $(HOSTING_LIBS).
	* Makefile.in: Rebuild.
2000-02-29 19:52:31 +00:00
Alan Modra 40d109bfbc GCC warning fix: Add missing NULL initialiser for find_potential_libraries. 2000-02-29 05:53:53 +00:00
Jim Blandy db5be682e7 *** empty log message *** 2000-02-29 03:29:27 +00:00
Ian Lance Taylor 3558ff4cdb 2000-02-27 Loren J. Rittle <ljrittle@acm.org>
* configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
	host "i[3456]86-*-freebsdelf*".
2000-02-28 04:31:30 +00:00
Ian Lance Taylor 4eee26817d 2000-02-27 Mark Elbrecht <snowball3@bigfoot.com>
* scripttempl/i386go32.sc: Move misplaced semicolons.
2000-02-28 03:55:16 +00:00
Ian Lance Taylor 8d75d12d1b * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
(ALL_64_EMULATIONS): Remove eelf64hppa.o.
	(eelf64hppa.c, ehppaelf.c): Remove targets.
	* Makefile.in: Rebuild.
2000-02-26 03:38:18 +00:00
Alexandre Oliva ad51fb572c * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
GNU/Linux/sparc, but keep the default as 32.
2000-02-25 19:43:12 +00:00
Alexandre Oliva a1836d496f * configure.tgt: Enable elf64_sparc on Solaris7+/sparc. And make
it default if sparcv9 or sparc64.
2000-02-25 19:30:22 +00:00
Nick Clifton 344a211f99 Add support for WinCE based toolchains. 2000-02-24 17:53:12 +00:00
Richard Henderson eaba1dd3fb * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
Add and use memory regions.
2000-02-23 23:38:47 +00:00
Alan Modra 5b93d8bb51 Add IBM 370 support. 2000-02-23 13:52:23 +00:00
Alan Modra f6af82bd44 This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings.  One usused var, and a macro parenthesis fix too.  Also check
input sections are elf when doing gc in elflink.h.
2000-02-21 12:01:27 +00:00
Richard Henderson 9e673ad141 * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION. 2000-02-16 19:07:43 +00:00
Timothy Wall 562d3460fb Add LMA memory region functionality. 2000-02-16 18:53:32 +00:00
Timothy Wall 9e4ed18ce8 These snippets were missed in the previous bytes vs octets patch to
the linker.
2000-02-09 14:42:48 +00:00
Timothy Wall 32edc927fa Fix typo in ALIGN_N usage. 2000-02-04 19:49:21 +00:00
Timothy Wall 4cbfc3ac19 Add octets vs bytes functionality to LD. 2000-02-03 18:24:46 +00:00
Alan Modra 305c72062b Most of these changes are really only cosmetic. The readelf.c patch
fixes a thinko in get_dynamic_flags.  I found at least one message
string that included a `%' being passed to printf in the format
argument.
2000-01-26 23:11:48 +00:00