Commit Graph

13 Commits

Author SHA1 Message Date
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
Steve Chamberlain 29f33467f2 Tue Mar 30 09:40:25 1993 Steve Chamberlain (sac@thepub.cygnus.com)
* ldindr.c (add_indirect): Keep more information in the alias
	symbol chain.
	* ldlang.c (wild_doit):  Don't inherit NEVER_LOAD section
	attribute from an input section.
	* ldmain.c (Q_enter_file_symbols): Common section is NEVER_LOAD by
	default. (Q_enter_file_symbos): Indirect symbols now are known by
	their section, not a special symbol flag.
	* ldsym.c (write_file_locals): Indirect symbols aren't local.
	(write_file_globals): Write the mapping for an indirect symbol.
	* relax.c (build_it): When forced to write a NEVER_LOAD section,
	fill it with zeros.
1993-03-30 17:49:00 +00:00
Steve Chamberlain 25de6a20dd * ldgram.y: allow section types without address expressions.
* ldlang.c (lang_relocate_globals): avoid possible hang with
	undefined but unreferenced symbols.
	* relax.c (relax_section): don't complain if the script file isn't
	relaxable but -relax is set
1993-02-12 16:12:28 +00:00
Ian Lance Taylor ac496d4f7e Mon Jan 11 18:50:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* ldwrite.c: Removed perform_relocation, copy_and_relocate, and
	write_norel.  All linking is now done via write_relax.  Call
	ldsym_write before calling write_relax.
	* relax.c: Added copyright.
	(write_relax): Renamed from write_relaxnorel.  Added relocateable
	argument.  seclet_dump renamed to bfd_seclet_link.
	* relax.h: Added copyright.
1993-01-12 00:47:20 +00:00
Steve Chamberlain 85c838d613 * relax.c (build_it): re-enable the processing of data_statements
in scripts, makes counted contructor lists work again.
1992-11-05 19:35:38 +00:00
Steve Chamberlain cd1d8c6d89 * ldlang.c (lang_process): don't pass null pointers when
abs_output_section is what is required.
	* ldwrite.c (ldwrite): use malloc to allocate the largest space
	used, and pass that down.
	* relax.c,relax.h (write_relaxnorel): use the passed malloc area rather
	than alloca.
1992-08-27 00:32:05 +00:00
Steve Chamberlain 67cddd9faf * ldlang.c (lang_map): print changes in sizes due to relaxing
(size_input_section): maintain the delta information.
	* ldlang.h: add new field to struct to contain delta info.
	* relax.c  (relax_section): complain if input not relaxable.
	* ldlex.l : add '_', ',' and '$' to chars which can appear at the
	start of a filename
1992-07-14 15:39:31 +00:00
Steve Chamberlain 9c99a57eca * relax.c (build_it): don't allocate space in the output file for
stuff if -R flag applys to it.
1992-05-06 00:49:18 +00:00
Steve Chamberlain 0d3e45eab0 * relax.c: added handling for new "padding" seclet type, used to
fill out gaps between section.
	* ldgram.y, ldlex.l: now -defsym on the command line is done
	properly.
1992-04-17 15:59:37 +00:00
Steve Chamberlain 9aa97a39fe Lint removal, extra prototypes.
Recopied cplus-dem from gdb, makes more things come out right.
1992-03-07 18:31:24 +00:00
Michael Tiemann 58216160ef Work around for problems in linking C++ programs that need file-level
initialization.  Now C++ programs can be linked.
1992-02-02 21:12:25 +00:00
Steve Chamberlain 870f54b2c8 * ldgram.y: map -M behave in the same way as -Map (sets file name
to be "-".
	* ldsym.c, ldlang.c: remember that size of a section is dependent on
	whether or not relaxing has been done.
	* ldmain.c: don't open a map file if it doesn't have a name
	* relax.c: all the brains have moved into bfd.
	* ldwrite.c: ammend comment
1992-01-28 18:21:36 +00:00
Steve Chamberlain 2e2bf962db * Makefile.in: added relax, also made three stage go through a
partial link stage.
	* relax.c : added
	* config.h: if GNU960 defined, then default emulation mode is
	GLD960
	* ldexp.h, ldexp.c: map to file hooks
	* ldlang.c: map to file hooks
	* ldgram.y: added -Map -relax
	* ldlex.l: added -relax, -Map
	* ldmain.c: open map file
	* ldmisc.c: support for map file
	* ldwrite.c: new relax magic
1992-01-24 22:34:34 +00:00