Commit Graph

1109 Commits

Author SHA1 Message Date
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