Commit Graph

1427 Commits

Author SHA1 Message Date
Ian Lance Taylor c653b37092 * ld.texinfo: Mention that -R can be used for -rpath. 1996-02-19 16:17:33 +00:00
Ian Lance Taylor 9e2ef09802 * configure.host: Check for 'do not mix' from native linker before
trying to use -rpath.
1996-02-18 20:06:40 +00:00
Ian Lance Taylor c99fbc42b5 * configure.in: Remove explicit substitution of CFLAGS; autoconf
does it anyhow.
	* configure: Rebuild.
	* Makefile.in (LDFLAGS): Set to @LDFLAGS@.
1996-02-15 22:17:27 +00:00
Ian Lance Taylor 7e19f60e5a * configure.in: Call AC_PROG_CC before configure.host.
* configure: Rebuild.
	* configure.host: Remove go32 host, since it should no longer be
	necessary.  Don't set CC for romp host.
1996-02-15 21:32:43 +00:00
Ian Lance Taylor 22aa130282 * scripttempl/elf.sc: Don't skip a page in virtual memory space if
the text segment ends exactly on a page boundary.
1996-02-15 20:28:52 +00:00
Ian Lance Taylor ad43e45b46 * configure.in: Substitute RPATH_ENVVAR.
* configure: Rebuild.
	* configure.host: Set RPATH_ENVVAR.
	* Makefile.in (RPATH_ENVVAR): New variable.
	(check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
1996-02-15 19:00:07 +00:00
Ian Lance Taylor 95d31c3c8f * configure.tgt (*-*-ieee*): New target; use vanilla.
Wed Feb 14 18:49:01 1996  Alan Modra  <alan@spri.levels.unisa.edu.au>

	* configure.in: Redo emulation handling so that each emulation
	searches the correct tool directory, based on the target alias.
	For example, "configure --enable-targets=m68k-coff i386-linux"
	will search /usr/local/i386-linux/lib for linux and
	/usr/local/m68k-coff/lib for m68k-coff.
	* configure: Rebuild.
	* configure.tgt: Add special tdir settings for Linux.
	* Makefile.in: Add @TDIRS@.  Pass "$(tdir_EMUL)" to ${GENSCRIPTS}
	for each eEMUL.c target.
	* genscripts.sh: Accept specific alias as 9th argument, and use it
	in LIB_PATH.
1996-02-14 23:54:05 +00:00
Ian Lance Taylor 307585f1c9 Wed Feb 14 16:38:36 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
* ldlang.c (lang_set_startof): Don't do anything for a
	relocateable link.

	* ldgram.y (mri_script_file): Call mri_draw_tree.
	* mri.c (mri_draw_tree): Make globally visible.  Don't bother to
	create memory regions.
	(mri_load): Don't call mri_draw_tree.
	* mri.h (mri_draw_tree): Declare.

	* configure.tgt (m68*-*-psos): New target.
	* emulparams/m68kpsos.sh: New file.
	* scripttempl/psos.sc: New file.
	* Makefile.in (ALL_EMULATIONS): Add em68kpsos.o.
	(em68kpsos.c): New target.
1996-02-14 21:43:54 +00:00
Ian Lance Taylor db3bfcd64c * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Strip
`:foo' from ${ARCH}.
1996-02-14 16:10:18 +00:00
Ian Lance Taylor 9cb8a981e9 Tue Feb 13 15:58:58 1996 Bryan Ford <baford@snake.cs.utah.edu>
* scripttempl/i386msdos.sc: Don't pad the .text section.  Put
	.rodata in .data.
1996-02-13 21:00:44 +00:00
Ian Lance Taylor b6acf0846a * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared. 1996-02-13 20:33:12 +00:00
Ian Lance Taylor 625489271d * emultempl/elf32.em (gld${EMULATION_NAME}_stat_needed): Warn if
it looks like we might be linking in two different versions of the
	same shared library.  Based on a patch from H J Lu <hjl@zoom.com>.
1996-02-13 19:05:38 +00:00
Ian Lance Taylor 708f7fbcd3 * ldlang.c (lang_size_sections): Increment the section size when a
padding statement is encountered.
PR 8965.
1996-02-09 00:26:56 +00:00
Ian Lance Taylor 2e5983457a * configure.in: Look for --enable-shared. Change the value of
BFDLIB when linking against a shared library on SunOS.
	* configure: Rebuild.
	* configure.host: If using a shared BFD library, try to pass a
	reasonable -rpath option when linking.
	* Makefile.in (BFDLIB): Set to @BFDLIB@.
1996-02-07 19:03:38 +00:00
Ian Lance Taylor f8d489718f Support for building bfd and opcodes as shared libraries, based on
patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
	* configure.in (HLDFLAGS): New substitution.
	* configure: Rebuild.
	* configure.host: Set HLDFLAGS on SunOS.
	* Makefile.in (HLDFLAGS): New variable.
	(BFDDEP): New variable.
	(BFDLIB): Change to -L../bfd -lbfd.
	($(LD_PROG)): Depend upon $(BFDDEP) rathern than $(BFDLIB).  Use
	$(HLDFLAGS) in link.
	(check): Set LD_LIBRARY_PATH in the environment.
1996-02-05 21:28:15 +00:00
Michael Meissner c2b6884b97 Move .sdata2/.sbss2 into read-only section 1996-02-03 00:31:03 +00:00
Ian Lance Taylor ae9120f917 * configure: Regenerate. 1996-02-02 21:50:53 +00:00
Ian Lance Taylor be54c2b6c9 * emulparams/elf_i386.sh (TEXT_START_ADDR): Change to 0x8048000,
for SVR4 compatibility.
PR 8794.
1996-02-01 21:02:03 +00:00
Ian Lance Taylor 48766668d5 * ldexp.c (exp_fold_tree): Correct handling of ABSOLUTE.
PR 8909.
1996-02-01 15:52:04 +00:00
Steve Chamberlain 923b8e0c59 * configure.tgt (i[345]86-*-cygwin32, powerpcle-*-cygwin32): New.
* emultempl/pe.em (definfo init): Make the default stack reserve
	of a PPC larger.
1996-02-01 01:43:42 +00:00
Ian Lance Taylor 40ab9bb9d7 Wed Jan 31 14:34:23 1996 Richard Henderson <rth@tamu.edu>
* configure.tgt (m68*-apple-aux*): New target.
	* emulparams/m68kaux.sh: New file.
	* scripttempl/m68kaux.sc: New file.
	* Makefile.in (ALL_EMULATIONS): Add em68kaux.o.
	(em68kaux.c): New target.
1996-01-31 19:36:20 +00:00
Ian Lance Taylor bc60f9240f * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Ignore
-bnoentry, since the right thing tends to happen anyhow.
1996-01-30 18:19:28 +00:00
Ian Lance Taylor 4bdd9722a6 * ld.texinfo, ld.1: Document -export-dynamic. 1996-01-29 17:29:51 +00:00
Ian Lance Taylor ba7db99126 * ld-undefined/undefined.exp: ELF targets should now pass the
undefined line test.
1996-01-26 23:43:29 +00:00
Ian Lance Taylor 92849bae1d * ld-empic/empic.exp: Update for change to MIPS disassembler. 1996-01-25 20:38:08 +00:00
Jackie Smith Cashion de8d160913 Thu Jan 25 16:46:58 1996 James G. Smith <jsmith@cygnus.co.uk>
* emulparams/{elf32b4300.sh, elf32l4300.sh}: Changed
 	TEXT_START_ADDR to allow use on IDT and PMON systems.
1996-01-25 16:51:47 +00:00
Steve Chamberlain 1759ad4d41 * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
correct spelling.
1996-01-25 05:02:49 +00:00
David Edelsohn b0cc94a11c * configure.tgt (sparc64-*-solaris2*): New configuration.
(sparc64-*-aout*): Renamed from sparc64*.
1996-01-25 01:03:13 +00:00
Ian Lance Taylor 7df4ba266b Mon Jan 22 13:01:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile.in (GENSCRIPTS): Pass @host@ @target@ @target_alias@.
	* genscripts.sh: Set host, target and target_alias variables.
	Check for native compile by comparing ${target} and ${host}.
	* emultempl/elf32.em: Likewise.
	* scripttempl/elfmips.sc: Test ${target}, not ${target_alias}.
1996-01-22 18:03:56 +00:00
Michael Meissner 4d99a9505c Refine eabi support 1996-01-22 16:05:26 +00:00
Ian Lance Taylor a411bea023 * ldgram.y (%union): Add phdr field.
(phdr): Use phdr_qualifiers rather than opt_hdrs and opt_at.
	(phdr_qualifiers): New nonterminal.  Add support for FLAGS.
	(opt_hdrs, hdr): Remove.
	(phdr_val): New nonterminal.
	* ldlang.c (lang_new_phdr): Replace hdrs parameter with filehdr
	and phdrs parameters.  Add flags parameter.
	(lang_record_phdrs): Update for changes to lang_phdr.  Pass flags
	to bfd_record_phdr.
	* ldlang.h (struct lang_phdr): Replace hdrs field with filehdr and
	phdrs fields.  Add flags field.
	(LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Remove.
	(lang_new_phdr): Update declaration.
	* ld.texinfo: Document FLAGS.
1996-01-16 20:51:22 +00:00
Ian Lance Taylor 0bc9a7d2fb * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation):
Don't make a shared library because of an undefined reference to
	__GLOBAL_OFFSET_TABLE_.
1996-01-15 22:38:22 +00:00
Ian Lance Taylor 6014cea70c update copyrights 1996-01-15 21:06:31 +00:00
Ian Lance Taylor fe1379d45a Add some Irix 5 support, mostly from Kazumoto Kojima
<kkojima@info.kanagawa-u.ac.jp>:
	* emulparams/elf32bmip.sh (SCRIPT_NAME): Change to elfmips.
	(SHLIB_TEXT_START_ADDR): Define.
	(OTHER_GOT_SYMBOLS): Define.
	(OTHER_READWRITE_SECTIONS): Remove initialization of _gp.
	(EXECUTABLE_SYMBOLS): Don't define.
	(DYNAMIC_LINK): Don't define.
	* emulparams/elf32lmip.sh: Same changes as elf32bmip.sh.
	* scripttempl/elfmips.sc: New file.
	* configure.host (mips*-dec-bsd*): Change mips to mips*.
	(mips*-sgi-irix4*): Likewise.
	(mips*-sgi-irix5*): New entry.
	* Makefile.in (eelf32bmip.c): Depend upon elfmips.sc rather than
	elf.sc.
	(eelf32lmip.c): Likewise.
1996-01-15 20:13:04 +00:00
Ian Lance Taylor 21a3c2ff37 * ld-bootstrap/bootstrap.exp: Expect failure for mips*-*-irix5*
when doing the --static test.
	* ld-shared/shared.exp: Run tests on mips*-*-irix5*.
1996-01-15 20:06:43 +00:00
Michael Meissner be03dc3e37 Add .rela.got.neg section; remove .rel.* sections 1996-01-13 14:44:48 +00:00
Ian Lance Taylor 2afa4f215e * scripttempl/sh.sc: Only build constructors when CONSTRUCTING. 1996-01-12 23:43:24 +00:00
Ian Lance Taylor 23cb3b6504 * ldmisc.c: Include <stdarg.h> rather than <varargs.h> if
ANSI_PROTOTYPES is defined.  Remove special handling of
	WINDOWS_NT.  Various indendation fixes.
	(vfinfo): Change fmt parameter to const char *.
	(info_msg): Write <stdarg.h> version.
	(einfo, minfo, finfo): Likewise.
	(info_assert): Change file parameter to const char *.
	* ldmisc.h (einfo, minfo, info_msg): If ANSI_PROTOTYPES is
	defined, use a real prototype.
	(info_assert): Change first parameter to be const char *.
1996-01-12 20:01:17 +00:00
Michael Meissner 4fe13b2bdd Add support for .sdata2/.sbss2 and old 2.7.2 compiler; Make text start at 64k; make data follow on next 64k page after text 1996-01-12 18:37:47 +00:00
Ian Lance Taylor 37e46b8b97 * scripttempl/alpha.sc: Put .rconst right after .rdata. 1996-01-09 20:53:26 +00:00
Steve Chamberlain d42799374f * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation):
sort using right pointer.
1996-01-05 22:09:43 +00:00
Michael Meissner 9dee2948a2 Move creating section begin/end labels to compiler crt{i,n}.o 1996-01-05 17:27:39 +00:00
Ian Lance Taylor ed1f99e770 * configure.host: Change existing Linux HOSTING_CRT0 to be used
for a.out only, and put in appropriate HOSTING_CRT0 and
	HOSTING_LIBS values for Linux ELF.
1996-01-04 22:10:00 +00:00
David Edelsohn 5c5e420c9b * scripttempl/h8300.sc: Use all 64K for ram.
* scripttempl/h8300h.sc: Define 256K ram size.
1996-01-04 20:03:03 +00:00
Ian Lance Taylor 54fe92c5a1 * ld-srec/srec.exp: If powerpc*-*-eabi*, use --defsym to define
__eabi.
1995-12-26 22:35:31 +00:00
Ian Lance Taylor af3f877153 * ld-srec/srec.exp: Add setup_xfails for XCOFF targets. 1995-12-19 23:00:26 +00:00
Ian Lance Taylor 67cf67787d * emultempl/aix.em (gld${EMULATION_NAME}_after_open): Only set
relocateable before calling ldctor_build_sets if the output file
	is in an XCOFF format.
1995-12-19 22:36:03 +00:00
Ian Lance Taylor 656db2ed89 * ld-srec/srec.exp: Remove i960 COFF setup_xfail. 1995-12-15 21:39:35 +00:00
Ian Lance Taylor 4fc151e99a * ldwrite.c (build_link_order): When handling a data statement, if
the endianness of the output file is unknown, use the endianness
	of the input file.
1995-12-15 21:39:09 +00:00
Stan Shebs aaa877b7ac Reflect file rename. 1995-12-12 22:37:05 +00:00
Stan Shebs d8d4a450ff * mpw-config.in: Recognize mips-*-* as equivalent to
mips-idt-ecoff.
	* mpw-eppcmac.c: Shortened from mpw-eppcmacos.c.
	* mpw-ld.r: Add version resources.
	(cfrg): Use symbolic instead of literal name for executable.
1995-12-12 22:35:48 +00:00
Kim Knuttila 9499591f90 Moved the .reloc section slightly 1995-12-11 23:04:18 +00:00
Ian Lance Taylor 9430b93365 * emultempl/aix.em (unix_ld): New static variable.
(gld${EMULATION_NAME}_parse_args): Handle -unix.
	(gld${EMULATION_NAME}_before_allocation): If unix_ld, pass
	gc as false and export_defineds as true to size_dynamic_sections.
PR 8606.
1995-12-07 01:12:30 +00:00
David Edelsohn 95b3cb6b45 * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix
call to sort_sections.
1995-12-06 22:41:10 +00:00
David Edelsohn e8bb9a12d7 * ldlang.c (print_statement{,s}): Delete duplicate prototype.
(print_statement_list): Renamed from print_statement.  All callers
	updated.
	(print_statement): New function to print just one statement.
	(print_{data,reloc,padding}_statement): Don't crash if
	output_section == NULL.
	(dprint_statement): New function.
1995-12-06 22:38:14 +00:00
Ian Lance Taylor 0421503301 * ldexp.c (exp_fold_tree): Permit assignments to dot in the final
phase if the current section is abs_output_section.
PR 8605.
1995-12-06 19:58:05 +00:00
Ian Lance Taylor 6ceb561287 * ld-srec/srec.exp: Don't use [] in setup_xfail expressions. 1995-12-02 06:17:46 +00:00
Ian Lance Taylor 061e65f855 * ldgram.y (PHDRS): New token.
(ifile_p1): Accept phdrs.
	(section): Accept phdr_opt at the end of the section definition.
	(phdr_op): New nonterminal.
	(phdrs, phdr_list, phdr, phdr_type, opt_hdrs, hdr): Likewise.
	* ldlex.l: Accept PHDRS.
	* ldlang.h (struct lang_output_section_phdr_list): Define.
	(lang_output_section_statement_type): Add phdrs field.
	(struct lang_phdr): Define.
	(LANG_PHDR_FILEHDR, LANG_PHDR_PHDRS): Define.
	(lang_new_phdr): Declare.
	* ldlang.c (lang_phdr_list): New static variable.
	(lang_output_section_statement_lookup): Initialize phdrs field.
	(lang_process): Call lang_record_phdrs.
	(lang_new_phdr): New function.
	(lang_section_in_phdr): New function.
	(lang_record_phdrs): New static function.
	* ld.texinfo: Document PHDRS.
1995-12-01 21:49:51 +00:00
Ian Lance Taylor a91a8d08ae * ld-srec/srec.exp: Add setup_xfails for MIPS ELF targets. 1995-12-01 18:15:18 +00:00
Kim Knuttila d611a82e67 Expose .edata section 1995-11-30 18:18:38 +00:00
David Edelsohn 781332facb Add a comment saying .junk sections are discarded by the linker. 1995-11-30 17:15:12 +00:00
Ian Lance Taylor e7f2e923be Thu Nov 30 11:32:34 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* configure.host (m68*-motorola-sysv): Define HOSTING_CRT0 and
	HOSTING_LIBS for testing.
	(m88*-motorola-sysv3): Define HOSTING_CRT0 and HOSTING_LIBS for
	testing.
1995-11-30 16:30:13 +00:00
Stan Shebs b18319318b Fix MPW tool installation 1995-11-30 02:55:03 +00:00
Ian Lance Taylor 5d85ec2d4e * ld-srec/srec.exp: Add setup_xfail for i960 COFF targets. 1995-11-29 17:59:04 +00:00
Ian Lance Taylor 5aca405826 * lexsup.c (parse_args): Set config.dynamic_link to false for -N
and -n.
1995-11-28 17:15:37 +00:00
Ian Lance Taylor 4f351b156d fix last change 1995-11-27 20:02:12 +00:00
Ian Lance Taylor 12bfa0bcf5 * ld-srec/srec.exp: Add setup_xfail calls for i[345]86-*-aout*.
* ld-srec/sr1.c (V_SPILL, V_FILL): Define.
	* ld-srec/sr3.cc: Likewise.
1995-11-27 19:39:09 +00:00
Ian Lance Taylor 6a4667f4dc * configure: Rebuild with autoconf 2.7. 1995-11-27 18:19:15 +00:00
David Edelsohn d87e370ba8 * scripttempl/pe.sc: Two .junk's is too much junk. 1995-11-25 02:37:58 +00:00
Ian Lance Taylor caf2a91318 * configure.in: Use BFD_NEED_DECLARATION.
* acconfig.h: Put NEED_DECLARATION_FREE in @TOP@ section.
	* configure, config.in: Rebuild with autoconf 2.6.
1995-11-21 23:32:33 +00:00
Ian Lance Taylor 13eb3290f3 * ldmain.c (constructor_callback): Don't warn about BFD_RELOC_CTOR
being unsupported if this is not a relocaeable link and the input
	BFD supports it, since ldctor_build_sets can cope with that case.
1995-11-21 21:15:49 +00:00
Ian Lance Taylor ad2282f68f * ld-empic/empic.exp: Update for changes in objdump output. 1995-11-21 21:06:55 +00:00
Stan Shebs 9079ed57d8 Keep PowerMac emulation file. 1995-11-18 00:55:22 +00:00
Stan Shebs 5ac7a6e96e * configure.tgt (powerpc-*-macos*): New target.
* emulparams/ppcmacos.sh: New file, PowerMac emulation.
	* Makefile.in (ALL_EMULATIONS): Add eppcmacos.o.
	(eppcmacos.c): New target.
	* mpw-eppcmacos.c: Update.
	* mpw-make.sed: Edit out attempts to use {GENSCRIPTS}.
1995-11-18 00:50:06 +00:00
Ian Lance Taylor dfc84b08d6 * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not
$(host_canonical) and $(target_canonical).
	(CXX_FOR_TARGET): Likewise.
1995-11-17 15:38:44 +00:00
David Edelsohn c4a14eefe2 * scripttempl/pe.sc (.endjunk): Move definition of `end' to here
so the malloc heap begins at a sane place.
1995-11-16 19:28:05 +00:00
Ken Raeburn b218076e59 version 2.6 1995-11-16 10:12:33 +00:00
Ian Lance Taylor 1b09c02b17 * ld-srec/srec.exp: New tests.
* ld-srec/sr1.c, ld-srec/sr2.c, ld-srec/sr3.cc: New files.
	* lib/ld.exp (ld_simple_link): Discard warnings about not being
	able to find the entry symbol.
1995-11-15 22:44:56 +00:00
Ian Lance Taylor 28f6feaf2e * ld-sh/sh2.c (__main): Define. 1995-11-15 01:05:26 +00:00
Ian Lance Taylor 204066750f * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Use the
environment variable LD_RUN_PATH if neither -rpath nor -rpath-link
	were used.
	(gld${EMULATION_NAME}_before_allocation): Use the environment
	variable LD_RUN_PATH if -rpath was not used.
	* ld.texinfo, ld.1: Document LD_RUN_PATH.
PR 8428.
1995-11-14 22:10:14 +00:00
Ian Lance Taylor 7eb5ccf525 * ldfile.c (ldfile_try_open_bfd): If bfd_error_invalid_target,
report a better error.
1995-11-09 21:57:02 +00:00
Ian Lance Taylor 97121c41e9 * emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Add
new local variable special_sections, and pass it to
	size_dynamic_sections.  Look through the results, and move the
	sections around in the mapping so that they are defined correctly.
1995-11-09 18:11:03 +00:00
Ian Lance Taylor 9d3d323a2b * ldemul.c (ldemul_default_target): Cast getenv return value. 1995-11-08 16:41:39 +00:00
Kim Knuttila b2306582e3 added PowerPC PE targetting stuff 1995-11-07 22:20:00 +00:00
Kim Knuttila 070eddd986 New PowerPC Portable Executable stuff 1995-11-07 22:14:23 +00:00
Ian Lance Taylor e2ce2da872 * ld.texinfo: The linker does not use _main as an entry point. 1995-11-07 16:48:29 +00:00
Ian Lance Taylor 36b72df3de Tue Nov 7 11:46:11 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* scripttempl/m88kbcs.sc (.data): Calculate next boundary modulo
	0x2000 not 0x200.
1995-11-07 16:47:19 +00:00
Ian Lance Taylor 92c71a0b0d * configure.in: Add test for whether free must be declared.
* sysdep.h: Declare free if necessary.  Include "ansidecl.h".
	* acconfig.h: Explain NEED_DECLARATION_FREE.
	* configure, config.in: Rebuild.
1995-11-06 20:59:44 +00:00
Ian Lance Taylor 219555a64d * ld-empic/empic.exp: Accept a . in the address symbol. 1995-11-06 20:24:57 +00:00
Ian Lance Taylor 1bc9204d5b * ld-shared/shared.exp: Run tests on rs6000*-*-aix* and
powerpc*-*-aix*.  Add code to create appropriate exports files,
	and pass appropriate compilation flags, and test against
	appropriate expected output.
	* ld-shared/xcoff.dat: New file.
	* ld-shared/main.c: Put #ifndef XCOFF_TEST around tests that can
	not be linked using XCOFF.  Use shlib_shlibvar1 as a sample
	function pointer, rather than shlib_mainvar.
	* ld-shared/sh1.c: Likewise.
	* ld-shared/shared.dat: Update for change from using shlib_mainvar
	to using shlib_shlibvar1.
	* ld-shared/sun4.dat: Likewise.
1995-11-06 19:44:43 +00:00
Ian Lance Taylor 7ae3065c8f * lexsup.c (parse_args): Take B:: out of shortopts. 1995-11-06 16:00:00 +00:00
Ken Raeburn bd329d41ca some i386-netbsd cleanup 1995-11-05 10:14:28 +00:00
Ian Lance Taylor 92188bd2d6 use motorola-sysv*, not sysv3* 1995-11-03 20:10:50 +00:00
Ian Lance Taylor 6398299816 Wed Nov 1 15:42:45 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* Makefile.in (ALL_EMULATIONS): Add edelta68.o.
	(edelta68.c): New target.
	* configure.tgt (m68*-motorola-sysv3*): New target.
	* emulparams/delta68.sh: New file.
	* scripttempl/delta68.sc: New file.

	* scripttempl/m88kbcs.sc: Handle .init and .fini.  Change section
	addresses.
1995-11-01 20:52:10 +00:00
Ian Lance Taylor ef51e36abc * ldgram.y (mri_script_command): Accept ',' as well as '=' in
ALIGN and ALIGNMOD statements.
1995-11-01 17:31:58 +00:00
Ian Lance Taylor 2a80ec10a8 * emultempl/aix.em: Include ldgram.h.
(gld${EMULATION_NAME}_parse_args): Handle -pD and -pT, as used on
	AIX 4.1.
	* Makefile.in ($(EMULATION_OFILES)): Depend upon ldgram.h.
1995-11-01 16:46:19 +00:00
Ian Lance Taylor 02a5d23525 Tue Oct 31 18:22:24 1995 David Mosberger-Tang <davidm@azstarnet.com>
* configure.host (alpha-*-linux*): New host.
	* configure.tgt (alpha-*-linux*): New target.
1995-10-31 23:23:48 +00:00
Ian Lance Taylor d29120d2ff really make import_file static 1995-10-31 20:28:25 +00:00
Ian Lance Taylor 5666490bee * emultempl/aix.em (export_files): Remove.
(import_files): Make static.
	(struct export_symbol_list): Define.
	(export_symbols): New static variable.
	(gld${EMULATION_NAME}_parse_args): Handle an initial -b option
	correctly.  Call read_file for an export file.
	(gld${EMULATION_NAME}_before_allocation): Call
	bfd_xcoff_export_symbol for each export symbol, rather than
	calling read_file for each export file.
	(gld${EMULATION_NAME}_read_file): For an export file, make the
	exported symbols undefined, and store them on the export_symbols
	list.
1995-10-31 17:39:55 +00:00
Ken Raeburn e295a90d12 keep files added by Niklas Hallqvist 1995-10-31 07:43:58 +00:00
Steve Chamberlain 2543860d19 Sat Oct 28 00:10:03 1995 steve chamberlain <sac@slash.cygnus.com>
* emultempl/pe.em (gld_${EMULATION_NAME}_parse_args):
	Don't hang if last option is unrecognised.
	(gld_${EMULATION_NAME}_set_symbols): Insert created
	symbols into ABS output section.
1995-10-28 07:26:10 +00:00
Ian Lance Taylor 9145928587 * ld-scripts/script.t: Put .pr in .text, and .rw in .data, for
convenience when testing XCOFF.
1995-10-28 05:55:00 +00:00
Niklas Hallqvist d0ae7d95f7 * Makefile.in (ALL_EMULATIONS): Added support for the NetBSD
m68k4k arch.
	(em68k4knbsd.c): New rule.

	* configure.tgt: Added support for the NetBSD m68k4k arch.

	* genscripts.sh, ldint.texinfo,
	emulparams/{a29k,armaoutb,armaoutl,coff_sparc,ebmon29k,gld960,
	gld960coff,go32,h8300,h8300h,h8500,h8500b,h8500c,h8500m,h8500s,
	hp300bsd,hp3hpux,hppaelf.sh,i386aout,i386bsd,i386coff,i386go32,
	i386linux,i386lynx,i386nbsd,lnk960,m68kaout,m68kcoff,m68klynx,
	m88kbcs,mipsbig,mipsbsd,mipsidt,mipsidtl,mipslit,news,ns32knbsd,
	pc532machaout,rce,riscix,sa29200,sh,shl,sparclynx,sparcnbsd,
	st2000,sun3,sun4,vanilla,vax,vsta,w65,z8001,z8002}.sh: Changed
	PAGE_SIZE to TARGET_PAGE_SIZE.

	* emulparams/m68knbsd.h: Ditto.
	(TEXT_START_ADDR, NONPAGED_TEXT_START_ADDR): We have 8K pagesize.
	(EXECUTABLE_SYMBOLS): Hardcode __DYNAMIC to zero for the time
	being.

	* emulparams/m68k4knbsd.sh: New file.

	* scripttempl/aout.sc: Expand EXECUTABLE_SYMBOLS if relocating.
1995-10-28 01:40:02 +00:00
Ian Lance Taylor cf79773cb1 * emultempl/aix.em: Include ldctor.h.
(gld${EMULATION_NAME}_after_open): New static function.
	(gld${EMULATION_NAME}_before_allocation): Call find_relocs.
	(gld${EMULATION_NAME}_find_relocs): New static function.
	(gld${EMULATION_NAME}_find_exp_assignment): New static function.
	(ld_${EMULATION_NAME}_emulation): Use new after_open function.
	* scripttempl/aix.sc: Use CONSTRUCTORS in .data.
	* ldctor.c (struct set_info): Move definition into ldctor.h.
	(struct set_element): Likewise.
	(sets): Make non-static.
	(ldctor_add_set_entry): Add name parameter.  Save it in the new
	set element.
	(ldctor_build_sets): Avoid being called twice.  Pass set element
	name to lang_add_reloc.
	* ldctor.h (struct set_info): Move definition here from ldctor.c.
	(struct set_element): Likewise.  Add new field name.
	(sets): Declare.
	(ldctor_add_set_entry): Declare new name parameter.
	* ldwrite.c (build_link_order): Don't insist that either name or
	section be NULL in a lang_reloc_statement.
	* ldmain.c (add_to_set): Pass NULL to ldctor_add_new_set_entry for
	new name parameter.
	(constructor_callback): Pass name to ldctor_add_new_set_entry for
	new name parameter.
1995-10-27 22:21:43 +00:00
Stan Shebs aacc02d70f Reflect updates to Mac support 1995-10-27 05:30:14 +00:00
Stan Shebs 49af8a4ec7 * mpw-config.in: Add PowerMac target support, generate config.h.
* mac-ld.r: New file, Mac resources.
	* mpw-make.sed: New file, edits Makefile.in into MPW syntax.
	* mpw-make.in: Remove.
	* mpw-eppcmacos.c: Prebuilt version of PowerMac linking script.
1995-10-27 05:28:17 +00:00
Ian Lance Taylor 27b4433688 * ld-bootstrap/bootstrap.exp: On AIX, pass -bI/lib/syscalls.exp
along with --static.
1995-10-27 03:30:15 +00:00
Ian Lance Taylor b18896d9bd * ld-scripts/script.s: Make symbols global. 1995-10-27 02:53:47 +00:00
Ian Lance Taylor c7c8b500b9 * emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Treat
-static as a synonym for -bnso.
1995-10-27 01:59:30 +00:00
Ian Lance Taylor 328e5a48e8 * scripttempl/aix.sc: Move special symbols inside sections.
Always start .data at 0.
1995-10-26 18:12:41 +00:00
Ken Raeburn b008b7bf76 updated for jsmith's file renaming 1995-10-25 22:07:38 +00:00
Per Bothner 8a8965f1c0 * Makefile.in (diststuff): Also make info.
(maintainer-clean realclean):  Also delete *.info*.
1995-10-25 18:51:37 +00:00
Ian Lance Taylor 585c92fe44 add OUTPUT_FORMAT and LIB_SEARCH_DIRS 1995-10-25 17:51:13 +00:00
Ian Lance Taylor 1764521ffe tweak option handling 1995-10-25 17:37:35 +00:00
Ian Lance Taylor 57fc1e90b7 * emultempl/aix.em: Add support for various AIX linker options,
for AIX import and export files, and for AIX shared objects.
	* scripttempl/aix.sc: Add .pad.  Put .ds just before the TOC.
1995-10-25 15:49:27 +00:00
Ian Lance Taylor 7d6439d974 * ldmain.c (main): Initialize new field link_info.static_link.
* ldmain.c (add_keepsyms_file): Add \n at end of einfo calls.
	(constructor_callback): Likewise.
	* ldmisc.c (vfinfo): Likewise.
	* ldwrite.c (build_link_order): Likewise.
1995-10-25 15:48:53 +00:00
Ian Lance Taylor e54bf1c1a4 * ld.texinfo: The MRI ALIGN directive is supported. 1995-10-25 15:28:28 +00:00
Jackie Smith Cashion bef5440479 Renamed the VR4300 specific emulparams files to 8.3 unique names,
since the old names could cause problems when hosting the source tree
on non-Un*x systems.
1995-10-23 11:56:50 +00:00
Ian Lance Taylor 5e8e7e6680 * ldlex.l: Treat PROVIDE as a keyword in expression state. 1995-10-19 21:42:41 +00:00
Steve Chamberlain 9c284f3f98 * scripttempl/pe.sc (.bss): Move to be after .text 1995-10-19 00:35:37 +00:00
Ian Lance Taylor 5df68a88c4 * emultempl/sunos.em (gld${EMULATION_NAME}_find_exp_assignment):
Search trinary.cond rather than searching trinary.lhs twice.  From
	linli@ihp.PHys.ethz.CH.
1995-10-17 22:38:50 +00:00
Ian Lance Taylor 235c6a672f * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Move
directory searching code into gld${EMULATION_NAME}_search_dir.
	(gld${EMULATION_NAME}_search_dir): New static function, extracted
	from gld${EMULATION_NAME}_find_so.
	(global_needed, global_found): New static variables.
	(gld${EMULATION_NAME}_after_open): New static function.
	(gld${EMULATION_NAME}_search_needed): New static function.
	(gld${EMULATION_NAME}_try_needed): New static function.
	(gld${EMULATION_NAME}_check_needed): New static function.
	(ld_${EMULATION_NAME}_emulation): Use new after_open function.
	* ld.texinfo, ld.1: Mention -rpath-link on SunOS.
1995-10-17 22:36:25 +00:00
Ian Lance Taylor 03165292c0 * Makefile.in (eelf32ppc.c): Depend upon elf32.em, not generic.em.
(eelf32lppc.c): Likewise.
	* emulparams/elf32lppc.sh (TEMPLATE_NAME): Define as elf32.
	(GENERATE_SHLIB_SCRIPT): Define as yes.
1995-10-17 16:23:59 +00:00
Ian Lance Taylor b5f076d4aa * configure.tgt (powerpc-*-aix*): New target; use aixppc.
(rs6000-*-aix*): New target; use aixrs6.
	* emulparams/aixppc.sh, emulparams/aixrs6.sh: New files.
	* emultempl/aix.em: New file.
	* scripttempl/aix.sc: New file.
	* Makefile.in (ALL_EMULATIONS): Add eaixppc.o and eaixrs6.o.
	(eaixppc.c, eaixrs6.c): New targets.
1995-10-16 23:19:04 +00:00
Ian Lance Taylor 091824ebcd * ldlang.c (lang_finish): Don't try to use an entry_symbol from a
section which was not linked into the final output.
PR 8172.
1995-10-10 21:54:24 +00:00
Steve Chamberlain ef1d2d2ebf * emultempl/pe.em (gld_${EMULATION_NAME}_parse_args): Fix
fatal typos.
1995-10-10 17:21:18 +00:00
Ian Lance Taylor 5caef232bd * ld.h (args_type): Add rpath_link field.
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search for
	required dependencies in rpath_link path.  Only search
	LD_LIBRARY_PATH when configured native.
	* lexsup.c (parse_args): Recognize -rpath-link.
	* ld.1, ld.texinfo: Document -rpath-link.
1995-10-10 05:05:18 +00:00
Ian Lance Taylor 776f259038 * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
bother searching for needed libraries unless doing a final link.
1995-10-07 21:09:57 +00:00
Ken Raeburn 8016553585 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* ld/ld.1: Fix formatting bugs.
1995-10-06 20:46:02 +00:00
Ian Lance Taylor f054ce204a * ldexp.c (exp_get_abs_int): Return bfd_vma, not int.
* ldexp.h (exp_get_abs_int): Update declaration.
	* ldlang.c (print_output_section_statement): Use fprintf_vma to
	print return value of exp_get_abs_int.
PR 8142.
1995-10-04 21:39:29 +00:00
Ian Lance Taylor 8055e7a883 * emultempl/elf32.em (global_stat): New file static variable.
(gld${EMULATION_NAME}_try_needed): Call stat_needed to make sure
	that the file has not already been included under another name.
	(gld${EMULATION_NAME}_stat_needed): New static function.
1995-10-02 17:59:14 +00:00
Ian Lance Taylor 0b0642d6eb * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): If
command_line.rpath is set, use it, rather than the -L options, to
	build the rules section.
	* ld.texinfo: Document this use of -rpath.
1995-09-29 22:37:36 +00:00
Ian Lance Taylor dd16b6557e * lexsup.c (parse_args): Don't set link_info.shared for -assert
pure-text.  Pass true, not 1, to lang_add_entry.
	* emultempl/sunos.em (find_assign): New static variable.
	(found_assign): New static variable.
	(gld${EMULATION_NAME}_before_allocation): Rename local h to hdyn.
	If not a relocateable link, and no start symbol was specified on
	the command line, and there are any undefined symbols, set
	link_info.shared.  If link_info.shared is set, set the address of
	the .text section to 0x20.
	(gld${EMULATION_NAME}_find_assignment): Rename from
	gld${EMULATION_NAME}_find_statement_assignment.  If find_assign is
	set, then just set found_assign based on whether an assignment is
	found to find_assign.
	(gld${EMULATION_NAME}_get_script): Don't use a special script when
	producing a shared library.
	* emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Remove.
	* scripttempl/aout.sc: Remove CREATE_SHLIB tests.
	* ldlang.c (entry_from_cmdline): New global variable.
	(lang_add_entry): Change cmdline parameter from int to boolean.
	Use global entry_from_cmdline rather than function static
	from_cmdline.
	* ldlang.h (entry_from_cmdline): Declare.
	(lang_add_entry): Change declaration of second parameter from int
	to boolean.
	* ldgram.y: Pass false, not 0, to lang_add_entry.
1995-09-29 15:33:29 +00:00
Ian Lance Taylor 630f4ac9c6 * ld.h (parsing_defsym): Declare.
* ldlex.h (lex_string): Declare.
	* ldlex.l (lex_string): Define.
	* lexsup.c (parsing_defsym): Define.
	(parse_args): In OPTION_DEFSYM case, set lex_string before calling
	lex_redirect, and clear it after calling yyparse.  Set
	parsing_defsym around call to yyparse.
	* ldmain.c (main): Set lex_string before calling lex_redirect, and
	clear it after calling yyparse.
	* ldmisc.c (vfinfo): For %S, handle --defsym arguments and built
	in linker scripts correctly.
PR 8092.
1995-09-28 19:18:07 +00:00
Ian Lance Taylor a69bb1fa31 * scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other
COFF targets, allowing for the leading underscore used on SPARC
	COFF.
PR 8006.
1995-09-28 17:59:51 +00:00
Ian Lance Taylor b4f9d9bc42 mention creating SunOS shared libraries 1995-09-28 16:41:31 +00:00
Ian Lance Taylor a43308b283 * ld-shared/shared.exp: Run the tests on sparc*-*-sunos4*. Add
appropriate modifications and setup_xfails.
	* ld-shared/sun4.dat: New file.
1995-09-28 16:39:55 +00:00
Ian Lance Taylor 5753006bf0 * lexsup.c (parse_args): Handle -assert.
* emulparams/sun4.sh (GENERATE_SHLIB_SCRIPT): Define.
	* emultempl/sunos.em (gld${EMULATION_NAME}_get_script): Use the
	shared library script when appropriate.
	* scripttempl/aout.sc: If CREATE_SHLIB is set, start the .text
	section at SIZEOF_HEADERS.
1995-09-28 16:36:34 +00:00
David Edelsohn 132dd91099 * Makefile.in (earmcoff.c): Build.
* configure.tgt (arm-*-coff): New target
	* emulparms/armcoff.sh: New file.
	* scripttempl/armcoff.sc: New file.
1995-09-28 08:48:02 +00:00
Ian Lance Taylor ef89823938 * scripttempl/i386coff.sc: Remove .data2; no longer needed. 1995-09-26 18:01:34 +00:00
Ian Lance Taylor 8dd03673bf * ldfile.c (ldfile_set_output_arch): Make arch const. 1995-09-22 22:09:43 +00:00
Michael Meissner 7453a7533f Locate __bss_start at the real start of bss. 1995-09-21 21:57:32 +00:00
Ian Lance Taylor 208bc89e0b Based on patches by Alan Modra <alan@spri.levels.unisa.edu.au>:
* Makefile.in (CC_FOR_TARGET): Remove brokensed stuff.
	(CXX_FOR_TARGET): Likewise.
	(install): Likewise.
	(GENERATED_HFILES): Remove config.h.
	(.dep): Depend upon config.h.
1995-09-18 18:57:59 +00:00
Ian Lance Taylor 08879cdec8 Mon Sep 18 14:39:38 1995 Arne H. Juul <arnej@pvv.unit.no>
* configure.tgt (mips*-dec-netbsd*): New target.
1995-09-18 18:42:00 +00:00
Ian Lance Taylor 5f4c7a8dec * lib/ld.exp (default_ld_version): Call prune_system_crud.
(default_ld_relocate, default_ld_link): Likewise.
	(default_ld_simple_link, default_ld_compile): Likewise.
	(default_ld_assemble, default_ld_nm): Likewise.
1995-09-18 18:23:06 +00:00
Ian Lance Taylor bca8b442e6 mention COFF linker improvement 1995-09-18 17:39:04 +00:00
Ken Raeburn db8beef4ea configure.host: fix shell syntax errors 1995-09-16 00:05:19 +00:00
Ian Lance Taylor 4977f3b47e * Makefile.in (maintainer-clean): New target. 1995-09-12 22:23:17 +00:00
Ian Lance Taylor cf7f2f7151 * ldmain.c (struct warning_callback_info): Define.
(warning_callback): Add new parameter symbol.  Call
	warning_find_reloc to try to find the section and VMA.
	(warning_find_reloc): New static function.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Pass NULL as symbol parameter to warning callback.
1995-09-12 20:34:49 +00:00
Steve Chamberlain 20a753dfd5 Thu Sep 7 12:50:49 1995 steve chamberlain <sac@slash.cygnus.com>
* scripttemp/pe.sc:  Allow both spellings of .ctors/.dtors.
	Start .text section on the right boundary. Always align
	stabs.
1995-09-12 19:46:03 +00:00
Ian Lance Taylor cca520b580 * ld.texinfo: Clarify -L option. 1995-09-12 19:01:48 +00:00
Ian Lance Taylor b75d0928b1 * ldlang.c (lang_one_common): Add cast to avoid warning.
(topower): Likewise.  Also, reindent.
	* ldwrite.c (clone_section): Change i to unsigned int.
	* emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Add
	cast to avoid warning.
1995-09-12 16:25:51 +00:00
Ian Lance Taylor 57aa2887e8 Revert Linux directory searching: it turns out that Linux no longer
uses it.
1995-09-11 15:04:49 +00:00
Ian Lance Taylor ed753c2049 Add Linux style directory searching.
* configure.tgt: Add i386lelf to targ_extra_emuls for
	i[345]86-*-linuxaout* and i[345]86-*-linuxoldld.  For
	i[345]86-*-linux*, set targ_emul to i386lelf, and add elf_i386 to
	targ_extra_emuls.
	* emulparams/i386lelf.sh: New file, a copy of elf_i386.sh.
	* emultempl/elf32.em: If TARGET_IS_i386lelf, use autoconf
	recommended mechanism to define DIR and struct dirent.
	(libcmp): New static function use only when TARGET_IS_i386lelf.
	(gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
	* Makefile.in (ALL_EMULATIONS): Add ei386lelf.o
	(ei386lelf.c): New target.
1995-09-08 23:37:45 +00:00
Ian Lance Taylor 62b4ac8bc6 * ldemul.h (ldemul_set_symbols): Declare.
(ldemul_parse_args): Declare.
	* ldemul.c (ldemul_parse_args): Fix indentation.
1995-09-08 21:28:17 +00:00
Ian Lance Taylor 74453659c5 * ld-cdtest/cdtest.exp: If the compiler does not exist, mark the
tests as untested rather than unresolved.
1995-09-08 21:16:31 +00:00
Ian Lance Taylor b8345a37ac * configure.in: Call AC_HEADER_DIRENT.
* configure, config.in: Rebuild.
	* emultempl/sunos.em: Use autoconf recommend mechanism to define
	DIR and struct dirent.
1995-09-08 21:11:40 +00:00
Ian Lance Taylor d62ef165e3 * configure.tgt (mips*-*-bsd*): New case. 1995-09-08 20:46:44 +00:00
Ian Lance Taylor 673f5b9f2c * configure.host (i[345]86-sequent-ptx* | i[345]86-sequent-sysv*)
New case.
	* configure.tgt (i[345]86-*-ptx*): New case.
1995-09-08 20:34:05 +00:00
Ian Lance Taylor ef346f1a7f * config.in: Rename from config.h.in.
* configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
	Check for config.h:config.in when creating stamp-h.
	* configure: Rebuild.
	* Makefile.in (stamp-h): Depend upon config.in rather than
	config.h.in.  Set CONFIG_HEADERS to config.h:config.in when
	calling config.status.
1995-09-07 17:20:53 +00:00
Ian Lance Taylor f40d9bc267 * Makefile.in (distclean): Remove config.h and stamp-h. 1995-09-07 16:53:02 +00:00
Ian Lance Taylor 36ea6198a7 * configure.host (sparc-*-sunos64*): Remove.
* ldlang.c (lang_map): Check BFD64, not HOST_64_BIT.
1995-09-07 14:52:12 +00:00
Ian Lance Taylor 9d32554321 * ldexp.c (exp_fold_tree): Don't warn about moving the location
counter backward in the absolute section.
PR 7942.
1995-09-07 14:49:31 +00:00
Ian Lance Taylor d66c832b59 * configure.in: Rewrite to use autoconf.
* configure.host: New file.
	* configure.tgt: New file.
	* aclocal.m4: New file.
	* configure: New file, built by autoconf.
	* acconfig.h: New file.
	* config.h.in: New file, built by autoheader.
	* sysdep.h: New file.
	* ld.h: Incorporate old contents of config.h.
	* config.h: Remove.
	* Makefile.in: Various changes for new configure script.  Also:
	(CC_FOR_BUILD): Remove.
	(ldmain.o): Don't bother to ensure that EMUL is non-empty.
	(dep.sed): Use @SRCDIR@, not @srcdir@.
	* dep-in.sed: Use @SRCDIR@, not @srcdir@.
	* genscripts.sh: Create ldscripts if it does not exist.
	* ldemul.c, lexsup.c, mpw-emipsidt.c: Don't include "config.h".
	* mpw-esh.c, emultemp/*.em: Likewise.
	* ldmain.c: Likewise.  Include <ctype.h>.  Don't try to set
	HAVE_SBRK here.
	* config/*.mt, config/*.mh: Remove.
1995-09-06 18:58:05 +00:00
Ken Raeburn af0786b401 some ns32k updates from Ian Dall 1995-09-05 19:04:22 +00:00
Ian Lance Taylor f6feefe448 * ldmain.c (warning_callback): Add abfd, section, and address
parameters.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Change call to warning accordingly.

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): If not
	relocateable and not shared, put .gnu.warning.SYMBOL sections into
	the .text section.
1995-09-01 18:06:53 +00:00
Jackie Smith Cashion 751b7dcc00 NEC VR4300 target (IDT SIM monitor) support.
Fri Sep  1 08:35:16 1995  James G. Smith  <jsmith@beauty.cygnus.com>

        * configure.in: Added mips*vr4300-idt-elf* and
        mips*vr4300el-idt-elf* targets.
        * Makefile.in: Added eelf32vr4300* targets.
        * emulparams/{elf32vr4300.sh, elf32vr4300el.sh}: Added.
        * config/{mips-vr4300.mt, mips-vr4300el.mt}: Added.
1995-09-01 15:38:07 +00:00
Ian Lance Taylor 4dd284fab7 * scripttempl/a29k.sc: Fix to be reasonable. From Brendan Kehoe
<brendan@cygnus.com>.
1995-09-01 14:54:01 +00:00
Steve Chamberlain 5f8ac7e7f6 Thu Aug 31 16:37:07 1995 steve chamberlain <sac@slash.cygnus.com>
* ldemul.c (ldemul_parse_args): New.
	* ldemul.h (ld_emulation_xfer_struct): Add parse_args.
	* lexsup.c (all pe stuff): Moved into pe.em
	(parse_args): Call emulation arg parser.
	* emultempl/pe.em (parse_args): handle PE specfic args.
1995-08-31 23:42:53 +00:00
Ian Lance Taylor 0b4fc03b37 * ldlang.c (lang_memory_region_lookup): Don't use the first region
as the default region.  Create a new region instead.
1995-08-31 21:02:39 +00:00
Steve Chamberlain 6fd48357ec Tue Aug 22 07:36:58 1995 steve chamberlain <sac@slash.cygnus.com>
* scripttempl/pe.sc: Keep .edata, don't base stabs at 0.
	* emulparams/armpe.sh: Run PE script.
1995-08-22 14:38:01 +00:00
Steve Chamberlain 011d93b38d Mon Aug 21 18:30:42 1995 steve chamberlain <sac@slash.cygnus.com>
* ldmain.c (main): Remove PE stuff.
	* lexsup.c (options): Load more PE options.
	(set_pe_value): New function.
1995-08-22 01:54:56 +00:00
Steve Chamberlain 229ba4b362 * ldmain.c (main): Remove PE stuff.
* lexsup.c (options): Load more PE options.
	(set_pe_value): New function.
1995-08-22 01:32:11 +00:00
Steve Chamberlain eb7f87c5c8 Thu Aug 17 13:35:49 1995 steve chamberlain <sac@slash.cygnus.com>
* emultempl/{armpe.sc, i386pe.sc}: Deleted.
	* emultempl/pe.sc: New file performs generic PE support and sorts
	archive members.
	* emulparams/{armpe.sh,i386pe.sh}: Use new file.
	* scripttempl/{armpe.sc, i386pe.sc}: Deleted
	* scripttempl/pe.sc: New.
	* Makefile.in: Use new files.
b
1995-08-17 22:53:56 +00:00
David Edelsohn ed67cfa226 * scripttempl/h8500s.sc (.rdata): All data must go in data segment.
(.strings,.ctors,.dtors): Likewise.
1995-08-17 21:49:40 +00:00
Steve Chamberlain a048254cce * scripttempl/armpe.sc: Always start code at 0x401000, even 1995-08-16 23:29:18 +00:00
Steve Chamberlain 22cd79c599 Wed Aug 16 11:38:59 1995 steve chamberlain <sac@slash.cygnus.com>
* scripttempl/armpe.sc: Always start code at 0x401000, even
	if -r.
	* ldwrite.c (strdup): New extern declaration.
	* ldgram.y (atype): New rule to clarify type parsing.
	* ldlang.c (init_os): Remove commented out code.
	(lang_size_sections): Set SEC_ALLOC and SEC_LOAD bits
	unless told not to by the link script.
1995-08-16 20:34:44 +00:00
Ian Lance Taylor 1d169acc61 * ldlang.c (lang_set_startof): New static function.
(lang_process): Call it.
1995-08-16 17:18:59 +00:00
Ian Lance Taylor 9b22219054 * ldgram.y: Tweak casesymlist to avoid bison errors. 1995-08-16 16:26:57 +00:00
Ian Lance Taylor 80fd1f4584 * lexsup.c (parse_args): Accept -h as a synonym for --soname, for
Solaris compatibility.
1995-08-16 15:50:27 +00:00
Ian Lance Taylor 62a72a565d * ld-scripts/script.exp: Split script verification into a proc.
Add simple test of MRI script.
	* ld-scripts/scriptm.t: New file.
1995-08-15 21:37:19 +00:00
Ian Lance Taylor 3a47309642 * ldgram.y (YYDEBUG): If not defined, define as 1.
(CASE, EXTERN, START): New tokens.
	(mri_script_command): Handle CASE, EXTERN, INCLUDE, START.
	(casesymlist): New nonterminal.
	(extern_name_list): New nonterminal.
	* ldlex.l: Accept lower case trailing base specifiers.  Don't
	ignore the first digit when the base is a suffix.  Accept many
	EXPRESSION state tokens in MRI state.  Support MRI continuation
	lines and MRI semicolon comments.  Accept all MRI keywords in
	lower case.  Add CASE, EXTERN, and START MRI keywords.
1995-08-15 21:35:46 +00:00
Ken Raeburn 52a55937a2 * emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Use xmalloc instead of
alloca.
1995-08-08 23:31:28 +00:00
J.T. Conklin 65d22248e9 * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Don't use
$r/../gcc/xgcc unless it is present.
1995-08-08 22:25:36 +00:00
Ken Raeburn cc298fb97a treat linuxoldld like linuxaout* 1995-07-28 01:43:15 +00:00
Steve Chamberlain 66a61efd37 Thu Jul 27 15:26:28 1995 steve chamberlain <sac@slash.cygnus.com>
* scripttempl/i386pe.sc: Cope with constructors.
	* scripttempl/z8ksim.sc: Deleted.
	* scripttempl/z8000.sc: Resurrected as this, but
	can handle z8001 and z8002 formats.
	* emulparams/z8ksim.sh: Deleted.
	* emulparams/{z8001.sh, z8002.sh}: New files.
	* config/z8ksim.mt: Deleted
	* config/z8k-coff.mt: New, generates both emulations.
1995-07-27 22:43:44 +00:00
Ian Lance Taylor 0f5e0993ec * config/default.exp: Define objcopy if it is not defined.
* ld-sh/*: New tests for SH relaxing.
1995-07-24 21:03:12 +00:00
Ian Lance Taylor 86c2d1a39e * ld-empic/empic.exp: If $CC does not exist, call untested rather
than unresolved.
1995-07-24 19:36:57 +00:00
Ian Lance Taylor 59a0866d8c * ldlang.c (lang_process): Call reset_memory_regions for each
relaxation pass.
1995-07-24 19:25:32 +00:00
Michael Meissner dd0f963525 Add R_PPC_SDAREL relocation. 1995-07-22 02:59:48 +00:00
Ken Raeburn d2c66084be ldmain.c (constructor_callback): Allocate set_name in stack frame, rather than
always calling alloca with a fixed size.
1995-07-20 20:35:03 +00:00
David Edelsohn 45bc71881e * emulparams/armpe.sh (OUTPUT_FORMAT): Change to pei-arm-little.
(LITTLE_OUTPUT_FORMAT, BIG_OUTPUT_FORMAT): Define.
1995-07-19 23:23:31 +00:00
Ian Lance Taylor 242eee7a0b * ldwrite.c (split_sections): Don't split the first input section
into a new output section.
1995-07-17 17:59:27 +00:00
Michael Meissner c7950dcc68 Use elf config file. 1995-07-15 04:35:17 +00:00
Ian Lance Taylor 63e1380d57 * emultempl/mipsecoff.em (check_sections): Use %P, not %F. 1995-07-14 20:11:43 +00:00
Ian Lance Taylor 738844c1f1 * ld-undefined/undefined.exp: New test, to check reporting of
undefined symbols.
	* ld-undefined/undefined.c: New file.
1995-07-14 17:11:53 +00:00
Ian Lance Taylor 8a0683c1fa * ldver.c (help): Update list of options to match currently
supported list.
1995-07-14 16:12:26 +00:00
Ian Lance Taylor 047e0fcd8e * ldexp.c (exp_intop): Don't cast stat_alloc arg to bfd_size_type;
it takes a size_t anyhow.
	(exp_binop): Likewise.
	(exp_trinop): Likewise.
	(exp_unop): Likewise.
	(exp_nameop): Likewise.
	(exp_assop): Likewise.
	* ldlang.c (lang_memory_region_lookup): Likewise.
	(init_os): Likewise.
	(ldlang_add_undef): Likewise.
	(insert_pad): Likewise.
	* ldfile.c (ldfile_add_arch): Don't cast xmalloc arg to
	bfd_size_type.
1995-07-13 17:57:53 +00:00
Ian Lance Taylor 395ccfce21 * ldemul.h (ldemul_open_dynamic_archive): Add search parameter to
declaration.
	(ld_emulation_xfer_type): Add search parameter to
	open_dynamic_archive entry point.
	* ldemul.c (ldemul_open_dynamic_archive): Add search parameter.
	* ldfile.c (ldfile_try_open_bfd): Rename from try_open_bfd, and
	make non-static.  Change all callers to use new name.
	(ldfile_open_file_search): Make static.  If entry is dynamic, call
	ldemul_open_dynamic_archive.
	(ldfile_open_file): Don't call ldemul_open_dynamic_archive.
	* ldfile.h (ldfile_open_file_search): Don't declare.
	(ldfile_try_open_bfd): Declare.
	* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
	Accept search parameter.  Don't search for a library, just look in
	a single place.
	* emultempl/linux.em (gld${EMULATION_NAME}_open_dynamic_archive):
	Likewise.
1995-07-12 15:37:12 +00:00
Ian Lance Taylor 917199fe29 * ldmisc.c (vfinfo): Don't print the line number if it isn't
meaningful.
1995-07-11 16:30:02 +00:00
Ian Lance Taylor a89d9f5bf1 * ld.h (ld_config_type): Add field warn_constructors.
* ldmain.c (add_to_set): Warn if config.warn_constructors.
	(constructor_callback): Likewise.
	* lexsup.c (parse_args): Handle -warn-constructors.
	* ld.texinfo, ld.1: Document -warn-constructors.
PR 7406.
1995-07-10 22:16:12 +00:00
Ian Lance Taylor c16b92d224 * emultempl/elf32.em (gld${EMULATION_NAME}_check_needed): Don't
get confused by directory names if we searched for the file.
PR 7401.
1995-07-10 22:01:03 +00:00
Ian Lance Taylor 7213def760 Based on patches from H.J. Lu <hjl@nynexst.com>:
* ldlang.h (lang_input_statement_type): Add new field dynamic.
	* ldlang.c (new_afile): Set dynamic from config.dynamic_link.
	* ldfile.c: Include bfdlink.h.
	(ldfile_open_file): Check dynamic field of entry, not global
	dynamic_link field.  Don't do a dynamic search when doing a
	relocateable link.
	* ldmain.c (main): Don't warn about dynamic_link for a
	relocateable link.
	* emultempl/sunos.em (gld${EMULATION_NAME}_find_so): Skip file if
	dynamic is false.
	(gld${EMULATION_NAME}_create_output_section_statements): Always
	loop over input files.
	* Makefile.in: Rebuild dependencies.
1995-07-10 21:16:40 +00:00
Ian Lance Taylor 4551e108a0 * ld.texinfo, ld.1: Document -Bstatic, -Bdynamic, -Bshared, and
-shared.

Mon Jul 10 13:29:43 1995  Eric Youngdale  <eric@aib.com>

	* ldmain.c (main): Set link_info.symbolic to false.
	* lexsup.c (parse_args): Handle -Bsymbolic.
1995-07-10 17:41:13 +00:00
Ian Lance Taylor 1730bce9a3 Move testsuite ChangeLog entry into testsuite ChangeLog. 1995-07-10 15:18:38 +00:00
Ian Lance Taylor 3219881fcd Remove C comment characters from modified FSF address in expect scripts. 1995-07-10 15:16:41 +00:00
Ian Lance Taylor 10de6952c9 * ld-versados/versados.exp: If a test fails, report it correctly:
don't try to run the next test, and don't report a pass as well as
	a fail.
1995-07-10 15:15:10 +00:00
Ken Raeburn 943fbd5bd5 fsf address update, but not in COPYING files 1995-07-07 22:49:42 +00:00
Fred Fish eac6290c7e * ldmain.c (HAVE_SBRK): Define for everything except
specific systems that are known to not support sbrk.
	(main):  Use HAVE_SBRK to decide whether or not to use sbrk.
1995-07-05 07:47:43 +00:00
Ian Lance Taylor 7158d2b1a3 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment):
Handle etree_provide.
PR 7164.
1995-07-04 17:44:38 +00:00
Ian Lance Taylor 7523be3552 * emultempl/elf32.em (global_needed): New static variable.
(global_found): Likewise.
	(gld${EMULATION_NAME}_after_open): New static function.
	(gld${EMULATION_NAME}_search_needed): Likewise.
	(gld${EMULATION_NAME}_try_needed): Likewise.
	(gld${EMULATION_NAME}_check_needed): Likewise.
	(ld_${EMULATION_NAME}_emulation): Replace after_open_default with
	gld${EMULATION_NAME}_after_open.
PR 7083.
1995-07-04 16:57:34 +00:00
Steve Chamberlain cb848d619c * configure.in (i386-*-win32): New target.
* ld/testsuite/versados/(t1,t2).ld: End in newlines.
1995-07-03 21:34:53 +00:00
Ian Lance Taylor 22d3533cae * lexsup.c (parse_args): Let -G either set the small data size or
be equivalent to --shared, depending on the next argument.  Accept
	and ignore -z for Solaris compatibility.
PR 7118.
1995-07-03 18:40:26 +00:00
Ian Lance Taylor 243e769870 * lexsup.c (parse_args): Cast fopen result to PTR before storing
it in link_info.base_file.  Fix indentation.
1995-07-02 21:53:21 +00:00
Steve Chamberlain de71eb7786 Wed Jun 28 17:11:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
* ldmain.c (main): Always initialize PE info in link_info.
	* lexsup.c (OPTION_BASE_FILE): New option.
	(parse_args): Handle new option.
	* emulparams/armpe.sh: Output pei.
	* emultempl/i386pe.em: Add newline to end.
	* scripttempl/armpe.sc: Change output and quote the $s.
	* scripttempl/i386pe.sc: Change output and quote the $s.
1995-06-29 00:21:00 +00:00
Steve Chamberlain a900bc406e Fix pathnames right.. 1995-06-25 14:52:42 +00:00
Steve Chamberlain cd5431634a Fix filenames with two dots. 1995-06-24 02:48:48 +00:00
Ken Raeburn a2fb6995e0 msdos and moss code from Bryan Ford 1995-06-23 02:05:04 +00:00
Michael Meissner d513119138 Add .fixup section 1995-06-22 19:08:18 +00:00
Steve Chamberlain b368d24697 Sanitize seems to care about trailing spaces. 1995-06-22 16:30:19 +00:00
Steve Chamberlain 1684136b21 add ld-versados. 1995-06-21 20:55:01 +00:00
Stan Shebs aad9058089 Keep MPW x SH compiled linker script. 1995-06-21 20:00:22 +00:00
Steve Chamberlain 8370f03b67 New tests. 1995-06-21 17:15:11 +00:00
Stan Shebs 0283d893cb * mpw-esh.c: New file, modified for MPW from esh.c.
* scripttempl/sh.sc: Reformatted to simplify MPWification,
	use *() to concat stab sections instead of [].
1995-06-21 00:52:21 +00:00
Steve Chamberlain 8a239b6235 * scripttempl/armpe.sc: Add constructor support. 1995-06-15 15:48:35 +00:00
Steve Chamberlain 935cd0dd9d * ldlang.c (lang_size_sections): Any section with a DATA
statement has contents.
1995-06-13 16:12:04 +00:00
Ken Raeburn 74b3ead343 m68k elf linker fixes from Andreas Schwab 1995-06-11 19:30:02 +00:00
Steve Chamberlain ba0784fe48 * emulparams/armpe.sh, scriptempl/armpe.sc: Add end and stack. 1995-06-08 21:19:31 +00:00
Steve Chamberlain 28d0c3ce19 Add support for ARM-PE.
* Makefile.in (ALL_EMULATIONS): Add armpe.o
	* configure.in: Recognize armpe.
	* config/arm-pe.mt: New file.
	* emulparams/armpe.sh: New file.
	* scripttempl/armpe.sc: New file.
1995-05-24 18:26:23 +00:00
Ken Raeburn 6a98ecf24e * lib/ld.exp (default_ld_compile): If cc argument is multiple words, use only
the first when trying to verify the availability of the compiler.
1995-05-23 00:20:44 +00:00
David Edelsohn 8574107796 (cf-h8300h.mt): Deleted. 1995-05-22 22:25:46 +00:00
Ken Raeburn ff15324f63 Bunch of changes from Richard Earnshaw for generic bi-endian ARM aout targets.
Details in change logs.
1995-05-18 22:21:18 +00:00
Michael Meissner 7e11b1db3d Make filenames unique to 8.3 characters for Powerpc. 1995-05-16 22:29:39 +00:00
Steve Chamberlain 3f38a017be Fri May 12 11:03:55 1995 Steve Chamberlain <sac@slash.cygnus.com>
Tom Griest <griest@cs.yale.edu>

	Initial support for PE executables (eg NT, win32)

	* Makefile.in (configure.in, ei386pe): Add support.
	* ldmain.c (main): Initialize PE argument info.
	* ldwrite.c (print_file_stuff): Don't print out .drectve
	and .debug section info.
	* lexsup.c (set_subsystem, set_stack_heap, OPTION_HEAP,
	 OPTION_SUBSYSTEM, parse_argsm set_subsystem, set_stack_heap):
	 Handle new arguments.
	* config/i386-pe.mt, emultempl/i386pe.em, scripttempl/i386pe.sc:
	New files
1995-05-12 18:55:06 +00:00
Stu Grossman dea16e4dba * scripttempl/hppaelf.sc: Remove .PARISC.unwind section from text
segment.  This allows ld -r to preserve unwind sections.
1995-05-11 01:40:42 +00:00
Michael Meissner 417ced0de7 Add little endian PowerPC support. 1995-05-09 21:23:44 +00:00
Ken Raeburn fa9dea803d * ldlang.c (print_output_section_statement): Check subsection_alignment,
instead of checking section_alignment twice.  Noticed by Alan Modra
<alan@spri.levels.unisa.edu.au>.
1995-05-03 18:08:09 +00:00
Jeff Law 55ac59da2e Add hppa1.1-hp-lites support. 1995-05-02 22:39:41 +00:00
Ken Raeburn 575a4d91ed keep new files 1995-04-15 08:21:11 +00:00
Ken Raeburn bd1a093d78 * Makefile.in (ALL_EMULATIONS): Added em68kelf.o.
(em68kelf.o): New target.
* config/m68k-elf.mt, emulparams/m68kelf.sh: New files.
* configure.in: Use them for m68*-*-elf.
1995-04-14 20:33:05 +00:00
Stan Shebs 36ae618cfb Always keep MPW support 1995-04-12 18:46:15 +00:00
Stan Shebs b8e2d17d95 Merge MPW ChangeLog with generic ChangeLog 1995-04-12 18:44:27 +00:00
David Edelsohn 7e87eb1342 * emulparams/arcelf.sh (ENTRY): Define. 1995-04-07 03:40:15 +00:00
Ian Lance Taylor 59b4c1998a Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com)
* configure.in: Change linux to default to elf.  Using
	i[345]86-*-linuxaout will build a linker which defaults to a.out.
	* config/i386-laout.mt: Rename from old config/i386-linux.mt.
	* config/i386-linux.mt: Rename from old config/i386-lelf.mt.
	* config/i386-lelf.mt: Remove.
1995-03-30 19:42:38 +00:00
Ian Lance Taylor e920526d00 * ld.texinfo, ld.1: Document the -no-keep-memory option. 1995-03-30 18:10:51 +00:00
Ian Lance Taylor a735edad13 * ldmain.c (main): Revert patch of March 10, since the SVR4 linker
does mark shared libraries as executable.
1995-03-27 16:11:22 +00:00
Ian Lance Taylor 68233e44d9 * ldlang.c (lang_common): Change power to int. Pass larger values
before smaller values.
	(lang_one_common): Treat info as int *.  Don't bother to check for
	last value, since it is now zero.
1995-03-21 20:17:07 +00:00
Ian Lance Taylor 4da1dceac5 tipo 1995-03-18 06:56:51 +00:00
Ian Lance Taylor f400bbbb4f * ldlang.c (load_symbols): An empty is archive is OK. 1995-03-18 06:53:14 +00:00
Stan Shebs 6e49f018bc update for changed mpw filename 1995-03-18 00:14:30 +00:00