Commit Graph

132 Commits

Author SHA1 Message Date
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
David D. Zuhn e7569ec89f add a -I to the makeinfo command line 1993-07-13 03:01:22 +00:00
Ken Raeburn 58bf66f96e (ALL_EMULATIONS): Include $(OTHER_EMULATIONS) in case some target has stuff
to add.
1993-07-08 20:24:02 +00:00
Ian Lance Taylor e357065c7e * Makefile.in (install): Don't install as $(tooldir)/bin/gld;
collect2 doesn't look for gld any more anyhow.
1993-07-07 18:36:12 +00:00
David MacKenzie a04f1d001e Passing -L. is no longer necessary. 1993-07-03 02:23:22 +00:00
David MacKenzie ff76a7dbf3 Fix previous fix. 1993-07-03 02:18:12 +00:00
David MacKenzie 173a0c3d26 * ldmain.c (main): Don't add scriptdir to the lib search path.
* genscripts.sh: Put the scripts in the ldscripts directory, not
	emulations.
	* configure.in (ldscripts): Make, instead of emulations.
	* Makefile.in (scriptdir): Take off the "ld" part.
	(install, clean, distclean): Use ldscripts, not emulations.
	In tests, pass -L., not -Lemulations.
	(ldmain.o): Don't pass -DSCRIPTDIR=....
	* ldlang.c (lang_process): Add "ldscripts/" to the name of the
	default script file.
1993-07-03 02:01:03 +00:00
K. Richard Pixley 559d7baf89 * Makefile.in (ldgram.[hc]): rewrite this rule in such a way that gnu
make can run in parallel without colliding on yacc's static file
  names.
1993-06-30 22:48:51 +00:00
David D. Zuhn 5ebaf24b77 single-quote $program_transform_name 1993-06-18 19:25:38 +00:00
David D. Zuhn 9cd039e778 more install/program_transform_name fixes 1993-06-18 17:03:58 +00:00
Steve Chamberlain d360d135af Fix install. 1993-06-18 01:30:34 +00:00
David D. Zuhn e0d005f216 get install.sh canonicalized 1993-06-17 23:50:35 +00:00
David MacKenzie 565c93e92a * Makefile.in (.cc.o): Restore .SUFFIXES entry for .cc
and .cc.o rule.
1993-06-17 21:34:11 +00:00
David MacKenzie 8ddef5528d * ldfile.c (ldfile_open_command): Don't try .ld extension.
It wasn't documented (or likely used) and wastes time.
	(try_open): If EXTEN is empty, don't try it.

	* ldctor.c, lderror.c, ldexp.c, ldfile.c, ldindr.c, ldlang.c,
	ldlex.l, ldmain.c, ldmisc.c, ldsym.c, ldver.c, ldwarn.c,
	ldwrite.c, lexsup.c, mri.c, relax.c: Replace DEFUN macro calls
	with normal function declarations.

	* Move *.em to emultempl/*.em.  Move *.sh to emulparams/*.sh.
	Move *.sc-sh to scripttempl/*.sc.
	* {emultempl,emulparams,scripttempl}/README: New files.
	* sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
	removed, replaced with generic.em.
	* h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
	 h8[35]00hms.s[ch].  Change their contents to omit the "hms".

	* *.em (*_get_script): Return script name instead of script contents.
	* ldlang.c (lang_process): Change caller.

	* ldlex.l, ldgram.y: Recognize -m option.
	Check for input files after *all* options in grammar.
	* ldmain.c (main): Check for -m options.  Add default directory
	for -m.

	* mkscript.c: File removed.
	* genscripts.sh: Take two more parameters, tooldirlib and libdir,
	to add to the default LIB_PATH.
	Look for input files in the new subdirectories.
	Create the scripts in emulations subdirectory and don't filter
	them through mkscript.
	* configure.in: Make the emulations subdirectory.

	* Makefile.in: Account for all of the above changes.
	Remove unused .SUFFIXES.  Get libgcc.a path with gcc
	-print-libgcc-file-name instead of $(libdir)/libgcc.a.
	Put CFLAGS last in the compilation rules.
	Add -I../bfd to INCLUDES so sysdep.h is found.

	* ldfile.c (try_open): If opening without the extension fails,
	try with the extension even if -v or -V was given.
	had_script is imported (from ldgram.y), not exported.
1993-06-17 20:55:43 +00:00
Ken Raeburn f905eff404 look in ../include instead of ../bfd for bfd.h 1993-06-16 03:10:01 +00:00
David D. Zuhn c97b9003b0 remove parentdir support; use INSTALL_XFORM 1993-06-16 00:03:44 +00:00
David D. Zuhn 91b3a2b678 * Makefile.in: remove old C++ rules; remove install:all and
install-info:info dependencies (these cause some spurious rebuilds
	at 'make install' time)
1993-06-04 23:20:08 +00:00
Ian Lance Taylor 1053ea99cb Remove sh sanitization comments. 1993-06-04 20:01:31 +00:00
Ian Lance Taylor 98f3d1afa4 * configure.in (mips-idt-ecoffl*): New target; use mips-idtl.
(mips-idt-ecoff*): Added trailing '*'.
	* config/mips-idtl.mt: New file; use EMUL of mipsidtl.
	* mipsidtl.sh: New file; like mipsidt.sh, but little endian.
	* Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o.
1993-06-04 19:50:31 +00:00
Ian Lance Taylor 6354589838 * Makefile.in: configure looks for ####, so remove lines with many
'#' characters.
	* config/irix4.mh, config/i386v.mh: New files; set HOSTING_CRT0
	and HOSTING_LIBS correctly so that ``make check'' will work.
1993-05-25 22:37:41 +00:00
Ian Lance Taylor ef86818669 * mips.sc-sh: Put constructors in the .data section.
* Makefile.in (cdtest): Added dependency on ld.new.
1993-05-04 19:39:33 +00:00
Per Bothner 034351e334 * Makefile.in: Change definition of $(tooldir) to match FSF.
* vax.sh, config/vax.mt, configure.in, Makefile.in:
	Support VAX Ultrix and BSD.
1993-05-04 02:51:33 +00:00
Roland Pesch 2412a76837 ld.texinfo:
Conditionalize manual to maintain Cygnus, Hitachi versions in parallel.
(Texinfo conditionals are stable enough to permit this, at last!)
NOTE: @ignore'd passages from earlier versions DELETED; use CVS history
      to retrieve if wanted.

gen-doc.texi, h8-doc.texi: manual configuration definitions.

Makefile.in: link config defn (`gen' by default) to configdoc.texi, included
      by ld.texinfo

.Sanitize: add gen-doc.texi, h8-doc.texi
1993-03-30 23:25:03 +00:00
Ian Lance Taylor ce7d4b0d57 * mips.sc-sh: Added variables which may be overridden by a
specific emulation.
	* mipsidt.sh: New file; emulation for IDT MIPS board.
	* Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o.
	(em_mipsidt.c): New target.  Uses mipsidt.sh and mips.sc-sh.
	* config/mips-idt.mt: New file; sets EMUL to mipsidt.
	* configure.in (mips-idt-ecoff): New target; uses mips-idt.
1993-03-04 20:49:26 +00:00
Ken Raeburn e637dcf08b mips-bsd and 386bsd support 1993-02-28 14:46:25 +00:00
Ian Lance Taylor af6237a4a8 Thu Jan 28 15:12:04 1993 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (install): Remove $(tooldir)/bin/gld before creating
	the link to it.
1993-01-28 23:13:32 +00:00
Ian Lance Taylor 42b5c73927 Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.sc-sh: New file.  Ultrix, and hopefully other MIPS ECOFF
	targets, linker script.
	* mipslit.sh: New file.  Little endian MIPS emulation.
	* config/mips-lit.mt: New file.  Use mipslit emulation.
	* configure.in (mips-dec-ultrix*): Use target mips-lit.
	* Makefile.in (ALL_EMULATIONS): Added em_mipslit.o.
	(em_mipslit.c): New target.  Uses mipslit.sh.
1993-01-22 22:30:52 +00:00
Steve Chamberlain 22a78f0d96 Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Added initial support for the z8k
	* z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files
	* configure.in, Makefile.in: modified to reflect above

	* ldlang.c (lang_check): when linking conflicting architectures,
	make the output file reflect at least one of the bad inputs.
1992-09-25 18:11:04 +00:00
Ian Lance Taylor 5640944588 Tue Sep 15 15:35:38 1992 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (install): if $(tooldir) exists, install ld in
	$(tooldir)/bin.
1992-09-15 23:30:30 +00:00
Steve Chamberlain 99e6298ae3 Support for i386-coff 1992-09-11 17:25:43 +00:00
Ian Lance Taylor ab57b17418 Brought in from p3. If anybody knows good numbers for m68k COFF,
please let me know, or plug them in yourself.

Wed Sep  9 11:52:58 1992  Ian Lance Taylor  (ian@cygnus.com)

	* Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt:
	added m68k-coff emulation mode, stolen from a29k emulation.
	Almost certainly wrong, but perhaps better than sun3.

Also fixed an error message in configure.in so that it started with
'***' like the other error messages do.
1992-09-09 18:59:11 +00:00
David D. Zuhn 2df681368b new configure triple work, added solaris 2 & irix host support, fix FLEX definition 1992-09-02 00:49:47 +00:00