Commit Graph

32 Commits

Author SHA1 Message Date
Ian Lance Taylor fe619ced4a * ldgram.y (OPTION_Lfile): New token.
(command_line_option): Accept OPTION_L NAME (whitespace after -L).
	* ldlex.l (<COMMAND>): Accept -L without FILENAME.
1993-07-16 21:15:40 +00:00
David MacKenzie bbd2521f26 source cleanups; fix finding scripts 1993-07-15 21:43:28 +00:00
David MacKenzie de87cdb466 * Make -v only print the version number.
Share some Texinfo documentation with BFD.
1993-07-08 18:00:11 +00:00
David MacKenzie 2de8edce8f * ldgram.y: Tweak grammar to make reporting of invalid options work. 1993-06-17 22:55:38 +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
Steve Chamberlain 9fce28edd5 Support for linking and loading at different places:
* ldlex.l: Add "AT" keyword.
	* ldgram.y: Cleanup, and parse AT.
	* ldlang.c (print_output_section_statement): Print output address
	of section in map. (lang_size_sections): Fill sections' lma with
	load address.
	* ldlang.h (lang_output_section_statement_type): Add load_base
	information.
1993-03-30 22:45:39 +00:00
Steve Chamberlain dadd414a89 Fix support for NOLOAD, add INCLUDE
* ldfile.c (ldfile_open_command_file): pass file name to
	lex_push_file.
	* ldlex.l, ldgram.y: tidy up, parse INCLUDE and NOLOAD
	* ldlang.c (wild_doit): make output sections inherit NEVER_LOAD
	attribute.
1993-01-08 22:42:42 +00:00
Steve Chamberlain ae475b39b2 * ldlang.h: add new field "loadable" to output_section_statement.
* ldlang.c (lang_output_section_statement_lookup): initilize new
	field. (wild_doit): if new field is not set, then stop output
	section from being loadable.
	(lang_enter_output_section_statement): set the field from the
	NOLOAD keyword
	* ldgram.y: new synax for NOLOAD. Removes a shift/reduce too.
	* h8300hms.sc-sh, h8300hms.em: get -r right.
1992-08-07 19:34:59 +00:00
Steve Chamberlain e14a43bfaf * ldgram.y, ldlex.c, mri.c: added more compatible words; BASE, ALIAS and
PUBLIC.
	* Makefile.in: now use flex, not lex
1992-05-02 01:35:12 +00:00
Steve Chamberlain 2e38b71d27 Strange link script support 1992-04-15 23:11:09 +00:00
Steve Chamberlain 3d2b83ea49 Personal checkpoint - now should parse some MRI stuff 1992-04-15 22:23:33 +00:00
Steve Chamberlain 9d1fe8a410 New lexer.
New targets for h8/300 simulator and DOS
1992-04-05 01:47:16 +00:00
Steve Chamberlain 76971f0da2 Modifed to care about semi colons again, newlines are ignored - sorry
Per.
1992-03-02 22:22:59 +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
Steve Chamberlain c611e285bd Merging from VMS port. Doc to follow.. 1992-01-24 18:41:32 +00:00
John Gilmore f177a611f1 Include bfd.h before sysdep.h, so ansidecl and PROTO() get defined first. 1991-10-11 11:28:27 +00:00
Steve Chamberlain 7cb9aa509c *** empty log message *** 1991-05-18 03:08:59 +00:00
Steve Chamberlain 6812f0e89f Fixed the shift reduce errors in the grammer using the yacc debugger.
Removed some lint highlighted by the same.
1991-05-07 19:16:33 +00:00
Steve Chamberlain b63165349f *** empty log message *** 1991-05-03 23:52:48 +00:00
Steve Chamberlain 65c552e308 Added the sizeof_headers keyword. 1991-04-24 20:53:36 +00:00
Steve Chamberlain a37cc0c05c *** empty log message *** 1991-04-23 15:59:24 +00:00
Steve Chamberlain 1d45ccb383 Yet more diffs due to my incompetence. 1991-04-19 00:59:53 +00:00
Steve Chamberlain ac00487023 Fixed some bugs. 1991-04-18 00:06:26 +00:00
Steve Chamberlain d646b568d0 Moved declarations from header file into here. 1991-04-17 02:03:34 +00:00
Steve Chamberlain 13a0e8d7fc Added support for OUTPUT_FORMAT(name) and FORCE_COMMON_ALLOCATION 1991-04-17 00:49:44 +00:00
Steve Chamberlain 070aa81923 *** empty log message *** 1991-04-16 14:32:02 +00:00
Steve Chamberlain 1418c83b39 checkpoint before a merge 1991-04-14 03:22:42 +00:00
Steve Chamberlain 03466f17b7 *** empty log message *** 1991-04-09 23:25:49 +00:00
Steve Chamberlain de7c1ff613 *** empty log message *** 1991-04-08 23:26:05 +00:00
Steve Chamberlain 7ca04d280d Fixed some grammer ambiguities
Better error reporting
sun3 support
1991-04-03 22:03:55 +00:00
David Henkel-Wallace 2fa0b342a5 Initial revision 1991-03-21 21:29:06 +00:00