Commit graph

174 commits

Author SHA1 Message Date
Ian Lance Taylor
5276e361db * config/obj-ecoff.c (ecoff_frob_file): Discard all open scopes,
with a warning.
1993-07-15 22:01:27 +00:00
Ian Lance Taylor
2368ec638a * config/obj-coffbfd.c (fixup_segment): If TC_M88K, don't adjust
by md_pcrel_from if we are relocating against a symbol (we still
	need md_pcrel_from for a PC relative relocation within the same
	file).
	* config/tc-m88k.c (md_pcrel_from): Corrected return value.
1993-07-15 20:23:43 +00:00
Ian Lance Taylor
c978e704a9 * Preliminary support for m88k-coff.
* configure.in (m88k-*-coff*): New target.  Use coffbfd and
	m88kcoff.
	* config/m88kcoff.mt: New file.
	* read.c (lex_type): New macro LEX_AT to set lex type of '@'.
	(pseudo_set): Handle difference of symbols in different fragments
	by saving the entire expression as the value of the symbol.
	* symbols.c (resolve_symbol_value): Resolve difference
	expressions.
	* config/obj-coffbfd.c (obj_pseudo_table): If TC_M88K, accept
	"sdef" as a synonym for "def".
	* config/obj-coffbfd.h: If TC_M88K, include coff/m88k.h and set
	TARGET_FORMAT.
	(S_IS_LOCAL): Any symbol which includes \001 in the name is local.
	* config/tc-m88k.c, config/tc-m88k.h: Numerous changes to bring
	m88k port up to date, and to add COFF support.
1993-07-15 16:02:21 +00:00
Ian Lance Taylor
5868b1fe68 * Removed sy_forward and replaced it with an undefined expression
as the value of a symbol.
	* struc-symbol.h (struct symbol): Removed sy_forward field.  Added
	sy_resolved and sy_resolving single bit fields.
	* symbols.c (symbol_new): Don't initialize sy_forward field.
	(resolve_symbol_value): New function to adjust symbol value by
	fragment address, using recursion to resolve forward symbols.
	* symbols.h: Added prototype for new function.
	* read.c (pseudo_set): Set symbolP->sy_value to an undefined
	expression rather than setting symbolP->sy_forward.
	* write.c (write_object_file): Use resolve_symbol_value on
	symbols, keeping the common case (the old behaviour) inline.
	* config/obj-aout.c (obj_aout_frob_symbol): Removed sy_forward
	handling (subsumed by write.c change).
	* config/obj-coff.c, config/obj-coffbfd.c (obj_coff_val): Set
	sy_value rather than sy_forward.
	* config/obj-coffbfd.c (obj_coff_endef, yank_symbols): Check
	expression segment rather than sy_forward.
	(yank_symbols): Use resolve_symbol_value.
	(crawl_symbols): Removed extra pass over symbols.
	* config/obj-aout.c, config/obj-bout.c, config/obj-coff.c,
	config/obj-vms.c (obj_crawl_symbol_chain): Removed extra pass over
	symbols which handled sy_forward; use resolve_symbol_value
	instead.
	* config/obj-coff.h, config/obj-coffbfd.h (obj_frob_forward_symbol):
	Define.
	* config/obj-elf.c (obj_elf_stab_generic): Check expression
	segment rather than sy_forward.
	* config/obj-vms.c (VMS_Check_For_Main): Don't initialize
	sy_forward; do initialize sy_resolved and sy_resolving.
	* config/tc-hppa.h (STAB_FIXUP): Use sy_value, not sy_forward.
1993-07-14 22:21:25 +00:00
Ian Lance Taylor
85051959f4 * Changes to keep a full expression as the value of a symbol, not
just a longword:
	* struc-symbol.h: New field sy_value.
	* as.h: Include expr.h before struc-symbol.h.
	* expr.h: Use struct symbol rather than symbolS.
	* symbols.c (S_GET_VALUE, S_SET_VALUE): Rewrote to retrieve value
	of sy_value field; compile unconditionally, not just if
	BFD_ASSEMBLER.
	* symbols.h: Compile S_{SG}ET_VALUE prototypes unconditionally.
	* write.c (write_object_file): Set BFD symbol value to gas symbol
	value.
	* config/obj-aout.h, config/obj-bout.h, config/obj-coff.h,
	config/obj-coffbfd.h, config/obj-generic.h, config/obj-vms.h
	(S_GET_VALUE, S_SET_VALUE): Removed macro definitions.
	* config/obj-ieee.c (S_GET_VALUE, S_SET_VALUE): Removed.
	* config/obj-coff.h, obj-coffbfd.h: Rewrote several macros to use
	S_GET_VALUE rather than ost_entry.n_value.
	* config/obj-aout.c (obj_symbol_to_chars), config/obj-bout.c
	(obj_symbol_to_chars), config/obj-coff.c (obj_symbol_to_chars),
	config/obj-coffbfd.c (symbol_to_chars): Get value to write out
	using S_GET_VALUE--don't assume it is already set.
	* config/obj-ieee.c (do_symbols): Set BFD symbol value to gas
	symbol value.
	* config/obj-vms.c (various): Don't assign directly to
	S_GET_VALUE; use S_SET_VALUE instead.
1993-07-14 19:35:45 +00:00
David Edelsohn
b50401c93c * configure.in: Recognize h8300h. 1993-07-14 16:37:27 +00:00
Steve Chamberlain
489a93f3c3 * config/tc-h8500.c (line_comment_chars): Add hash.
(parse_exp, skip_colonthing, build_bytes): Add support for
	R_H8500_HIGH16 relocation type.
1993-07-13 19:12:10 +00:00
Ken Raeburn
5d4ef2968b config/obj-elf.c (obj_elf_section): Allow `@' to introduce an attribute name.
Handle `execinstr' attribute.
1993-07-12 15:17:10 +00:00
Ian Lance Taylor
99c24539c5 * config/tc-mips.c (mips_ip): Don't warn on 'i' or 'j' mismatch if
there is another alternative for the instruction.
1993-07-12 14:24:20 +00:00
Roland Pesch
ec1c752b34 doc/as.texinfo 1993-07-10 00:32:18 +00:00
Ken Raeburn
b25654337a Oops, not all of the tc-sparc.c change was format-independent.
Still handles both syntaxes independent of format.
1993-07-08 19:09:19 +00:00
Mark Eichin
d358969d94 changelog for tc-i960 change 1993-07-08 18:50:43 +00:00
Ken Raeburn
ff4cac3854 config/tc-sparc.c (s_common): Revamp to handle both syntaxes, and not be
target-specific.
1993-07-08 18:40:50 +00:00
David Edelsohn
422069965b config/tc-h8300.h (TC_CONS_RELOC): Use R_RELLONG if h8/300h. 1993-07-08 14:26:17 +00:00
David D. Zuhn
e9baeb4606 define CROSS is cross compilation 1993-07-08 02:55:22 +00:00
Ian Lance Taylor
e154ecf4ab * symbols.c (fb_label_instance, fb_label_instance_inc): Don't dump
core just because somebody uses a label before it is defined.
1993-07-07 20:07:12 +00:00
Ian Lance Taylor
76c64db09f Various entries. 1993-07-07 17:22:56 +00:00
Ken Raeburn
e28e0b95ed Typedef changes. V9 work. 1993-07-07 17:16:02 +00:00
Ian Lance Taylor
267389df6d * read.c (cons): Conditionalize parsing of expression. Move
putting value into object file into separate function.  Separate
	out MRI and WANT_BITFIELDS cases into separate functions.
	(emit_expr): New function to write data into object file.
	Conditionalize on TC_CONS_FIX_NEW and TC_CONS_RELOC rather than on
	processor types.
	(parse_bitfield_cons): New function to parse bitfield expressions
	as used by i960 assemblers.  Only compiled if
	BITFIELD_CONS_EXPRESSIONS is defined.
	(parse_mri_cons): New function to parse MRI style strings.  Only
	compiled if MRI is defined.
	(parse_repeat_cons): New function to parse repeat counts.  Only
	compiled if REPEAT_CONS_EXPRESSIONS is defined.
	* read.h (emit_expr): Added declaration of new function.
	* config/tc-a29k.h (TC_CONS_RELOC): Define to be RELOC_32.
	* config/tc-h8300.h (TC_CONS_RELOC): Define to be R_RELWORD.
	* config/tc-hppa.c (parse_cons_expression_hppa): New function to
	parse a HPPA expression, rather than special case in cons
	function.
	(cons_fix_new_hppa): New function to emit an HPPA fixup, rather
	than special case in emit_expr function.
	* config/tc-hppa.h (TC_PARSE_CONS_EXPRESSION, TC_CONS_FIX_NEW):
	Define to use new functions from tc-hppa.c.
	* config/tc-i960.h (BITFIELD_CONS_EXPRESSIONS): Define.
	(WANT_BITFIELDS): Removed; now obsolete.
	* config/tc-mips.h (REPEAT_CONS_EXPRESSIONS): Define.
	* config/tc-ns32k.c (cons_fix_new_ns32k): New function to emit an
	NS32K fixup, rather than special case in emit_expr function.
	* config/tc-ns32k.h (TC_CONS_FIX_NEW): Define to be
	cons_fix_new_ns32k.  Also use PARAMS rather than checking
	__STDC__.
	* config/tc-sparc.h (TC_CONS_RELOC): Define to RELOC_32.

	* write.c (relax_and_size_seg, adjust_reloc_syms, write_contents):
	Don't core dump if gas has no information about a section.
1993-06-30 18:27:41 +00:00
David D. Zuhn
a828550492 fix HPUX hosting problems 1993-06-29 17:22:03 +00:00
David D. Zuhn
9126738c04 canonicalize install.sh location 1993-06-17 23:56:08 +00:00
Steve Chamberlain
115147fbb0 * config/obj-coffbfd.c (fill_section): Don't allow fills backwards.
* config/tc-sh (get_specific, md_convert_frag,
	md_estimate_size_before_relax): Add support for rest of opcodes.
1993-06-17 21:58:28 +00:00
David D. Zuhn
a00ee52267 remove parentdir support 1993-06-16 01:00:29 +00:00
Ian Lance Taylor
47fcc4f54a * configure.in (mips-*-ecoffl*): New target; use ecoff and
mips-lit.
	(mips-*-ecoff*): Added trailing '*'.
1993-06-04 19:39:20 +00:00
Ian Lance Taylor
68ad4c9269 * config/obj-ecoff.c (ecoff_build_procs): Force the adr of the
first FDR in a file to be zero.
1993-06-04 14:53:02 +00:00
Ken Raeburn
b7067d7f8a bump version number 1993-06-03 21:29:15 +00:00
Ken Raeburn
7577669525 today's changes 1993-06-03 20:39:20 +00:00
Ken Raeburn
49864cfa6c read.c (s_align_bytes): Properly record alignment.
expr.c (__): Undefine before defining.
as.c (got_sig): Don't return anything; return type might be void.
Whitespace/comment cleanup in frags.c.
Some patches for `-pedantic' or `-fno-common' compilation.
(Some of these changes are from Michael Meissner; see change log.)
1993-05-27 19:42:23 +00:00
Ian Lance Taylor
9a7d824a26 * app.c (do_scrub_begin): Let line_comment_chars override
comment_chars.
	(do_scrub_next_char): If a line comment character is not at the
	start of a line, treat it as a comment character if it is one.
	For a CPP line comment use pseudo-op .appline rather than .line.
	* input-scrub.c (logical_input_line): Make int rather than
	unsigned.
	(input_scrub_push, input_scrub_begin): Initialize
	logical_input_line to -1 rather than 0.
	(bump_line_counters): Increment logical_input_line.
	(new_logical_line): If line_number is -2, decrement
	logical_input_line.
	(as_where): Use logical_input_line even if it is 0.
	* read.h (s_app_file prototype): Now takes an int argument.
	* read.c (potable): Make .appfile call s_app_file with 1.  New
	.appline pseudo-op calls s_app_line.
	(s_app_file): If .appfile, call new_logical_line with -2 to
	account for newline inserted by do_scrub_next_char.  If listing,
	call listing_source_file.
	(s_app_line): New function to handle fake pseudo-op .appline.
	* config/obj-coff.c (obj_pseudo_table): Make .appline call
	obj_coff_ln.
	(obj_coff_ln): Added argument to indicate whether .appline.
	* config/obj-coffbfd.c (obj_pseudo_table): Make .appline call
	obj_coff_ln.
	(obj_coff_ln): Added argument to indicate whether .appline.
	* config/tc-mips.c (s_file): Pass argument to s_app_file.
1993-05-27 19:29:38 +00:00
Ian Lance Taylor
61f14fb0da * config/obj-bout.h (S_GET_VALUE): Removed unnecessary cast. 1993-05-25 19:16:16 +00:00
Steve Chamberlain
6eef4543ca * config/tc-h5000.c (build_bytes): Understand @rd mode and build
relocations correctly.
1993-05-19 14:44:12 +00:00
Ken Raeburn
f8f6147851 updated 1993-05-17 19:25:48 +00:00
Ian Lance Taylor
204ff785f8 Fix stuff broken when sh support was checked in.
* tc.h (TC_COFF_SIZEMACHDEP): Don't define here.
	* config/tc-sh.h (TC_COFF_SIZEMACHDEP): Define here instead.
1993-05-13 14:52:59 +00:00
Ken Raeburn
65824763af configure.in: treat m68*-*-sysv* target like m68k-*-coff 1993-05-10 19:05:04 +00:00
Ian Lance Taylor
21bb48b9b9 * config/tc-mips.c (macro): Correct floating point double word
loads and stores for big endian target.
1993-05-05 21:02:11 +00:00
Ken Raeburn
e7c2f9431c lots o' changes 1993-05-05 20:51:35 +00:00
Ian Lance Taylor
5d6cfa60ae * config/obj-ecoff.c (init_file): Set fMerge to 0 since dbx seems
to want it that way.
	(ecoff_build_symbols): Turn local st_Proc symbols into
	st_StaticProc symbols.  Set index field of external st_Proc and
	st_staticProc symbols correctly.
	* config/tc-mips.h (NO_LISTING): Don't define.  People might want
	listings.
1993-05-05 20:18:38 +00:00
Ian Lance Taylor
a13872602a * config/obj-ecoff.c (obj_symbol_new_hook): Make up a .file if one
hasn't been seen yet.
	(add_ecoff_symbol): Don't refer to cur_file_ptr if it is NULL.
1993-04-28 20:44:05 +00:00
Steve Chamberlain
4a1bbbe75b Support for Hitachi SH 1993-04-27 01:32:09 +00:00
Ian Lance Taylor
be2f6bd65b * expr.c (operand): Fix unary plus operator (previously was the
same as '~' operator!).
1993-04-26 19:29:58 +00:00
Roland Pesch
97a6070c83 as.texinfo, Makefile.in 1993-04-15 23:27:39 +00:00
Ian Lance Taylor
55ff56bdb2 Fix typo. 1993-04-09 16:10:30 +00:00
Ian Lance Taylor
349f20de4e * config/obj-ecoff.h (ecoff_build_lineno): Make ilineMax in
symbolic header match cline in FDR; the native liinker seems to
	want that.
1993-04-09 16:08:29 +00:00
David D. Zuhn
5316696f0d as.texinfo lives in $(srcdir) 1993-04-08 22:53:01 +00:00
Roland Pesch
8ac18b21c3 doc/Makefile.in 1993-04-08 22:17:13 +00:00
Ian Lance Taylor
d565311f22 * config/ho-decstatn.h: Define BROKEN_ASSERT if not __GNUC__,
rather than undefining know.
1993-04-08 19:55:44 +00:00
Roland Pesch
0742a6fded Record abolition of last m4 conditional markup holdout manual. 1993-04-08 03:20:44 +00:00
Ian Lance Taylor
84e4920fc1 * config/tc-mips.c (gp_reference): Certain magic symbols can never
be referenced off the GP register.
1993-04-06 00:56:53 +00:00
Ian Lance Taylor
367fc8358a * app.c (do_scrub_next_char): Handle states 9 and 10 correctly
when dealing with characters of type LEX_IS_TWOCHAR_COMMENT_1ST,
	LEX_IS_STRINGQUOTE, and LEX_IS_ONECHAR_QUOTE.
1993-04-05 19:02:20 +00:00
Steve Chamberlain
dd4227d392 *** empty log message *** 1993-04-04 22:23:12 +00:00