place_orphan optimisations
[binutils-gdb.git] / ld / ChangeLog
index f4ca897fb738454f857bfb386dec7cf423ff30d4..9e8e0e5c18f45ed2cc2b9431995181f690a04d65 100644 (file)
@@ -1,3 +1,503 @@
+2000-04-25  Alan Modra  <alan@linuxcare.com.au>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
+       (output_rel_find): New function.
+       (hold_section, hold_use): Delete.
+       (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
+       hold_interp): Make local to place_orphan.
+       (gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
+       rather than place_section to find possible previous use of orphan.
+       Similarly find the place-holder output sections.  Use returned
+       value from lang_enter_output_section_statement rather than calling
+       lang_output_section_statement_lookup.
+       * emultempl/armelf.em: Same here.
+       * emultempl/pe.em: Similar to above, but no need for output_rel_find.
+
+       * ldlang.c (lang_enter_output_section_statement): Return output
+       section statement.
+       * ldlang.h (lang_enter_output_section_statement): Change
+       declaration too.
+
+       * ldlang.h (lang_output_section_statement): Export it.
+       * ldlang.c (lang_output_section_statement): Ditto.
+
+2000-04-24  Nick Clifton  <nickc@cygnus.com>
+
+       * ld.texinfo (Output Section Data): Add note that section data
+       commands cannot appear outside of section directives.
+
+2000-04-2  Matthew Green  <mrg@cygnus.com>
+
+       * configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
+
+Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
+                         David Mosberger  <davidm@hpl.hp.com>
+
+       * Makefile.am (ALL_64_EMULATIONS): Add eelf64_ia64.o.
+       (eelf64_ia64.c): New rule.
+       * Makefile.in: Rebuild.
+       * configure.tgt (ia64-*-elf*, ia64-*-linux*): New targets.
+       * emulparams/elf64_ia64.sh: New file.
+       
+2000-04-21  Richard Henderson  <rth@cygnus.com>
+
+       * scripttempl/elfd30v.sc: Place .gcc_except_table.
+
+2000-04-19  Alan Modra  <alan@linuxcare.com.au>
+
+       * dep-in.sed: Match space at start of file name, not at end.
+
+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  Alan Modra  <alan@linuxcare.com.au>
+
+       * emultempl/elf32.em (struct orphan_save): Add section field.
+       (gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
+       better order, and place first orphan section as we did before the
+       2000-04-12 patch.  Ignore ~SEC_ALLOC sections when choosing place.
+       Don't call make_bfd_section here, let wild_doit do the job for us.
+       Don't build a statement list when we'll only throw it away.
+       * emultempl/armelf.em: Ditto.
+       * emultempl/pe.em: Similarly.
+
+2000-04-14  Geoff Keating  <geoffk@cygnus.com>
+
+       * 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  Alan Modra  <alan@linuxcare.com.au>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
+       ~SEC_ALLOC sections too.  Init start address of debug sections.
+       * emultempl/armelf.em (gld${EMULATION_NAME}_place_orphan): Ditto.
+       * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): Ditto.
+       Also set all relocateable section start addresses.
+
+2000-04-13  Geoff Keating  <geoffk@cygnus.com>
+
+       * 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-12  Alan Modra  <alan@linuxcare.com.au>
+
+       * emultempl/elf32.em (struct orphan_save): New.
+       (hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
+       hold_interp): Make them struct orphan_save.
+       (gld${EMULATION_NAME}_place_section): Modify for new hold_*.
+       (gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
+       the end of the relevant section list.  Also add associated section
+       statements to the end of any previous orphan statements.
+       * emultempl/armelf.em: Similarly.
+       * emultempl/pe.em: Similarly.
+
+2000-04-11  Alan Modra  <alan@linuxcare.com.au>
+
+       * ld.texinfo (Simple Example): Remove extraneous paragraph.
+
+Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
+       * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
+       --enable-build-warnings option.
+       * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+       * Makefile.in, configure: Re-generate.
+
+2000-04-04  Alan Modra  <alan@linuxcare.com.au>
+
+       * po/ld.pot: Regenerate.
+
+       * lexsup.c (help): Restore translated part of bug string.
+
+       * Makefile.am (MKDEP): Use gcc -MM rather than mkdep.
+       (DEP): Quote when passing vars to sub-make.  Add warning message
+       to end.
+       (DEP1): Rewrite for "gcc -MM".
+       (CLEANFILES): Add DEP2.
+       Update dependencies.
+       * Makefile.in: Regenerate.
+
+2000-04-03  Alan Modra  <alan@linuxcare.com.au>
+
+       * ld.h: #include "bin-bugs.h"
+       * lexsup.c (help): Use REPORT_BUGS_TO.
+
+2000-03-27  Denis Chertykov  <denisc@overta.ru>
+
+       * configure.tgt (avr-*-*): New target support.
+       * Makefile.am: Likewise.
+       * scripttempl/elf32avr.sc: New script file.
+       * emulparams/avr1200.sh: New file.
+       * emulparams/avr23xx.sh: New file.
+       * emulparams/avr4433.sh New file.
+       * emulparams/avr44x4.sh New file.
+       * emulparams/avr85xx.sh New file.
+       * emulparams/avrmega103.sh New file.
+       * emulparams/avrmega161.sh New file.
+       * emulparams/avrmega603.sh New file.
+       * Makefile.in: Regenerate.
+
+2000-03-09  Andreas Jaeger  <aj@suse.de>
+
+       * Makefile.am (check-DEJAGNU): Also unset LANG.
+       * Makefile.in: Rebuild.
+
+2000-03-06  Ian Lance Taylor  <ian@zembu.com>
+
+       * ldfile.c (ldfile_try_open_bfd): Don't crash if we see an empty
+       archive.
+
+2000-03-02  H.J. Lu  <hjl@gnu.org>
+
+       * emulparams/elf32mcore.sh: Include "getopt.h".
+
+2000-03-01  Ian Lance Taylor  <ian@zembu.com>
+
+       * configure.tgt: Remove *-*-aout, *-*-coff, and *-*-netware.
+
+2000-03-01  H.J. Lu  <hjl@gnu.org>
+
+       * emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
+       * emulparams/shpe.sh: Likewise.
+
+2000-03-01  Nick Clifton  <nickc@cygnus.com>
+
+       * pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
+       to unused parameters.
+
+       * emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
+       functions only used by DLL code.
+       (_place_orphan): Initialise 'dollar'.
+
+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-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  Alan Modra  <alan@spri.levels.unisa.edu.au>
+
+       * emultempl/{aix.em, armcoff.em, armelf.em, armelf_oabi.em,
+       beos.em, elf32.em, generic.em, gld960.em, gld960c.em, hppaelf.em,
+       linux.em, lnk960.em, mipsecoff.em, sunos.em, vanilla.em}
+       (ld_emulation_xfer_struct): Add missing NULL initialiser for
+       find_potential_libraries.
+
+2000-02-28  Jim Blandy  <jimb@redhat.com>
+
+       * ldgram.y (exclude_name_list): Don't require a comma to separate
+       list entries; the lexer considers commas to be valid part of a
+       filename, so in something like `foo, bar' the comma is considered
+       part of the first filename, `foo,'.
+       * ld.texinfo: Update section on EXCLUDE_FILE lists.
+
+2000-02-27  Loren J. Rittle  <ljrittle@acm.org>
+
+       * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+       host "i[3456]86-*-freebsdelf*".
+
+2000-02-27  Mark Elbrecht  <snowball3@bigfoot.com>
+
+       * scripttempl/i386go32.sc: Move misplaced semicolons.
+
+2000-02-25  Ian Lance Taylor  <ian@zembu.com>
+
+       * Makefile.am (ALL_EMULATIONS): Remove ehppaelf.o.
+       (ALL_64_EMULATIONS): Remove eelf64hppa.o.
+       (eelf64hppa.c, ehppaelf.c): Remove targets.
+       * Makefile.in: Rebuild.
+
+2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+
+       * configure.tgt (targ_extra_ofiles): Enable elf64_sparc on
+       GNU/Linux/sparc, but keep the default as 32.
+
+       * configure.tgt: Enable elf64_sparc on Solaris7+/sparc.  And make
+       it default if sparcv9 or sparc64.
+
+2000-02-24  Nick Clifton  <nickc@cygnus.com>
+
+       * Makefile.am: Add rules to build emipspe.o and earmpe.o.
+       * Makefile.in: Regenerate.
+       * configure.tgt: Add targets for arm-wince, sh-pe and mips-pe.
+
+       * ldemul.h (ld_emulation_xfer_struct): Add new field:
+       find_potential_libraries.
+       * ldemul.c (ldemul_find_potential_libraries): New function.
+
+       * ldfile.c (ldfile_open_file_search): Allow function to be
+       exported. 
+       (ldfile_open_file): Call ldemul_find_potential_libraries.
+       * ldfile.h: Add prototype for ldfile_open_file_search.
+
+       * pe-dll.c: Add support for ARM, MIPS and SH targets.
+
+       * emulparams/mipspe.sh: New file.  Parameters for mips-pe target.
+       * emulparams/shpe.sh: New file.  Parameters for sh-pe target.
+
+       * emultempl/pe.em: Add support for ARM, MIPS and SH DLLs.
+       (gld_X_find_potential_libraries): New function.  Search for
+       libraries called "*.lib".
+
+       * scriptempl/pe.sc: Add .pdata section.
+
+2000-02-23  Richard Henderson  <rth@cygnus.com>
+
+       * scripttempl/elfd10v.sc: Remove dynamic linking hooks.
+       Add and use memory regions.
+
+2000-02-23  Linas Vepstas (linas@linas.org)
+
+       * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New.
+
+       * Makefile.am: Add support for Linux/IBM 370.
+       * configure.tgt: Likewise.
+
+       * Makefile.in: Regenerate.
+
+2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
+
+       * ldlang.c (print_input_section, print_data_statement,
+       print_reloc_statement, print_padding_statement, insert_pad,
+       size_input_section, lang_check_section_addresses,
+       lang_size_sections, lang_do_assignments, lang_set_startof,
+       lang_one_common): Change `opb' to unsigned. 
+       (lang_do_assignments): Also change `size' to unsigned.
+
+2000-02-16  Richard Henderson  <rth@cygnus.com>
+
+       * scripttempl/elf.sc: Place OTHER_PLT_RELOC_SECTION.
+
+2000-02-16  Timothy Wall  <twall@cygnus.com>
+
+       * mri.c (mri_draw_tree): Add default LMA region argument to call
+       to lang_leave_output_section_statement.
+       * ldlang.h: Update prototypes with LMA region arguments.
+       * ldlang.c (lang_size_sections): Encapsulate region bounds
+       checking in os_check_region call.
+       (os_check_region): New function.
+       (lang_output_section_statement_lookup): Initialize lma_region.
+       (lang_leave_output_section_statement): Add LMA region argument.
+       (lang_leave_overlay): Ditto.
+       * ldgram.y: Handle LMA region syntax.
+       * ld.texinfo (Output Section Description): Describe LMA region usage.
+       * emultempl/armelf.em (gld$place_orphan): Add default value for
+       lma region in call to lang_leave_output_section_statement.
+       * emultempl/elf32.em (gld$place_orphan): Add default value for
+       lma region in call to lang_leave_output_section_statement.
+       * emultempl/pe.em (gld$place_orphan): Add default value for
+       lma region in call to lang_leave_output_section_statement.
+       
+       
+2000-02-04  Timothy Wall  <twall@redhat.com>
+
+       * ldlang.c (lang_check_section_addresses): Use bytes instead of
+       octets when calculating section end addresses.
+
+2000-02-04  Timothy Wall  <twall@redhat.com>
+
+       * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
+
+2000-02-03  Timothy Wall <twall@redhat.com>
+
+       * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not
+       octet count.
+       * ld/ldlang.c (print_input_section, print_data_statement,
+       print_reloc_statement, print_padding_statement): Print target
+       address values and section sizes as bytes, not octets.
+       (insert_pad) Calculate padding size in octets, and adjust "dot"
+       by bytes.
+       (size_input_section) Always adjust "dot" by bytes, not octets.
+       (lang_check_section_addresses, lang_do_assignments) Adjust
+       "dot" by bytes, not octets.  Use the larger of the directive size
+       or octets_per_byte for the number of octets actually allocated in
+       the output section.
+       (lang_set_startof) Make sure STARTOF returns a target address.
+       (lang_one_common) Record size changes in octets.
+       (lang_abs_symbol_at_end_of) Section end symbol's value is
+       recorded in target bytes.
+       * ld.texinfo:   Updated description of BYTE, SHORT, LONG, etc.
+       to be clear about behavior when an octet is smaller than one byte.
+       
+2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
+
+       * ldcref.c (output_cref): Don't pass message strings to printf
+       as format arg.
+       Update copyright.
+
+       * ldmisc.c (vfinfo): Same here.
+       Update copyright.
+
+2000-01-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
+
+       * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em,
+       generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em,
+       mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct):
+       Add missing NULL initialisers, and comments.
+
+       * testsuite/ld-srec/sr3.cc (__rethrow): New.
+
+2000-01-21  Nick Clifton  <nickc@cygnus.com>
+
+       * ldlang.c (lang_size_sections): Fix typo in comment.
+
+2000-01-18  H.J. Lu  <hjl@gnu.org>
+
+       * ldlang.c (lang_size_sections): Also update the current
+       address of a region if the SEC_NEVER_LOAD bit is not set.
+
+2000-01-10  Philip Blundell  <pb@futuretv.com>
+
+       * configure.tgt (arm*-*-conix*): New target.
+
+2000-01-07  Nick Clifton  <nickc@cygnus.com>
+
+       * ld.texinfo (Options): Remind users to preceed linker command
+       line switches with -Wl, (or whatever is appropriate) if it is
+       being invoked by a comnpiler driver program.
+       Fix description of the behaviour of the -n command line switch. 
+
+Wed Jan  5 08:02:12 2000  Catherine Moore  <clm@cygnus.com>
+
+       * ld.h (wildcard_spec):  Change exclude_name to exclude_name_list.
+       (name_list): New.
+       * ld.texinfo (EXCLUDE_FILE): Update documentation.
+       * ldgram.y (wildcard_spec): Support a list of excluded_files.
+       (exclude_name_list): New.
+       ldlang.c (walk_wild_section): Support list of excluded files.
+       (print_wild_statement): Likewise.
+       (lang_add_wild): Likewise.
+       * ldlang.h (lang_wild_statement_type): Likewise.
+       * scripttempl/elf.sc (OTHER_EXCLUDE_FILES): Support.
+       
+2000-01-04  Mumit Khan  <khan@xraylith.wisc.edu>
+
+       * pe-dll.c (pe_dll_warn_dup_exports): New variable.
+       (process_def_file): Use.
+       (pe_dll_compat_implib): New variable.
+       (make_one): Use.
+       
+       * pe-dll.h: Add exports of pe_dll_warn_dup_exports and
+       pe_dll_compat_implib.
+       
+       * emultempl/pe.em (longopts): Add warn-duplicate-exports and 
+       compat-implib options.
+       (gld_${EMULATION_NAME}_list_options): List new options.
+       (gld_${EMULATION_NAME}_parse_args): Handle.
+
+       * pe-dll.c (pe_dll_generate_implib): Use the correct name for output 
+       dll.
+       
+        * deffilep.y (opt_name): Allow "." in name.
+
+1999-12-02  Nick Clifton  <nickc@cygnus.com>
+
+       * Makefile.am: Fix arm-epoc-pe dependencies.
+       * Makefile.in: Regenerate.
+       
+       * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe.
+
+       * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for
+       EPOC by placing .rdata into .text.
+
+1999-11-26  Andreas Schwab  <schwab@suse.de>
+
+       * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for
+       STRINGIFY.  Use yes/no instead of true/false as value for cache
+       variable.
+       * configure: Regenerate.
+
+1999-11-24  Nick Clifton  <nickc@cygnus.com>
+
+       * ldlang.c (IGNORE_SECTION): Section must have both ALLOC and LOAD
+       attributes in order to be checked.
+
+1999-11-22  Nick Clifton  <nickc@cygnus.com>
+
+       * ldlang.c (lang_check_section_addresses): Fix test to determine
+       if a section should be tested.
+       (IGNORE_SECTION): New macro.
+
+Wed Nov  3 23:31:19 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+       Clean up code to use EXTRA_SHLIB_EXTENSION.
+
+1999-11-03  Nick Clifton  <nickc@cygnus.com>
+
+       * emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian.
+       * emulparams/mcorepe.sh (OUTPUT_FORMAT): Change to little endian.
+
+1999-11-01  Steve Chamberlain  <sac@pobox.com>
+
+       * ldlang.c (section_already_linked): Rework to use hash table.
+       (already_linked_newfunc): New function.
+       (already_linked_table_init): New function.
+       (already_linked_table_free): New function.
+       (lang_process): Initialize and free the already_linked hash table.
+
+1999-10-27  Andreas Jaeger  <aj@suse.de>
+
+       * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for 
+       target "mips*-*-linux-gnu*".
+
+1999-10-27  Scott Bambrough  <scottb@netwinder.org>
+
+       * emultempl/armelf.em: Include ctype.h to prevent compile time
+       warnings. 
+
+1999-10-26  Nick Clifton  <nickc@cygnus.com>
+
+       * emultempl/armcoff.em (gld{}_finish): Remove extraneous
+       underscore from prototype.
+       * emultempl/armelf.em (gld{}_finish): Remove extraneous
+       underscore from prototype.
+
+1999-10-07  Geoffrey Keating  <geoffk@cygnus.com>
+
+       * scripttempl/elf.sc (.rel.sdata): Combine all the sdata relocs
+       being .rel.sdata, .rel.sdata.*, .rel.gnu.linkonce.s*.
+       (.rela.sdata): Likewise for .rela.sdata.* and .rela.gnu.linkonce.s*.
+       (.rel.sbss): Make like .rel.bss.
+       (.rela.sbss): Make like .rel.bss.
+       (.sdata): Don't include .gnu.linkonce.s.* or .sdata.* when
+       ld -r.
+       (.sbss): Do the same things as for .bss: include SDATA_START_SYMBOLS,
+       .dynsbss.
+
+1999-09-29  Andrew Haley  <aph@cygnus.com>
+
+       * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
+       merging sections when not relocating.
+
+1999-09-28  Mumit Khan  <khan@xraylith.wisc.edu>
+
+       * pe-dll.c (process_def_file): Move the offset lookup from here to
+       (fill_exported_offsets): here. New static function.
+       (fill_edata): Use.
+       
 1999-09-28  Mumit Khan  <khan@xraylith.wisc.edu>
 
        * deffilep.y (tokens): Add upper and lower case versions of DATA,
@@ -68,6 +568,15 @@ Wed Sep 15 02:47:43 1999  Jeffrey A Law  (law@cygnus.com)
        * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for 
        terminating null.
 
+1999-09-14  Ulrich Drepper  <drepper@cygnus.com>
+
+       * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target.
+       * config.in: Add EXTRA_SHLIB_EXTENSION.
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
+       Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION
+       is defined.
+
 1999-09-14  Nick Clifton  <nickc@cygnus.com>
 
        * Makefile.in: Add earm_epoc_pe.c build target.