* ldlang.c (map_input_to_output_sections): For lang_address, call
[binutils-gdb.git] / ld / ChangeLog
index caa13fcf84d0ac6c9601883feb0f5687e157f509..41cdc4dbaddb1a24118098ee830a0caf1e5da72f 100644 (file)
@@ -1,5 +1,378 @@
+Thu Jun  9 00:17:20 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (map_input_to_output_sections): For lang_address, call
+       init_os if it hasn't already been called.
+
+Thu Jun  2 17:24:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       Add support for SunOS shared libraries.
+       * aout.sc: Don't define __DYNAMIC here.  Add new sections used by
+       shared library support code.
+       * emultempl/sunos.em: New file.
+       * emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos.
+       * emulparams/sun3.sh (TEMPLATE_NAME): Likewise.
+       * Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
+       (esun3.c): Likewise.
+
+       * ldlang.c: Minor formatting cleanups.
+       (lang_for_each_input_file): New function.
+       * ldlang.h (lang_for_each_input_file): Declare.
+
+       * ldfile.h (search_dirs_type): Move from ldfile.c, and add cmdline
+       field.
+       (search_head): Declare.
+       (ldfile_add_library_path): Add new cmdline argument in prototype.
+       * ldfile.c (search_head): Make non-static.
+       (search_dirs_type): Move to ldfile.h.
+       (ldfile_add_library_path): Accept cmdline argument, and save it.
+       * lexsup.c (parse_args): Pass true for new cmdline argument of
+       ldfile_add_library_path.
+       (set_default_dirlist): Likewise.
+       * ldmain.c (check_for_scripts_dir): Pass false for new cmdline
+       argument of ldfile_add_library_path.
+       * ldgram.y (ifile_p1): Likewise.
+
+Wed Jun  1 14:24:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.h (lang_input_statement_type): Remove fields subfiles,
+       total_size, superfile and chain.
+       * ldfile.c (open_a): Don't clear search_dirs_flag.
+       (ldfile_open_file): Don't try to open superfile.  Assert that file
+       has not already been opened.
+       * ldlang.c (new_afile): Don't initialize superfile.
+       * ldmain.c (add_archive_element): Don't initialize subfiles or
+       chain or superfile.  Initialize search_dirs_flag to false.
+
+Fri May 27 12:25:33 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
+
+       * ldver.c (ldversion): Changed version to "cygnus-2.4.1".
+
+       Changes from binutils-2.4 release:
+
+       * genscripts.sh (RELOCATING, CONSTRUCTING): When setting
+       variables, use whitespace, so scripts don't break.
+
+       * config/alphaosf.mh (HDEFINES, CFLAGS): Deleted.
+
+       * emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}.
+
+       * cdtest-bar.cc: Renamed from cdtest-func.cc.
+       * Makefile.in: Noted change.
+
+       * scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I
+       don't know where that's supposed to come from, or why it's
+       necessary.
+
+       Wed May 11 22:32:00 1994  DJ Delorie (dj@ctron.com)
+
+       * configure.bat: update to latest makefile.in
+       * emulpara/go32.sh: set to coff-go32 not aout
+       * emultemp/generic.em: strength-reduce the structure of
+         this shell script, since the only available shell for
+         DOS can't handle complex syntax.
+       * emultemp/stringify.sed: for "sed -f" instead of inline.
+       * makefile.in: depend on stringify.sed as well as genscripts.sh
+       * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format
+       * genscripts.sh: empty variables aren't always considered "set",
+         so set them to "y" instead.
+
+Fri May 27 01:08:14 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (entry_symbol): Make static.
+       (lang_add_entry): Add cmdline argument.
+       * ldlang.h (lang_add_entry): Change prototype.
+       * ldgram.y (statement_anywhere): Change lang_add_entry call.
+       * lexsup.c (parse_args): Likewise.
+
+Tue May 24 16:13:43 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * emulparams/elf32mipb.sh (OTHER_READONLY_SECTIONS): Don't give
+       .reginfo an address.
+       (OTHER_READWRITE_SECTIONS): Don't give .lit4 or .lit8 an address.
+       (OTHER_SECTIONS): Define for .gptab.sdata and .gptab.sbss.
+       * scripttempl/elf.sc: Use OTHER_SECTIONS at end of script.
+
+Thu May 19 13:31:33 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       Add support for ELF shared libraries.
+       * ld.h (ld_config_type): Add field dynamic_link.
+       * ldmain.c (main): Initialize config.dynamic_link to false.  Warn
+       on attempts to use -r with -relax, -call_shared or -s.
+       * lexsup.c (longopts): Separate OPTION_CALL_SHARED from
+       OPTION_NON_SHARED.  Add OPTION_IGNORE.  Adjust macro values
+       accordingly.  Add "dy" and "non_shared" options.  Change "Qy" to
+       OPTION_IGNORE for now.  Handle OPTION_CALL_SHARED and
+       OPTION_NON_SHARED by setting dynamic_link field accordingly.
+       Handle OPTION_IGNORE by ignoring it.  Clear dynamic_link field for
+       -r and -Ur.
+       * ldfile.c (ldfile_open_file): If config.dynamic_link is true, try
+       opening a file with a .so extension first.
+       * emultempl/elf32.em: New file.
+       * emulparams/elf32_sparc.sh (TEXT_START_ADDR): Change to 0x10000.
+       (NONPAGED_TEXT_START_ADDR): Likewise.
+       (TEMPLATE_NAME): Define as elf32.
+       (DATA_PLT): Define.
+       * emulparams/elf_i386.sh (TEMPLATE_NAME): Define as elf32.
+       * scripttempl/elf.sc: Add placement for new dynamic sections.
+       Don't use CREATE_OBJECT_SYMBOLS.  Define _etext, _edata and _end
+       outside of any section.  Don't use ALIGN(8); just let one section
+       VMA follow another.  Put .dynbss in .bss.  Don't mention debugging
+       sections; they'll be handled correctly anyhow.
+       * Makefile.in (eelf_i386.c): Depend upon elf32.em, not generic.em.
+
+Wed May 18 10:15:39 1994  Ian Lance Taylor  (ian@cygnus.com)
+
+       * Makefile.in (install): Redirect output of ln to /dev/null.
+
+Mon May 16 13:35:08 1994  Jeff Law  (law@snake.cs.utah.edu)
+
+       * emultempl/hppaelf.em: Change all references of
+       .hppa_linker_stubs to .PARISC.stubs.
+       * scripttempl/hppaelf.sc: Likewise.
+
+Fri May 13 13:00:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (print_output_section_statement): Change ``no attached
+       output section'' message slightly.
+       (lang_do_assignments): Don't recurse down if there is no real
+       section.
+
+       * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
+       match corresponding change in emulation templates.
+       * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise.
+       * config/sparc-lynx.mt, config/sun4sol2.mt: Likewise.
+
+Wed May 11 18:16:46 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
+
+       * ldver.c (ldversion): Updated version number.
+
+       * cdtest-foo.cc: Use explicit "#pragma implementation".
+       * cdtest-bar.cc: Renamed from cdtest-func.cc.
+       * Makefile.in: References to cdtest-func.o changed to
+       cdtest-bar.o.
+
+Wed May 11 16:24:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       Don't create unnecessary output sections.
+       * ldlang.c (out_bfd_get_section_by_name): Remove.
+       (wild_section): Call bfd_get_section_by_name rather than
+       our_bfd_get_section_by_name.  Don't call wild_doit if there is no
+       section.
+       (lang_create_output_section_statements): Remove.
+       (map_input_to_output_sections): For several cases, call init_os if
+       it has not already been called.
+       (lang_size_sections): If output section was not created, skip it.
+       (lang_process): Don't call lan_create_output_section_statements.
+       (lang_place_orphans): Skip files with just_syms_flags set to true.
+       * ld.texinfo: Document change.
+
+Tue May 10 14:31:16 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (wild_doit): Don't bother initializing the vma and
+       section size.  Don't special case SEC_SHARED_LIBRARY.
+       (lang_size_sections): Handle SEC_COFF_SHARED_LIBRARY sections
+       specially.
+
+Fri May  6 12:24:27 1994  Steve Chamberlain  (sac@cygnus.com)
+
+       * config/go32.mh : New file for Xgo32X.
+
+Fri May  6 15:15:35 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldfile.c (ldfile_open_command_file): Set bfd_error_system_call
+       before calling einfo, since we are reporting an fopen failure.
+       From jrs@world.std.com (Rick Sladkey).
+
+       * configure.in: Use "e" rather than "em_" as prefix for
+       emulations.
+
+Fri May  6 01:08:14 1994  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
+
+       * emultempl/generic.em: Use "e" rather than "em_" as prefix for
+       filename.
+       * emultempl/gld960.em, emultempl/gld960c.em, emultempl/lnk960.em,
+       emultempl/hppaelf.em, emultempl/m88kbcs.em, emultempl/vanilla.em:
+       Ditto.
+       * Makefile.in: Changed all generated file names.
+       (ldemul-list.h): Depend on Makefile, not config.status.  Changed
+       sed patterns to handle new filenames.
+
+       * config/mipsl-idt.mt: Renamed from mips-idtl.mt.
+       * configure.in: Adjusted.
+
+Thu May  5 15:07:32 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
+
+       * Makefile.in (install-info): Don't use "$<*", it doesn't always
+       work.  Instead, check build dir and $srcdir explicitly, and use
+       `echo' to get all the filenames.
+
+       * configure.in (h8300h-*-hms): Changed ld_target name to
+       cf-h8300h.
+       * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it
+       unique in 8.3.
+
+       * config/i960coff.mt: New file.
+       * emulparams/gld960coff.sh: New file.
+       * emultempl/gld960c.em: New file.
+       * configure.in (i960-*-vxworks5* except -vxworks5.0*): Use
+       i960coff configuration.
+       * Makefile.in (em_gld960coff.c): Added dependencies, build rule.
+
+       * Makefile.in (ALL_EMULATIONS): Remove em_delta68.o, since the
+       code isn't included in FSF releases, and it can still be
+       explicitly selected.
+       (distclean): Remove site.bak and tmpdir.
+       (STAGESTUFF): Removed $(GENERATED_CFILES) $(GENERATED_HFILES).
+       (mostlyclean): Delete them explicitly here.  Also remove tmpdir.
+
+       Patches from Ralph Campbell:
+       * config/mipsbsd.mh: New file.
+       * Makefile.in (em_mipsbsd.c): Use mipsbsd.sc, not aout.sc.
+       * scripttempl/mipsbsd.sc: Don't define __DYNAMIC.
+       * emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out'
+       instead of `aout'.
+
+       * configure.in (i386-*-gnu*): Treat like i386-*-mach*.
+
+Wed May  4 11:59:40 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * config/m68k.mt (EMUL): Set to m68kaout.
+       * emulparams/m68kaout.sh: New file.
+       * Makefile.in (ALL_EMULATIONS): Add em_m68kaout.o.
+       (em_m68kaout.c): New target.
+
+       * ldlang.c (lang_size_sections): If dot moves because of an
+       assignment, don't try to insert a pad into the absolute output
+       section, just change the address of the default memory region
+       instead.
+
+       * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
+       cdtest-ur.out, and cdtest-ur.tmp.
+
+Wed Apr 27 16:03:37 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * scripttempl/sa29200.sc: Align all sections to four byte
+       boundaries.
+
+Wed Apr 27 10:48:03 1994  Steve Chamberlain  (sac@cygnus.com)
+
+       * Makefile.in, configure.in: Support for go32 coff.
+       * config/i386-go32.mt: New file
+       * emulparams/i386go32.sh: New file
+       * scripttempl/i386go32.sc: New file
+
+Tue Apr 26 17:20:03 1994  Stan Shebs  (shebs@andros.cygnus.com)
+
+       * Makefile.in (em_m68klynx.c, em_i386lynx.c, em_sparclynx.c): Use
+       Lynx-specific script templates.
+       * configure.in (sparclite*-*-coff): Use coff-sparc.
+       * emulparams/i386lynx.sh (SCRIPT_NAME): Set to i386lynx.
+       * emulparams/sparclynx.sh (SCRIPT_NAME): Set to sparclynx.
+       (ENTRY): Set to __main.
+       * scripttempl/i386lynx.sc: New file, script for I386 Lynx.
+       * scripttempl/m68klynx.sc: Add insertion of ctor/dtor sections.
+       * scripttempl/sparclynx.sc: New file, script for uSparc Lynx.
+
+Tue Apr 26 12:41:03 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * scripttempl/mips.sc: Force _gp and .lit8 to be aligned to a 16
+       byte boundary, in case the global constructors do not take up an
+       even 16 bytes.
+
+       * config/i386v4.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
+       exist, get crtbegin based on gcc -print-libgcc-file-name.
+       (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
+
+Mon Apr 25 15:27:52 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (lang_size_sections): When no address is given for a
+       section, align it according to its requirements.
+
+Thu Apr 21 17:24:24 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * Makefile.in (clean, distclean): Remove configdoc.texi.
+
+Tue Apr 19 12:12:15 1994  Bill Cox  (bill@rtl.cygnus.com)
+
+       * configure.in: Add i[34]86-*-bsd386 to the patterns recognized.
+
+Fri Apr 15 14:35:42 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (lang_size_sections): When relaxing, adjust the
+       position of a padding statement, and adjust dot accordingly.
+
+Mon Apr 11 17:37:09 1994  Bill Cox  (bill@rtl.cygnus.com)
+
+       * Makefile.in (EXPECT, RUNTEST): Set these for the check goal.
+
+Mon Apr 11 12:32:57 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * scripttempl/i386coff.sc: If relocating, don't put .init and
+       .fini sections into .text; keep them separate.
+       * config/i386sco.mh (HOSTING_CRT0): If ../gcc/crtbegin.o does not
+       exist, get crtbegin based on gcc -print-libgcc-file-name.
+       (HOSTING_LIBS): Similar change for ../gcc/crtend.o.
+
+Mon Apr 11 10:31:00 1994  Bill Cox  (bill@rtl.cygnus.com)
+
+       * Makefile.in (check): Set TCL_LIBRARY for runtest.
+
+Wed Apr  6 00:09:37 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
+
+       * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
+       manufacturer.
+
+       * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
+       if building a final executable.
+
+Tue Apr  5 12:17:30 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldmain.c (main): Check the return value of bfd_close.
+
+Thu Mar 31 18:07:06 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * scripttempl/alpha.sc: Clean up section alignment to ensure that
+       sections never overlap when using -r.
+
+Wed Mar 30 15:51:15 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldmisc.c (vfinfo): Change symbol reading slightly for recent BFD
+       changes: get_symtab_upper_bound renamed and returns long,
+       bfd_canonicalize_symtab returns long, check for error indications.
+
+Fri Mar 25 17:20:01 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (print_input_section): For section size, use
+       _cooked_size if it is non-zero, size otherwise.
+       (size_input_section): Likewise.
+       (lang_do_assignments): Likewise (case lang_input_section_enum).
+
+Thu Mar 24 15:20:47 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * ldlang.c (new_afile): Add new argument add_to_list.  Don't set
+       real to true for lang_input_file_is_marker_enum.  Clear the_bfd.
+       (lang_add_input_file): Pass true to new_afile for add_to_list.
+       (lookup_name): Remove force_load argument.  Changed all callers.
+       Pass false to new_afile for add_to_list.  Split loading of symbols
+       out into separate function.
+       (load_symbols): New function split out of lookup_name.  Don't load
+       the symbols if they are already loaded.
+       (open_input_bfds): For lang_input_statement_enum call load_symbols
+       rather than lookup_name.
+       (lang_process): Pass abs_output_section rather than NULL to
+       lang_size_sections.
+       (lang_startup): Set real field of first_file to true.
+
 Wed Mar 23 14:15:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
+       * ldlang.c (had_relax): Removed.
+       (relax_again): New static variable.
+       (lang_size_sections): Change call to bfd_relax_section to
+       correspond to BFD changes.  Set relax_again appropriately.
+       (lang_process): Remove #if 0 code.  When relaxing, keep calling
+       lang_do_assignments and lang_size_sections until relax_again
+       becomes false.
+
        * emultemp/gld960.em: Include libiberty.h
        (gld960_before_parse): Pass NULL as final argument to concat.
 
@@ -389,17 +762,6 @@ Tue Jan 18 16:18:15 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
        * scripttempl/m88kbcs.sc: Don't use CREATE_OBJECT_SYMBOLS, that's
        for a.out.
 
-Fri Jan 14 12:37:16 1994  Ian Lance Taylor  (ian@cygnus.com)
-
-       Motorola Delta sysV68 support from phdm@info.ucl.ac.BE (Philippe
-       De Muyter).
-       * configure.in (m68k-motorola-sysv*) New target.
-       * config/delta68.mt: New file.
-       * emulparams/delta68.sh: New file.
-       * scripttempl/delta68.sc: New file.
-       * Makefile.in (ALL_EMULATIONS): Added em_delta68.o.
-       (em_delta68.c): New target.
-
 Tue Jan 11 13:22:04 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
        * ldmain.c (add_archive_element): If trace_files or