Commit Graph

163 Commits

Author SHA1 Message Date
Michael Tiemann
fb14975b70 Enable ld to build for RCE. This is not tested yet! 1994-11-25 17:06:38 +00:00
Steve Chamberlain
e93e87cb7b * Makefile.in: Add eshl.o.
* config/coff-sh.mt: Add shl emulation.
1994-11-24 06:06:23 +00:00
Ken Raeburn
0128cbae50 * Makefile.in (check): Add missing "else true" clause.
* emulparams/vax.sh (OUTPUT_FORMAT): Use "a.out".

* scripttempl/go32coff.sc: Changes from DJ Delorie: Change default entry point
to "start".  Align at end of each section to 0x200.  Start .text section 0x1000
later.  Add _etext, _edata, _end symbols.
1994-11-04 00:39:49 +00:00
J.T. Conklin
e574ddd43a * Makefile.in (ALL_EMULATIONS): Added em68knbsd.o.
(em68knbsd.c): New target.

* config/m68k-nbsd.mt: New file.
* emulparams/m68knbsd.sh: New file.
* configure.in (m68*-*-netbsd*): Use above configs.
1994-11-01 18:33:35 +00:00
J.T. Conklin
32286e08a5 * Makefile.in (ALL_EMULATIONS): Added ei386nbsd.o, ens32knbsd.o
and esparcnbsd.o; sorted entries.
  (ei386nbsd.c,ens32knbsd.c,esparcnbsd.c): New targets.

* config/netbsd532.mt: Removed.
* emulparams/netbsd532.sh: Removed.

* config/{i386-nbsd.mt,ns32k-nbsd.mt,sparc-nbsd.mt}: New files.
* emulparams/{i386nbsd.sh,ns32knbsd.sh,sparcnbsd.sh}: New files.
* configure.in (i[345]86-*-netbsd*, ns32k-pc532-netbsd*,
  sparc*-*-netbsd*): Use above configs.
1994-10-26 21:02:02 +00:00
Ian Lance Taylor
5ccef1803e * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o.
(eelf32mipl.c): New target.
1994-09-20 19:07:36 +00:00
Ian Lance Taylor
dd37f21531 * emulparams/elf32mipb.sh (TEMPLATE_NAME): Define as elf32.
(GENERATE_SHLIB_SCRIPT): Define as yes.
	(DYNAMIC_LINK): Define as false.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse):
	Initialize config.dynamic_link to DYNAMIC_LINK if it is defined.
	(gld${EMULATION_NAME}_place_orphan): Reset stat_ptr at end.
	* Makefile.in (eelf32mipb.c): Depend upon elf32.em rather than
	generic.em.
1994-09-10 20:04:17 +00:00
Ken Raeburn
cdf7137776 ns32k port from Ian Dall 1994-07-14 19:20:53 +00:00
Bill Cox
64bb143c6b * Makefile.in (check): Delete ld.new dependency so that a regression
test doesn't trigger a rebuild of the linker.
1994-06-09 13:54:28 +00:00
Ian Lance Taylor
fb5b11ee01 Rebuilt dependencies. 1994-06-03 00:09:21 +00:00
Ian Lance Taylor
f7e66391df Use SunOS shared libraries on a Sun 3. 1994-06-02 23:55:50 +00:00
Ian Lance Taylor
ed601bea1c 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.
	* Makefile.in (esun4.c): Depend upon sunos.em, not generic.em.
1994-06-02 22:01:53 +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
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
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
083038a72a * Makefile.in (mostlyclean): Remove cdtest.tmp, cdtest-ur,
cdtest-ur.out, and cdtest-ur.tmp.
1994-05-04 16:00:30 +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
1e45c4c38e * Makefile.in (clean, distclean): Remove configdoc.texi. 1994-04-21 21:25:17 +00:00
Bill Cox
099c286e74 * Makefile.in (check): Set TCL_LIBRARY for runtest. 1994-04-11 23:17:18 +00:00
Ian Lance Taylor
4725fb48f5 * ldgram.y (dirlist_ptr): Removed; not used.
* lexsup.c: Include ldver.h.
	* Makefile.in: Rebuilt dependencies.
1994-02-26 03:17:02 +00:00
Ian Lance Taylor
c361ce46c5 * configure.in (powerpc-*-elf*): New target; use ppc-elf32.
* config/ppc-elf32.mt: New file.
	* emulparams/elf32ppc.sh: New file.
	* emultempl/ppc.em: New file.
	* Makefile.in (ALL_EMULATIONS): Added em_elf32ppc.o.
	(em_elf32ppc.c): New target; uses elf32ppc.sh, ppc.em and elf.sc.
	(EMULATION_OFILES): Added dependencies on ldexp.h and ldlang.h.
1994-02-25 03:32:08 +00:00
David MacKenzie
d4e5e3c330 Use getopt instead of lex and yacc to parse the command line.
* ld.texinfo (Options): Document changes to option syntax.
	* Makefile.in: Update dependencies.
	* ldver.c (help): Tweak dashes in usage message.
	* ldgram.y (%union): Remove unused members.
	Remove %tokens for command line options; add ones for input types.
	(command_line): Rules removed.
	(file): Instead of command line, recognize an
	input type indicator, then use the nonterminal for that type.
	(defsym_expr): New nonterminal from code formerly in command_line.
	* ldlex.h: Declare parser input type enum and variable.
	Don't declare parse_line.
	* ldlex.l: Remove unused variables.  Make some used ones static
	and comment them.
	(COMMAND): Start state and its rules removed.
	At start of yylex, return input state token if at start of input.
	(lex_redirect): Don't need to set yyout.
	(ldlex_command): Function removed.
	* ldmain.c (main): Instead of calling parse_line, set up the
	redirections and call yyparse directly.
	* ldmisc.c (vfinfo): If there's no input filename, print nothing, not
	"command line".
	* lexsup.c: Remove #if 0'd code.
	(parse_line): Function removed.
	(parse_args): Rewrite to use getopt_long_only.
	(set_default_dirlist): New function from code formerly in
	ldgram.y:command_line.
	(set_section_start): New function.
	* emultempl/generic.em, emultempl/gld960.em, emultempl/hppaelf.em,
	emultempl/lnk960.em, emultempl/m88kbcs.em: Don't enclose
	compiled-in link scripts in "{" and "}", as the grammar no longer
	wants them to be.
1994-02-25 03:26:25 +00:00
Ken Raeburn
db0a7149be (install-info): Depend on ld.info, and use "$<*" so
it'll get picked up from $(srcdir) if appropriate.
1994-02-16 01:17:43 +00:00
David MacKenzie
0b2f8d2edd * ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions
deleted; will use libiberty versions instead.
	* ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c
	mri.c Makefile.in: Change callers.

	* ldmisc.c (vfinfo): Remove cleanup code.
	* ldmain.c (remove_output): Put it here (new function).
	(preserve_output): New function.
	(main): Register remove_output and preserve_output with atexit.
	* ldmain.c ldgram.y: Call xexit instead of exit.
	* ldmisc.h: Declare xexit.
1994-02-05 01:14:56 +00:00
Steve Chamberlain
9e0f78c8d7 * Makefile.in: Lots of new H8/500 memory models. 1994-02-04 23:19:33 +00:00
David MacKenzie
fb55f9b8ae * ldlex.l: Add rule to catch invalid input characters instead of
printing them.  Include "ldmain.h" for program_name decl.
	(lex_warn_invalid): New function.
	* Makefile.in: Add dependency.
1994-01-28 19:36:53 +00:00
Ken Raeburn
f3c6455fda * Makefile.in (check): Don't bother running any tests of
cross-linker until the test suite no longer assumes native mode.
1994-01-28 18:02:43 +00:00
Rob Savoye
03372cf4ab Change all occurances of RUNTEST_FLAGS to RUNTESTFLAGS to be consistant with
everything else. (and now work recursively too)
1994-01-26 21:44:50 +00:00
Stan Shebs
74e6b793b8 * Makefile.in: Format variable definitions consistently.
(LD_PROG): Remove unnecessary variables from link command,
	change variable LOADLIBES to EXTRALIBS.
1994-01-26 04:24:30 +00:00
Ian Lance Taylor
8a432746ae 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.
1994-01-14 20:43:07 +00:00
Ian Lance Taylor
4a6afc88bb A major rewrite to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
	files.
	* lderror.c, lderror.h, ldindr.c, ldindr.h, ldsym.c, ldsym.h,
	ldwarn.c, ldwarn.h, relax.c, relax.h: Removed.
	* ldctor.c, ldctor.h: Complete rewrite.
	* ldwrite.c, ldwrite.h: Complete rewrite.
	* ld.h (strip_symbols_type, strip_symbols): Removed.  Use
	link_info.strip instead.  Changed all uses.
	(discard_locals_type, discard_locals): Removed.  Use
	link_info.discard instead.  Changed all uses.
	(ld_config_type): Removed relocateable_output field; use
	link_info.relocateable instead; changed all uses.  Added stats
	field.
	(set_asymbol_chain, get_asymbol_chain, get_loader_symbol,
	set_loader_symbol): Removed.
	* ldexp.h (node_class): Added etree_rel.
	(etree_type): Added rel field.
	* ldexp.c (exp_print_token): Bracketed table initialization.
	(exp_relop): New function.
	(fold_name): Use linker hash table rather than ldsym functions.
	(exp_fold_tree): Likewise.  Also, handle etree_rel case.
	(exp_print_tree): Handle etree_rel.
	* ldgram.y (strip_symbols, discard_locals): Removed.
	(OPTION_stats, OPTION_no_keep_memory): New tokens.  Handle them.
	(REL): New token.  Does not appear in grammar, but needed for
	expression code.
	(file): Don't call lang_final; it's called by main anyhow.
	* ldlex.l: Accept -stats and -no-keep-memory options.
	* ldlang.h (fill_type): Make unsigned int, not unsigned short.
	* ldlang.c: Consistently use fill_type for fill argument.
	(lang_init_script_file, script_file): Removed.
	(create_object_symbols): Removed.  Use
	link_info.create_object_symbols_section instead.  Changed all
	uses.
	(lang_add_keepsyms_file): Removed.
	(lookup_name): Call bfd_link_add_symbols instead of
	ldmain_open_file_read_symbol.
	(wild): Don't iterate over script_file.
	(open_output): Create link hash table.
	(lang_place_undefineds): Rewrote.
	(lang_size_sections): Handle relaxing (doesn't work yet).
	(lang_relocate_globals): Removed.
	(lang_finish): Use link hash table rather than ldsym functions.
	(lang_common): Rewrote.
	(lang_one_common): New function.
	(ldlang_add_file): Add file to link_info.input_bfds list.  Set
	usrdata.
	(create_symbol): Removed.
	(lang_process): Don't call lang_init_script_file.  Call
	ldctor_build_sets rather than find_constructors.  Don't call
	lang_relocate_globals.
	(lang_abs_symbol_at_beginning_of): Rewrote.
	(lang_abs_symbol_at_end_of): Rewrote.
	* ldmain.c (had_y): Removed.
	(lprefix, lprefix_len): Removed; use link_info fields instead.
	Changed all uses.
	(multiple_def_count, commons_pending, undefined_global_sym_count,
	total_symbols_seen, total_files_seen): Removed.
	(link_callbacks, link_info): New variables.
	(main): Initialize link_info.  Don't call init_bfd_error_vector or
	ldsym_init.  Don't set now unused variables.  Handle -stats.
	(get_emulation): Removed obsolete and nonfunctional GNU960 code.
	(add_ysym): Rewrote.
	(read_entry_symbols, refize, enter_global_ref, enter_file_symbols,
	search_library, gnu960_check_format, decode_library_subfile,
	linear_library, symdef_library, clear_syms, subfile_wanted_p):
	Removed.
	(add_keepsyms_file, add_archive_element, multiple_definition,
	multiple_common, add_to_set, warning_callback, undefined_symbol,
	reloc_overflow, reloc_dangerous, unattached_reloc, notice_ysym):
	New functions.
	* ldmisc.c (vfinfo): Accept a string for %T, not a symbol.  Don't
	require symbols for %C; look them up instead.
	* emultempl/hppaosf.em: Pass link_info to
	hppa_look_for_stubs_in_section.
	* Makefile.in: Rebuilt dependencies.
	(CFILES): Removed lderror.c, ldindr.c, ldsym.c, ldwarn.c, and
	relax.c.
	(HFILES): Removed lderror.h, ldindr.h, ldsym.h, ldwarn.h, and
	relax.h.
	(EMULATION_OFILES): Depend on bfdlink.h, ldmain.h, ldexp.h,
	ldlang.h and ldctor.h.

	* Makefile.in (ldlex.c): Don't depend on ldgram.h.  Remove
	declarations of free and malloc from flex output.  Change malloc
	to ldmalloc in flex output.
1993-12-30 19:51:41 +00:00
Ken Raeburn
4ecfad7942 Fix up dependencies and rules for ld.dvi, ld.info. 1993-11-04 00:09:39 +00:00
Ken Raeburn
3c1af24dd5 * Makefile.in (distclean): Don't get rid of dvi or info files. 1993-11-03 23:09:24 +00:00
Stan Shebs
7b95fe96ef Sparc Lynx support 1993-10-29 02:39:07 +00:00
Ian Lance Taylor
d17eb3db0e * Makefile.in: Add dependency for $(EMULATION_OFILES). 1993-10-28 18:09:20 +00:00
Jeffrey Wheat
108f145ba4 Changed CXX back to g++. Using ../gcc/xgcc breaks because of <assert.h> 1993-09-10 16:53:33 +00:00
Jeffrey Wheat
8a6665aef8 Changed CXX back to g++. ../gcc/xgcc breaks the cdtest because of <assert.h> 1993-09-10 16:50:52 +00:00
Jeffrey Wheat
3a9149a7b7 Fixed RUNTEST* CXX CXXFLAGS macros and check rule. 1993-09-10 16:37:47 +00:00
David MacKenzie
cbb5c2d133 * Makefile.in (TAGS): Use shell wildcards. 1993-09-10 14:29:45 +00:00
Jeffrey Osier
959eba2070 * Makefile.in: add TEXINPUTS variable and use it in ld.dvi target 1993-09-08 01:08:26 +00:00
Jeffrey Wheat
d301e438b5 check targets reimplemented to old way. 1993-08-12 15:54:30 +00:00
David MacKenzie
a6152e399b The default script is now compiled in; the others are still in the filesystem. 1993-07-22 00:33:10 +00:00
Mark Eichin
077398b1bf change linux to use OTHER_EMULATIONS 1993-07-20 16:54:23 +00:00
Ken Raeburn
820c446cce Make emul-list.h depend on Makefile, so changes to EMULATION_OFILES get
reflected.
1993-07-20 16:38:49 +00:00
Ken Raeburn
0750b974c0 disable em_i386linux.o until emulparams/i386linux.sh is checked in 1993-07-20 16:31:47 +00:00
Mark Eichin
c4161ca8c2 more linux support bits 1993-07-19 15:00:19 +00:00
David Edelsohn
4ab3a31f9e Add h8/300h support. 1993-07-15 21:45:16 +00:00
Ian Lance Taylor
9edc5b2eca * Makefile.in (em_m88kbcs.c): Correct dependency.
(scripttempl/m88kbcs.sc): It's ARCH, not arch.
1993-07-15 17:57:26 +00:00