Commit Graph

771 Commits

Author SHA1 Message Date
Ian Lance Taylor 210c52ac91 * 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.
1994-06-01 18:28:26 +00:00
Ken Raeburn c06e55d99a changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs) 1994-05-27 16:58:05 +00:00
Ian Lance Taylor 60e8a53407 * 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.
1994-05-27 15:39:11 +00:00
Ian Lance Taylor 29371b1feb * ldlang.c (lang_add_entry): Only set the entry symbol if it has
not been set already.
1994-05-27 05:09:31 +00:00
Ian Lance Taylor f49f58c6a8 * 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.
1994-05-24 20:21:27 +00:00
Ian Lance Taylor eb8f714f21 Remove sanitization of PowerPC NetWare 1994-05-20 18:25:30 +00:00
Ian Lance Taylor 2a9fa50cd8 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.
1994-05-19 18:25:10 +00:00
Ian Lance Taylor 188ce70585 * Makefile.in (install): Redirect output of ln to /dev/null. 1994-05-18 17:18:23 +00:00
Bill Cox 2a12627b21 * ld.bootstrap/bootstrap.exp, lib/ld.exp: Replace error proc
calls with perror calls.
1994-05-17 22:40:29 +00:00
Jeff Law 4bd5c39f5c * emultempl/hppaelf.em: Change all references of
.hppa_linker_stubs to .PARISC.stubs.
	* scripttempl/hppaelf.sc: Likewise.
1994-05-16 19:38:39 +00:00
Ian Lance Taylor 269773c1a9 * 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.
1994-05-13 18:01:59 +00:00
Ian Lance Taylor 439a3604ae * 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.
1994-05-13 17:06:49 +00:00
Ken Raeburn 7e16be786a note name change of cdtest-bar.cc 1994-05-11 23:49:35 +00:00
Ken Raeburn 76a1b604a6 8.3 name fixes: ld.cdtest/cdtest-func.cc -> cdtest-bar.cc 1994-05-11 23:49:21 +00:00
Ken Raeburn 82ebe9a274 * 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.
1994-05-11 23:10:34 +00:00
Ian Lance Taylor f9d3d71ae8 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.
1994-05-11 20:29:21 +00:00
Ian Lance Taylor 27f7237eca * 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.
1994-05-10 18:33:44 +00:00
Ian Lance Taylor c1124600ad Remove Delta68 support. Could not get copyright assignment for it.
From now on, I'll get that first.
1994-05-09 16:36:38 +00:00
Ken Raeburn 7009748cab keep gld960c.em 1994-05-08 05:38:24 +00:00
Ken Raeburn c610b46c54 keep gld960coff.sh 1994-05-08 05:37:58 +00:00
Ken Raeburn e5793ca025 deal with file renaming, new files 1994-05-08 05:37:17 +00:00
Steve Chamberlain 6149af094e support for Xgo32X. 1994-05-06 19:27:57 +00:00
Steve Chamberlain 90f2ba0625 * config/go32.mh : New file for Xgo32X. 1994-05-06 19:25:31 +00:00
Ian Lance Taylor 5acce559f4 * 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).
1994-05-06 19:21:00 +00:00
Ian Lance Taylor f6671f28a4 * configure.in: Use "e" rather than "em_" as prefix for
emulations.
1994-05-06 19:16:30 +00:00
Ken Raeburn 6e1e82a0be em_->e, mips-idtl->mipsl-idt name changes 1994-05-06 06:55:54 +00:00
Ken Raeburn 38cae0cd30 * 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.
1994-05-06 06:55:35 +00:00
Ken Raeburn 97dc4cf850 * config/mipsl-idt.mt: Renamed from mips-idtl.mt.
* configure.in: Adjusted.
1994-05-06 06:54:15 +00:00
Ken Raeburn db4a85f981 * emulparams/gld960coff.sh: New file.
Patches from Ralph Campbell:
* emulparams/mipsbsd.sh (OUTPUT_FORMAT): Fix name to have `a.out'
instead of `aout'.
1994-05-06 00:40:18 +00:00
Ken Raeburn 7182a4df5d * config/cf-h8300h.mt: Renamed from coff-h8300h.mt, to make it unique in 8.3.
* config/i960coff.mt: New file.

Patches from Ralph Campbell:
* config/mipsbsd.mh: New file.
1994-05-06 00:39:32 +00:00
Ian Lance Taylor 0573a3b135 * 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.
1994-05-04 20:22:15 +00:00
Ian Lance Taylor 269ec825af For PR 4906.
* 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.
1994-05-04 16:14:00 +00:00
Ian Lance Taylor 083038a72a * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
cdtest-ur.out, and cdtest-ur.tmp.
1994-05-04 16:00:30 +00:00
Stan Shebs 89464c7a1d Keep Lynx linker scripts. 1994-05-02 22:51:34 +00:00
Bill Cox ea68d58d4e Back-migrate minor changes in these files from 94Q1 progressive into devo:
dejagnu/ChangeLog, dejagnu/Makefile.in,
	dejagnu/example/calc/Makefile.in, dejagnu/lib/remote.exp,
	dejagnu/testsuite/Makefile.in,
	dejagnu/testsuite/runtest.all/options.exp,
	gcc/testsuite/config/unix.exp, gdb/testsuite/Makefile.in,
	ld/ChangeLog, newlib/testsuite/ChangeLog, texinfo/testsuite/ChangeLog
1994-04-28 21:49:40 +00:00
Ian Lance Taylor e6d84626b4 * scripttempl/sa29200.sc: Align all sections to four byte
boundaries.
1994-04-27 20:04:55 +00:00
Steve Chamberlain 6c86b9ff98 * Makefile.in, configure.in: Support for go32 coff.
* config/i386-go32.mt: New file
	* emulparams/i386go32.sh: New file
	* scripttempl/i386go32.sc: New file
1994-04-27 17:52:13 +00:00
Stan Shebs 028f887219 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.
1994-04-27 00:31:11 +00:00
Ian Lance Taylor c435aba810 * 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.
1994-04-26 21:49:45 +00:00
Ian Lance Taylor cde7350107 * 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.
1994-04-26 16:42:52 +00:00
Ian Lance Taylor feaa9c4bda * ldlang.c (lang_size_sections): When no address is given for a
section, align it according to its requirements.
1994-04-25 19:28:58 +00:00
Ian Lance Taylor 1e45c4c38e * Makefile.in (clean, distclean): Remove configdoc.texi. 1994-04-21 21:25:17 +00:00
Bill Cox 9ad75873fa * configure.in: Add recognition of i[34]86-*-bsd386. 1994-04-19 19:14:15 +00:00
Ian Lance Taylor 9d87af5697 * ldlang.c (lang_size_sections): When relaxing, adjust the
position of a padding statement, and adjust dot accordingly.
1994-04-15 18:37:05 +00:00
Ian Lance Taylor b22034745a There is no interesting Irix 5, or PowerPC, or RS/6000 support in the
linker, so don't mention them.
1994-04-14 04:02:34 +00:00
Bill Cox 099c286e74 * Makefile.in (check): Set TCL_LIBRARY for runtest. 1994-04-11 23:17:18 +00:00
Ian Lance Taylor 4f2ee95801 * 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.
1994-04-11 16:35:39 +00:00
Jeff Law f39a73b1b6 * configure.in (hppa*-*-*elf*): Don't require "-hp-" for the
manufacturer.
1994-04-07 03:49:18 +00:00
Jeff Law 79f7de91c4 * emultempl/hppaelf.em (hppaelf_finish): Only resize sections
if building a final executable.
1994-04-06 07:10:09 +00:00
Ken Raeburn 632dcce87b note that pa support is elf only 1994-04-05 18:55:56 +00:00