2004-11-30 Paul Brook <paul@codesourcery.com>
[binutils-gdb.git] / ld / ChangeLog
index a1a68237698dce16c113efc050000113aa15c7b8..97cc36cd7e0be30c744f9d3a20a5288fca1c8e8c 100644 (file)
@@ -1,3 +1,466 @@
+2004-11-30  Paul Brook  <paul@codesourcery.com>
+
+       * emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
+
+2004-11-30  Tero Niemela  <tero_niemela@yahoo.com>
+
+       * Makefile.am: Change LOCALEDIR to $(datadir)/share.
+       * Makefile.in: Regenerate.
+
+2004-11-26  Melissa Mears  <asterisk@graces.dricas.com>
+
+       * emultempl/pe.em: Add --subsystem:xbox as well as
+       --subsystem:%d.
+       * ld.texinfo: (ld_options): Document acceptance of subsystem xbox
+       and numeric subsystems.
+
+2004-11-24  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldexp.c (fold_name): Correct PR 338 fix.
+
+2004-11-19  Mark Mitchell  <mark@codesourcery.com>
+
+       * Makefile.am (ALL_EMULATIONS): Add earmelf_linux_eabi.o.
+       (earmelf_linux_eabi.c): New target.
+       * configure.tgt (arm*-*-linux-gnueabi): Handle it.
+       * emulparams/armelf_linux_eabi.sh: New file.
+       * Makefile.in: Regenerated.
+
+2004-11-19  Nick Clifton  <nickc@redhat.com>
+
+       PR 518
+       * ld.texinfo (MEMORY): Update the descriptions of the ORIGIN and
+       LENGTH fields in the MEMORY command, to explicitly state that
+       symbols cannot be used in their expressions.
+
+2004-11-19  Jon Beniston <jon@beniston.com>
+
+       * ld/ldlex.l: Allow ORIGIN and LENGTH in EXPRESSION.
+       * ld/ldgram.y: Add ORIGIN and LENGTH expressions.
+       * ld/ldexp.c (fold_name): Implement LENGTH() and ORIGIN() functions 
+       which return the length and origin of a memory.
+       * ld/ld.texinfo: Document LENGTH() and ORIGIN() functions.
+       * NEWS: Mention support for ORIGIN and LENGTH operators.
+
+2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
+       a dynamic object for stubs.
+
+2004-11-04  Paul Brook  <paul@codesourcery.com>
+
+       * ld.texinfo: Document --default-imported-symver.
+       * ldmain.c (main): Set link_info.default_imported_symver.
+       * lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
+       (ld_options): Add --default-imported-symver.
+       (parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
+
+2004-11-08  Inderpreet Singh   <inderpreetb@nioda.hcltech.com>
+           Vineet Sharma      <vineets@noida.hcltech.com>
+
+       * Makefile.am: Add entries for new maxq-coff target.
+       * Makefile.in: Regenerate.
+       * configure.tgt: Add support for maxq.
+       * emulparams/maxqcoff.sh: New File.
+       * scripttempl/maxqcoff.sc: New linker script for target maxq.
+       * NEWS: Mention the new target.
+
+2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
+
+       * testsuite/ld-scripts/weak.exp: Enable test on PE,
+       XFAIL non-i386 PE.
+       * testsuite/ld-undefined/weak-undef.exp: Enable test on PE,
+       XFAIL non-i386 PE.
+       * testsuite/lib/ld-lib.exp (is_pecoff_format): New.
+
+2004-11-04  Daniel Jacobowitz  <dan@debian.org>
+
+       * Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
+       (earmelf_oabi.c): Remove rule.
+       * configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
+       * emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
+       * Makefile.in: Regenerated.
+
+2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
+
+       * configure.tgt (crisv32-*-*): Handle like cris-*-* for non-aout.
+       * emulparams/criself.sh (INIT_START): Remove emitted "push srp".
+       (FINI_START): Ditto.
+       (INIT_END): Remove emitted "jump [sp+]".
+       (FINI_END): Ditto.
+
+2004-11-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
+       (no_opd_opt, no_toc_opt): New static vars.
+       (ppc_before_allocation): Don't edit opt if no_opd_opt.  Call
+       ppc64_elf_edit_toc.
+       (OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
+       (PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
+       (PARSE_AND_LIST_OPTIONS): Describe new options.
+       (PARSE_AND_LIST_ARGS_CASES): Handle them.
+
+2004-10-27  Nick Clifton  <nickc@redhat.com>
+
+       * emultempl/alphaelf.em (alpha_after_parse): Add extra, NULL,
+       parameter to invocation of lang_section_start.
+       * emultempl/aix.em (_handle_option): Likewise.
+
+       * Makefile.am (eelf64alpha.c, eelf64alpha_fbsd.c,
+       eelf64alpha_nbsd.c): Add dependency upon emultempl/alphaelf.em.
+       * Makefile.in: Regenerate.
+
+2004-10-26  Mark Mitchell  <mark@codesourcery.com>
+
+       * emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
+       __exidx_{start,end} when not relocating.
+
+2004-10-25  Mark Mitchell  <mark@codesourcery.com>
+
+       * Makefile.in (earmsymbian.c): Depend on armbpabi.sc, not elf.sc.
+       * ldexp.h (segment_type): New type.
+       (segments): New variable.
+       * ldexp.c (segments): New variable.
+       (exp_print_token): Handle SEGMENT_START.
+       (fold_binary): Likewise.
+       * ldgram.y (SEGMENT_START): Declare it as a token.
+       (exp): Handle SEGMENT_START.
+       * ldlang.h (lang_address_statement_type): Add segment field.
+       (lang_section_start): Change prototype.
+       * ldlang.c (map_input_to_output_sections): Do not process section
+       assignments if a corresponding SEGMENT_START has already been
+       seen.
+       (lang_section_start): Add segment parameter.
+       * ldlex.l (SEGMENT_START): Add it.
+       * lexsup.c (seg_segment_start): New function.
+       (parse_args): Use it for -Tbss, -Tdata, and -Ttext.
+       * ld.texinfo (SEGMENT_START): Document it.
+       * emulparams/armsymbian.sh (EMBEDDED): Set it.
+       * scripttempl/armbpabi.sc: Use SEGMENT_START to control segment
+       base addresses.  Do not map relocations.
+       * NEWS: Mention SEGMENT_START.
+
+2004-10-26  Paul Brook  <paul@codesourcery.com>
+
+       * ld.texinfo: Document --default-symver.
+       * ldmain.c (main): Set link_info.create_default_symver.
+       * lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
+       (ld_options): Add default-symver.
+       (parse_args): Handle OPTION_DEFAULT_SYMVER.
+
+2004-10-24 Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * pe-dll.c (process_def_file): Don't export all symbols by default if
+       building a position-independent executable.
+
+2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 463
+       * ldmain.c (reloc_overflow): Accept a pointer to struct
+       bfd_link_hash_entry. Report symbol location for relocation
+       overflow.
+
+2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * genscripts.sh (libpath.exp): Really generate for first
+       emulation only.
+
+2004-10-19  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Simplify
+       comparison and replacement of filenames.
+
+2004-10-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 459
+       * ldlang.c (load_symbols): Use the same -Bdynamic/-Bstatic
+       option on linker script as the one for linker script.
+
+2004-10-16  Daniel Jacobowitz  <dan@debian.org>
+
+       * ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
+       (check_excluded_libs): New.
+       (load_symbols): Call check_excluded_libs.
+       * ldlang.h (add_excluded_libs): New prototype.
+       * emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
+       (gld${EMULATION_NAME}_add_options): Add --exclude-libs.
+       (gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
+       * ld.texinfo (Command Line Variables): Document --exclude-libs.
+       (Options Specific to i386 PE Targets): Remove --exclude-libs.
+
+2004-10-15  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldexp.c (exp_fold_tree): Don't immediately exit ld on a
+       failing link script assert.
+
+       * ldctor.c (ldctor_add_set_entry): Fix comment typo.
+
+2004-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 445
+       * emulparams/elf64_ia64.sh (SMALL_DATA_CTOR): Set.
+       (SMALL_DATA_DTOR): Set.
+       * emulparams/elf64_ia64_fbsd.sh (SMALL_DATA_CTOR): Unset.
+       (SMALL_DATA_DTOR): Unset.
+       * scripttempl/elf.sc: If SMALL_DATA_CTOR is set, move .ctors
+       after .data. If SMALL_DATA_DTOR is set, move .dtors after
+       .data.
+
+2004-10-14  Alan Modra  <amodra@bigpond.net.au>
+
+       PR 63
+       * ldlang.h (lang_output_section_statement_type): Make "next" a
+       struct lang_output_section_statement_struct *.
+       (struct orphan_save): Move from elf32.em.  Add "name" and "flags".
+       (lang_output_section_find_by_flags, lang_insert_orphan): Declare.
+       * ldlang.c (lang_output_section_find_1): Adjust for changed
+       output_section_statement "next".
+       (strip_excluded_output_sections): Likewise.
+       (lang_record_phdrs): Likewise.
+       (lang_output_section_find_by_flags): New function.
+       (output_prev_sec_find): Move from pe.em.  Adjust iterator.
+       (lang_insert_orphan): New function.  Tail end of elf32.em's
+       place_orphan merged with that from pe.em.  Allow bfd_section to
+       be placed first.  New heuristic for placing new output section
+       statement in existing script, and accompanying split of __start
+       symbol alignment into a separate assignment to dot.
+       (lang_add_section): Consistently use output->bfd_section rather than
+       an alias, section->output_section.
+       (map_input_to_output_sections): Rename overly long arg.  Move
+       initialization of data_statement output section to here..
+       (lang_check_section_addresses): ..from here.
+       (print_assignment): Correct printing of etree_assert.
+       (print_all_symbols): Don't bomb if userdata is NULL.
+       (IGNORE_SECTION): Rearrange.
+       * emultempl/elf32.em (output_rel_find): Adjust interator.
+       (output_prev_sec_find): Delete.
+       (struct orphan_save): Delete.
+       (gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
+       flags without creating a duplicate output section statement.
+       Revise code holding history of various orphan section placements.
+       Allow orphan sections to place before script specified output
+       sections.  Call lang_output_section_find_by_flags when placement
+       by name fails.  Use lang_insert_orphan.
+       * emultempl/mmo.em (output_prev_sec_find): Delete.
+       (struct orphan_save): Delete.
+       (mmo_place_orphan): Revise code holding history of orphan placement.
+       Allow orphans to place before existing output sections.  Use
+       lang_insert_orphan.
+       * emultempl/pe.em (output_prev_sec_find): Delete.
+       (struct orphan_save): Delete.
+       (gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
+       lang_insert_orphan.
+
+2004-10-13  Mark Mitchell  <mark@codesourcery.com>
+
+       * scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
+       loadable segment.
+
+2004-10-13  Alan Modra  <amodra@bigpond.net.au>
+
+       PR 44
+       * ldcref.c (check_section_sym_xref): Delete.
+       (check_local_sym_xref): New function.
+       (check_nocrossrefs): Adjust call.
+       * emultempl/pe.em (struct orphan_save): Add os_tail.
+       (place_orphan): Backport assorted fixes from elf32.em.
+
+2004-10-12  Bob Wilson  <bob.wilson@acm.org>
+
+       * emultempl/xtensaelf.em: Use ISO C90 formatting.
+
+2004-10-11  Jakub Jelinek  <jakub@redhat.com>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_parse_ld_so_conf): Avoid
+       getline for portability.
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_ld_so_conf): New structure.
+       (gld${EMULATION_NAME}_parse_ld_so_conf,
+       gld${EMULATION_NAME}_parse_ld_so_conf_include): New functions.
+       (gld${EMULATION_NAME}_check_ld_so_conf): Use them.
+
+2004-10-11  Alan Modra  <amodra@bigpond.net.au>
+
+       PR 423
+       * ldfile.c (ldfile_try_open_bfd): Ensure dynamic objects are
+       rejected when linking statically.
+
+2004-10-08  Daniel Jacobowitz  <dan@debian.org>
+
+       * configure.tgt: Include elf_x86_64 for i[3-7]86-*-solaris2*.
+
+2004-10-07  Bob Wilson  <bob.wilson@acm.org>
+
+       * ld.texinfo (Xtensa): Describe new linker relaxation to optimize
+       assembler-generated longcall sequences.  Describe new --size-opt
+       option.
+       * emulparams/elf32xtensa.sh (OTHER_SECTIONS): Add .xt.prop section.
+       * emultempl/xtensaelf.em (remove_section,
+       replace_insn_sec_with_prop_sec, replace_instruction_table_sections,
+       elf_xtensa_after_open): New.
+       (OPTION_OPT_SIZEOPT, OPTION_LITERAL_MOVEMENT,
+       OPTION_NO_LITERAL_MOVEMENT): Define.
+       (elf32xtensa_size_opt, elf32xtensa_no_literal_movement): New globals.
+       (PARSE_AND_LIST_LONGOPTS): Add size-opt and [no-]literal-movement.
+       (PARSE_AND_LIST_OPTIONS): Add --size-opt.
+       (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_OPT_SIZEOPT,
+       OPTION_LITERAL_MOVEMENT, and OPTION_NO_LITERAL_MOVEMENT.
+       (LDEMUL_AFTER_OPEN): Set to elf_xtensa_after_open.
+       * scripttempl/elfxtensa.sc: Update with changes from elf.sc.
+       * Makefile.am (eelf32xtensa.c): Update dependencies.
+       * Makefile.in: Regenerate.
+
+2004-10-07  Jeff Baker  <jbaker@qnx.com>
+
+       * lexsup.c: Handle --warn-shared-textrel option.
+       (ld_options): Restore alpha sorting of options.
+       * ldmain.c (main): Initialise warn_shared_info field to FALSE.
+       * ld.texinfo: Add documentation for --warn-shared-textrel.
+       * NEWS: Added mention of --warn-shared-textrel option.
+
+2004-10-05  Tomer Levi  <Tomer.Levi@nsc.com>
+
+       * emultempl/crxelf.em (disable_relaxation): Add.
+       (crxelf_before_allocation): Enable --relax option by default.
+       (PARSE_AND_LIST_PROLOGUE): Add OPTION_NO_RELAX.
+       (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --no-relax.
+       (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NO_RELAX.
+
+2004-10-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
+       --sort-section name|alignment.
+
+       * ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
+       --sort-section name|alignment.
+
+       * ld.h (sort_type): New enum.
+       (wildcard_spec): Change the type of `sorted' to sort_type.
+
+       * ldgram.y (SORT): Removed.
+       (SORT_BY_NAME): Added.
+       (SORT_BY_ALIGNMENT): Added.
+       (wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
+       SORT_BY_ALIGNMENT.
+       (input_section_spec_no_keep): Updated `sorted'.
+       (statement): Replace SORT with SORT_BY_NAME.
+
+       * ldlang.c (compare_section): New function to compare 2
+       sections with different sorting schemes.
+       (wild_sort): Updated. Use compare_section.
+       (update_wild_statements): New function.
+       (lang_process): Call update_wild_statements before
+       map_input_to_output_sections.
+
+       * ldlex.l (SORT_BY_NAME): New.
+       (SORT_BY_ALIGNMENT): New.
+       (SORT): Return SORT_BY_NAME.
+
+       * ldmain.c (sort_section): New. Defined.
+       (main): Initialize it to none.
+
+       * lexsup.c (option_values): Add OPTION_SORT_SECTION.
+       (ld_options): Add an entry for OPTION_SORT_SECTION.
+       (parse_args): Handle OPTION_SORT_SECTION.
+
+       * mri.c (mri_draw_tree): Updated `sorted'.
+
+2004-10-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * ldgram.y (DATA_SEGMENT_RELRO_END): Add one argument.
+       * scripttempl/elf.sc (DATA_SEGMENT_RELRO_END): Add 0 as first
+       argument.
+       (DATA_SEGMENT_RELRO_GOTPLT_END): Pass $SEPARATE_GOTPLT as first
+       and . as second argument.
+       (GOTPLT): Move $DATA_SEGMENT_RELRO_GOTPLT_END before the section.
+       * ldexp.c (fold_unary): Remove DATA_SEGMENT_RELRO_END handling here.
+       (fold_binary): Add it here.  Insert padding to make relro_end
+       COMMONPAGESIZE bytes aligned.  For DATA_SEGMENT_ALIGN in
+       exp_dataseg_relro_adjust phase just use previously computed
+       exp_data_seg.base.
+       * ldlang.c (lang_size_sections): Set exp_data_seg.base for
+       relro_adjust here.  Call lang_size_sections_1 once more if there
+       was too big padding at DATA_SEGMENT_RELRO_END.
+       * ld.texinfo (DATA_SEGMENT_RELRO_END): Add documentation.
+
+2004-10-01  Paul Brook  <paul@codesourcery.com>
+
+       * emulparams/armelf.sh: Add unwinding table sections.
+
+2004-09-30  Filip Navara  <navaraf@reactos.com>
+
+       * emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Generate
+       correct base address for position independant executables.
+       * pe-dll.c (pe_dll_fill_sections): Don't mark position independant
+       executables as DLLs.
+
+2004-09-30  Paul Brook  <paul@codesourcery.com>
+
+       * ld.texinfo: Document --target2=abs.
+       * emulparms/armsymbian.sh (TARGET2_TYPE): Set.
+
+2004-09-29  Nick Clifton  <nickc@redhat.com>
+
+       * scripttempl/xstormy16.sc: Only perform the assignments to the
+       ROM region when not performing a relocatable link.  The ROM region
+       does not start at address 0, but the sections will.
+       * Makefile.am: Fix linker script dependency for the generation of
+       eelf32xstormy16.c.
+       * Makefile.in: Regenerate.
+
+2004-09-18  Filip Navara  <navaraf@reactos.com>
+
+       * emulparams/arm_epoc_pe.sh, emulparams/armpe.sh, emulparams/i386pe.sh,
+       emulparams/i386pe_posix.sh, emulparams/mcorepe.sh,
+       emulparams/mipspe.sh, emulparams/ppcpe.sh, scripttempl/pe.sc: Define
+       TARGET_PAGE_SIZE.
+       * scripttempl/pe.sc: Make the virtual address and file offset synced if
+       the alignment is lower than the target page size.
+
+2004-09-27  Filip Navara  <navaraf@reactos.com>
+
+       * emultempl/pe.em (gld_${EMULATION_NAME}_unrecognized_file): Allow
+       def_file_parse to handle pe_def_file if NULL and prevent crash with
+       invalid .def files.
+
+2004-09-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Enable
+       --emit-stub-syms automatically when --emit-relocs.
+
+2004-09-24  Paul Brook  <paul@codeosurcery.com>
+
+       * scripttempl/elf.sc: Keep .preinit_array, .init_array and
+       .fini_array sections.
+
+2004-09-19  Andreas Schwab  <schwab@suse.de>
+
+       * ldexp.c (fold_binary) [DATA_SEGMENT_ALIGN]: Adjust data segment
+       base so that relro end is suitably aligned.
+
+2004-09-17  Paul Brook  <paul@codesourcery.com>
+
+       * ld.texinfo: Rename arm-specific section.  Document --target*
+       * emulparams/armelf_fbsd.sh: Set TARGET2_TYPE.
+       * emulparams/armelf_linux.sh: Ditto.
+       * emulparams/armelf_nbsd.sh: Ditto.
+       * emultempl/armelf.em: Set default for TARGET2_TYPE.
+       (target2_type): New variable.
+       (arm_elf_before_allocation): Don't pass target1_type.
+       (arm_elf_create_output_section_statements): New function.
+       (PARSE_AND_LIST_PROLOGUE): Add OPTION_TARGET2.
+       (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --target=.
+       (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_TARGET2.
+       (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Set.
+       * emultempl/armelf_oabi.em (_before_allocation): Remove extra
+       argument to bfd_elf32_arm_process_before_allocation.
+
+2004-09-17  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldexp.c (fold_name): Update u.undef.next refs.
+       * emultempl/pe.em: Likewise.
+       * emultempl/sunos.em: Likewise.
+
 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
 
        * Makefile.am: Run "make dep-am".