Commit graph

255 commits

Author SHA1 Message Date
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
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
Ken Raeburn
cbcf557273 include string.h 1993-04-05 18:00:40 +00:00
Ian Lance Taylor
d5bc321563 * config/te-irix.h: New file; irix needs a different LOCAL_LABEL
definition from other MIPS targets.
	* configure.in (mips-*-irix): Use emulation irix.
1993-04-05 16:44:21 +00:00
Steve Chamberlain
3adb6ca918 * config/tc-h8500.c: Get relax size of branch instructions right,
(get_operand): Parse @sp+ correctly.
1993-04-04 22:23:24 +00:00
Ian Lance Taylor
c209295fa5 Include ho-generic.h. 1993-04-02 18:42:37 +00:00
Ian Lance Taylor
ed364bb694 * config/ho-irix.h: New file; if not gcc, define BROKEN_ASSERT.
* configure.in (mips-sgi-irix*): Set gas_host to irix.
1993-04-02 16:57:17 +00:00
Ian Lance Taylor
670a50ebf6 * subsegs.c (subseg_new): Set output_section of new section.
* as.c (perform_an_assemly_pass): Don't set output_section here.
	* expr.c (expr_part, expr): Turn off section assertions for ECOFF,
	since it has additional sections.
	* read.c (s_lcomm): For MIPS ECOFF, put small objects in .sbss,
	not bss_section.
	* config/obj-ecoff.h (TARGET_SYMBOL_FIELDS): Added
	ecoff_undefined field.
	* config/obj-ecoff.c (obj_symbol_new_hook): Initialize
	ecoff_undefined field.
	(add_file): If using stabs, just output a stabs symbol rather than
	creating a new fdr.
	(obj_ecoff_begin, obj_ecoff_bend): Ignore line number by reading
	it with get_absolute_expression, rather than skipping it by hand.
	(obj_ecoff_loc): If using stabs, just output a stabs symbol rather
	than ECOFF line number information.
	(obj_ecoff_stab): Accept non-zero values for stabs line number.
	(ecoff_build_symbols): Set ifilesym correctly.  Set storage class
	to small, undefined and/or readonly sections if appropriate.
	Don't output symbol names containing \001 characters.
	(ecoff_frob_file): Make sure at least one fdr is output.
	* config/tc-mips.h: Define TC_MIPS.
	* config/tc-mips.c (g_switch_value): New static variable.
	(md_assemble): Set gp size of output BFD.
	(gp_reference): New function; returns 1 if expression can be
	accesssed via gp.  Always returns 0 if not using ECOFF.
	(macro_build): Convert BFD_RELOC_LO16 to BFD_RELOC_MIPS_GPREL if
	possible.
	(macro): Generate sequences using gp if possible.
	(md_parse_option): Ignore -EL and -EB.  Parse -G.
	(md_apply_fix): Added BFD_RELOC_MIPS_GPREL to ignored case.
	(s_change_sec): Handle .rdata and .sdata for ECOFF.
	(s_extern): Mark symbol as external.  Set ecoff_undefined field.
1993-04-01 02:14:29 +00:00
Ken Raeburn
c0f1bbb6d0 build file symbol fwd pointers properly, don't deref symbol #s as pointers 1993-03-30 15:22:27 +00:00
Steve Chamberlain
e02eaa5943 * config/obj-coffbfd.c (do_relocs_for): Fix bug where nrelocs
wasn't being stored into scnhdr.
	* config/obj-coffbfd.h: Add prototype of s_get_segment.
	* read.c (TC_START_LABEL): Default definition.
	(read_a_source_file): Use TC_START_LABEL macro to work out
	if a label has been seen.
1993-03-29 21:56:49 +00:00
Steve Chamberlain
10a3e37493 Numerous bug fixes 1993-03-29 21:45:50 +00:00
Ian Lance Taylor
543d88e4fd * config/obj-coffbfd.c (fill_section): Don't set NOLOAD bit for
a29k .bss section; the mondfe program doesn't like it.
1993-03-29 20:58:34 +00:00
Ian Lance Taylor
61001d969d * config/obj-coffbfd.c (do_relocs_for): Remove a29k special case.
(fixup_segment): Add a29k special case; the linker is not prepared
	to see a segment offset here.
1993-03-25 22:09:27 +00:00
Ken Raeburn
30d17c7e22 updated for obj-bfd-sunos, ho-decst* changes 1993-03-23 13:37:15 +00:00
Ken Raeburn
155e7bc479 (do_relocs_for): Don't allocate storage or process relocs if there aren't any
relocs to process.  Avoids malloc/free bug on SCO too.
1993-03-23 13:34:55 +00:00
Ken Raeburn
214d840f9a rename for <=14 chars 1993-03-23 13:27:05 +00:00
Ken Raeburn
59b5f843ff unused; deleted 1993-03-23 13:25:13 +00:00
Ian Lance Taylor
1369949e5e * config/tc-mips.c (macro): Use $AT for any floating point load.
Also get the debugging information right in obj-ecoff.c.
1993-03-22 22:18:43 +00:00
Ian Lance Taylor
f6a91cc0f7 * app.c (do_scrub_next_char): Added new state, 9, to avoid
dropping a space immediately following an identifier.
	* expr.c, write.c: Rewrote assert expressions to not use multiple
	lines; I don't think that can be done portably.
	* config/tc-mips.c (macro): Use $AT if target register is zero in
	load instruction, which it can be for a floating point load.

Also a bunch more changes to config/obj-ecoff.c, still in flux.
1993-03-18 00:52:37 +00:00
Ian Lance Taylor
3d3c503955 * write.c (write_contents): Compute the relocs before writing out
the section contents.
	* config/obj-ecoff.h, config/obj-ecoff.c: Numerous changes to get
	symbol table and values right.
	* config/tc-mips.h (LOCAL_LABEL): If OBJ_ECOFF, any label starting
	with $L is local.
	* config/tc-mips.c (tc_gen_reloc): If OBJ_ECOFF, adjust the addend
	by the section vma.

	* config/z8k.mt (TARG_CPU_DEPENDENTS): The relevant file is
	z8k-opc.h, not z8k.h.
1993-03-15 23:58:22 +00:00
Ian Lance Taylor
a36f6645fb * config/obj-coffbfd.c (obj_coff_endef): Correct test for .bf
symbol.
1993-03-15 20:21:13 +00:00
Ken Raeburn
e284846a8d Include new file config.h.
Handle some m683XX processor ids.
1993-03-12 02:39:03 +00:00
Ken Raeburn
f3ec63c251 Define EXIT_SUCCESS and EXIT_FAILURE if not already defined. 1993-03-12 02:29:11 +00:00
Ian Lance Taylor
e99f6f9c8c Added new ECOFF files. 1993-03-09 16:12:44 +00:00
Ian Lance Taylor
514d95fad2 Checkpoint for ECOFF support. Can assemble hello, world.
* config/obj-ecoff.c, config/obj-ecoff.h: Preliminary ECOFF
	support.

	* config/tc-mips.h (TARGET_FORMAT): Define based on OBJ_AOUT vs.
	OBJ_ECOFF as well as TARGET_BYTES_*_ENDIAN.
	(struct loc, struct proc, struct file): Moved to tc-mips.c within
	#ifndef OBJ_ECOFF block, since ECOFF uses different versions.
	* config/tc-mips.c: Rearranged for ECOFF support.  Added
	prototypes for all static functions.  Moved existing minimal
	debugging format support info #ifndef OBJ_ECOFF blocks.
	(macro_build_lui): Eliminated sign_extend argument, because ECOFF
	does not support a non sign extended high 16 bits reloc.  Adjusted
	all callers accordingly.
	(tc_get_register): Renamed from get_register, and made non-static.

	* config/mips-big.mt, config/mips-lit.mt: New files.  Define
	TARGET_BYTES_BIG_ENDIAN and TARGET_BYTES_LITTLE_ENDIAN,
	respectively.
	* configure.in (mips-*-bsd*): Use gas_target mips-lit.
	(mips-*-ultrix*, mips-*-irix*, mips-*-ecoff): New targets, using
	obj_format ecoff and gas_target mips-lit or mips-big.
1993-03-09 16:11:14 +00:00
Ian Lance Taylor
36d656a6cb * read.h: Define stringer here.
read.c, config/obj-ieee.c, config/obj-tcm88k.c: Not any of these
	places.
1993-03-05 17:10:02 +00:00
Ken Raeburn
2492e118e3 SUB_SEGMENT_ALIGN now takes an argument. 1993-03-03 19:47:15 +00:00
Ken Raeburn
162e34854c (s_xword): Now accepts large integer constants, but not symbolic constants
or expressions.
1993-02-24 23:30:59 +00:00
Ken Raeburn
428d312b82 changes for bfd support, enough for sun4 target 1993-02-24 11:24:14 +00:00
Ken Raeburn
1404ef23ee m68k_ip: for pc-rel addressing of a symbol, fix offset so +2 isn't needed 1993-02-24 11:20:58 +00:00
Ken Raeburn
f3abc7b25a deleted emacs local variables comments 1993-02-24 11:19:58 +00:00
Ken Raeburn
41a8f3a896 don't need LOCAL_LOADLIBES any more, with new configure.in changes 1993-02-24 11:16:21 +00:00
David D. Zuhn
7c8592905d removing excess verbosity 1993-02-13 10:15:53 +00:00
Ian Lance Taylor
e63164f988 Thu Feb 11 09:20:37 1993 Ian Lance Taylor (ian@cygnus.com)
* config/obj-coffbfd.c (fill_section): Don't set vaddr here.
	(write_object_file): Set it here instead, so that fixup_segment
	can see the correct value.
1993-02-11 17:22:42 +00:00
Ken Raeburn
44c5672585 Deleted RCS logs and "Done in" message.
Fixed a typo in a filename.
1993-02-08 19:25:34 +00:00
Ken Raeburn
a4099f7848 update for files added and deleted 1993-02-08 19:24:09 +00:00
Ken Raeburn
22a8927a96 Move VMS version of SUB_SEGMENT_ALIGN to obj-vms.h from write.h. 1993-02-08 19:22:18 +00:00
Ken Raeburn
51d8eae92d from Ralph Campbell's work 1993-02-08 19:20:27 +00:00
Ken Raeburn
debb85610b delete silly fake-as target stuff 1993-02-08 19:18:54 +00:00
Ken Raeburn
1b0e816029 don't specify comopiler here 1993-02-08 19:17:29 +00:00
Ken Raeburn
73e05a6e78 The z8k code doesn't appear too depend on include/opcode/h8300.h.
List it as depending on opcodes/z8k.h instead.
1993-02-08 19:15:26 +00:00
Steve Chamberlain
033400ec8d * config/{h8500.mt, tc-h8500.c, tc-h8500.h, obj-coffbfd.c,
obj-coffbfd.h}: support for the H8/500
1993-02-04 20:47:48 +00:00
Ken Raeburn
5a61aea99c not used 1993-01-27 22:58:05 +00:00
Ken Raeburn
23daa41e49 not used 1993-01-27 22:58:04 +00:00
Ken Raeburn
eeeaa7780b whitespace/comment changes 1993-01-20 22:22:21 +00:00
Ken Raeburn
494a6c056e Lots of changes from Eric Youngdale, mostly for VAX and VMS support. 1993-01-07 10:49:48 +00:00
Ken Raeburn
0124412e4c delete decls of segment_name, seg_name 1993-01-04 13:14:53 +00:00
Steve Chamberlain
c24e7321a6 Replace T in TC_H8300 1993-01-01 22:21:33 +00:00
Ian Lance Taylor
9a75dc1f76 A bunch of changes to COFF support. See the ChangeLog. 1992-12-30 21:39:51 +00:00
Ian Lance Taylor
85825401dc Wed Dec 30 10:18:57 1992 Ian Lance Taylor (ian@cygnus.com)
* app.c, config/tc-*.c: Don't include read.h, since it is already
	included by as.h.

	* These are based on patches from Minh Tran-le
	<mtranle@paris.intellicorp.com>.
	* configure.in (i[34]86-ibm-aix*): Accept i486 for host.  Use
	obj_format coffbfd and gas_target i386coff for target.
	(i[34]86-*-isc*): New host (uses sysv).
	* config/i386aix.mt: Removed (no longer used).
	* config/mh-i386aix (RANLIB): Use true rather than /bin/true.
	(MINUS_G): Removed.
	(LDFLAGS): Added, defined as -shlib.
	* config/te-i386aix.h (REVERSE_SORT_RELOCS): Undefine.
	* config/te-sco386.h (LOCAL_LABEL): Don't define.
	(DOT_LABEL_PREFIX): Define.
	* expr.c (operand): If DOT_LABEL_PREFIX, use .L0\001 as a label
	name rather than L0\001.
	* read.c (s_lcomm): Make a frag in SEG_BSS rather than using
	local_bss_counter.
	* symbols.c, symbols.h (local_bss_counter): Removed.
	* write.c (write_object_file): bss no longer uses
	local_bss_counter.  Pass correct data and bss size to
	VMS_write_object_file.
	* config/obj-vms.c (VMS_write_object_file): Accept bss size as
	argument, rather than using local_bss_counter.
	* config/tc-m88k.c (s_bss): Don't use local_bss_counter.
	* config/tc-sparc.c (s_reserve): Don't use local_bss_counter.
	* config/obj-coffbfd.c (had_lineno, had_reloc): Removed.
	(size_section): Restored sanity check.
	(do_relocs_for): Base section address on s_paddr rather than
	computing it.  Adjust a29k R_IHIHALF special case to account for
	section paddr (used to require paddr to be zero).  If there are no
	reclos, set s_relptr to 0.  Set relocation size in object_headers.
	(fill_section): Always set s_vaddr here, removing
	ZERO_BASED_SEGMENTS case.  Force s_scnptr for bss to 0.  Don't set
	NOLOAD for i386 .bss, because it confuses the SVR3 native linker.
	Set STYP_INFO for .comment.
	(coff_header_append): Use object headers and H_{SET,GET}_* macros.
	Make aouthdr writing depend on OBJ_COFF_OMIT_OPTIONAL_HEADER.
	(crawl_symbols): Handle 8 character section name correctly.  Use
	H_{SET,GET}_* macros.
	(do_linenos_for): Set lineno size in object_headers.
	(write_object_file): Use H_{SET,GET}_* macros.  Don't bother to
	set s_vaddr here.  If string_byte_count remains 4, set it back to
	0, and only write strings out if there are some.  Call
	fill_section before do_relocs_for and do_linenos_for.
	(obj_coff_section): Handle optional quoted second argument giving
	section characteristics.
	(obj_coff_bss): Added to handle .bss.
	(obj_coff_ident): Added to handle .ident (puts string in .comment
	section).
	(obj_coff_lcomm): Put common symbols in .bss, not .data.
	(fixup_mdeps): Change to segment.  Call frag_wane after
	md_convert_frag.
	(fixup_segment): Explicitly check S_IS_COMMON before making 386
	adjustment (already happened only for common symbols, but this is
	clearer).
	* config/obj-coffbfd.h (OBJ_COFF_OMIT_OPTIONAL_HEADER): Define.
	* config/tc-i386.c (s_bss): Don't use if I386COFF.
	(md_pseudo_table): Ignore .optim and .noopt.
	(tc_coff_sizemachdep): New function.
	* config/tc-i386.h (REVERSE_SORT_RELOCS): Undef, for SVR3
	compatibility.
	(LOCAL_LABEL): Removed definition.
	(DOT_LABEL_PREFIX): Defined.
1992-12-30 20:34:14 +00:00