Commit Graph

511 Commits

Author SHA1 Message Date
Ken Raeburn 30869211ae (md_atof): Omit warning about FP values.
(line_comment_chars): Add ! to list.
(md_apply_fix): Do process 32- and 64-bit relocations.
1994-02-28 21:13:23 +00:00
Ken Raeburn c535f6bca6 * configure.in (i960-*-coff, i960-*-vxworks5.*): Use coffbfd, and gas_target
ic960coff.
* config/ic960coff.mt: New file.
* config/obj-coffbfd.h [TC_I960]: Include coff/i960.h.
(TARGET_FORMAT) [TC_I960]: Use coff-Intel-little.
* config/te-ic960.h (CROSS_COMPILE): Don't undef this.  We'll always build
little-endian object files.
* config/tc-i960.c (md_reloc_size): Don't define at all if BFD or
BFD_ASSEMBLER is defined.
(mem_fmt): Since COFF doesn't handle callx relocations yet, treat them like
normal 32-bit relocations.
(md_apply_fix): For callx relocations, store zero.
(tc_bout_fix_to_chars): Store symbol idx for all callx relocations, regardless
of link-relax setting.
(tc_coff_fix2rtype, tc_coff_sizemachdep): New functions.
(i960_handle_align) [! OBJ_BOUT]: If link-relax option is selected, print an
error message and clear it.
* config/tc-i960.h (BFD_ARCH, COFF_FLAGS, COFF_MAGIC, TC_COUNT_RELOC,
TC_COFF_FIX2RTYPE, TC_COFF_SIZEMACHDEP, tc_fix_adjustable): New macros.
(tc_coff_fix2rtype, tc_coff_sizemachdep): Declare.
1994-02-28 21:11:17 +00:00
Ken Raeburn 442f17dc56 (obj_coff_lcomm): Put "#if 0" around the unused parts (most of the function).
(obj_coff_init_stab_section): Cast alloca result.
1994-02-28 21:06:26 +00:00
Jeff Law e03095c9bb * config/tc-hppa.c (hppa_tc_symbol): Call PA ELF BFD version.
(hppa_tc_make_sections): Likewise.
        (pa_build_symextn_section): Delete unused function.
        (hppa_tc_make_symextn_section): Likewise.
        (pa_export): Delete call to pa_build_symextn_section.

        * config/tc-hppa.h (hppa_tc_symbol): Add extern decl.
        (elf_hppa_final_processing): Delete extern decl.
        (hppa_tc_symbol): Delete extern decl.
1994-02-26 04:57:57 +00:00
Ian Lance Taylor 3919ffeb06 * config/obj-coffbfd.c (fill_section): Correct test for whether to
fill a section (from Minh Tran-Le <TRANLE@intellicorp.com>).
1994-02-25 21:16:56 +00:00
Jeff Law cb6af92833 * config/ho-hppaosf.h: Fix braino in test for ANSI-C. 1994-02-24 15:11:19 +00:00
Ken Raeburn c9c45af14e this is i386-mach3 *host* support (not target like in last mistaken msg)... 1994-02-22 18:09:19 +00:00
Ken Raeburn 75ec0c908b keep te-mach.h 1994-02-22 17:57:49 +00:00
Ian Lance Taylor 380fa957e5 * config/obj-coffbfd.c (write_object_file): use bfd_get_error (),
not bfd_error.
	* config/obj-elf.c (elf_frob_file): Likewise.
1994-02-22 03:49:59 +00:00
Ian Lance Taylor c8d02404ea * config/ho-hpux.h (BROKEN_ASSERT): Define if not __GNUC__. 1994-02-21 23:17:59 +00:00
Ken Raeburn 5efa30faad keep new te-mach.h 1994-02-18 22:04:40 +00:00
Ken Raeburn 06471862ca First attempt at i386-mach3 support.
te-mach.h: New file.
obj-aout.c (obj_aout_frob_file): New function.
obj-aout.h (obj_aout_frob_file): Declare it.
(frob_file): New macro.
tc-i386.c (md_apply_fix_1) [TE_Mach]: Don't adjust pcrel32 relocations.
tc-i386.h (TARGET_FORMAT) [TE_Mach]: Use a.out-mach3.
1994-02-18 19:57:35 +00:00
Ian Lance Taylor 4045fbb497 * config/tc-i386.c (md_pseudo_table): Remove "zero".
* config/tc-m88k.c (md_pseudo_table): Likewise.
1994-02-10 16:27:34 +00:00
Stan Shebs 66c774bb3e Wed Feb 9 09:42:45 1994 Stan Shebs (shebs@andros.cygnus.com)
* config/obj-coffbfd.c (obj_coff_init_stab_section): Use memset
	instead of memcpy to zero the initial stab symbol, duh.
	* config/obj-elf.c (obj_elf_init_stab_section): Ditto.
	* config/obj-som.c (obj_som_init_stab_section): Ditto.
1994-02-09 17:47:40 +00:00
Ken Raeburn cf272f0244 (load_expression): Parenthesize operations in range checking, to avoid
precedence questions.

(addr32): New static variable.
(md_parse_option): Set it for "-32addr".
(load_symbol_address): If addr32 is set, use ldl instead of ldq.
1994-02-07 21:12:03 +00:00
Ken Raeburn 4a6e1a39e7 * tc-alpha.c (md_section_align): Change second argument and
return type to valueT, to agree with tc.h.
(alpha_do_align): Local static array nop_pattern is now unsigned
char, to avoid overflow warnings.
* tc-alpha.h (md_section_align): Delete declaration.

* obj-ecoff.c (ecoff_frob_file): Ensure that ecoff_data for
output bfd is non-null before indirecting through it.

Crock to get GP set right:
* tc-alpha.c (alpha_frob_ecoff_data): Renamed from alpha_frob_file.
* tc-alpha.h (tc_frob_file): Macro deleted.
* obj-ecoff.c (ecoff_frob_file) [TC_ALPHA]: Call alpha_frob_ecoff_data, then
fill in optional-header info with gp value and register masks.
1994-02-07 10:11:43 +00:00
Stan Shebs 41b5ef0f76 Sat Feb 5 12:30:32 1994 Stan Shebs (shebs@andros.cygnus.com)
* config/obj-coffbfd.c (obj_coff_init_stab_section): Zero the
	initial stab symbol after allocating it.
	* config/obj-elf.c (obj_elf_init_stab_section): Ditto.

This fixes a critical bug observed in Q4 for Lynx.
1994-02-05 21:45:51 +00:00
Ian Lance Taylor af46c203df New files for PowerPC/POWER (RS/6000) support. 1994-02-05 05:35:11 +00:00
Ian Lance Taylor 11c0749600 Revert last change. 1994-02-04 03:17:30 +00:00
Ian Lance Taylor fdb3408e12 * config/tc-mips.c (md_apply_fix): If this is an undefined symbol,
subtract the value from fx_addnumber to since
	bfd_perform_relocation is going to add it in.
1994-02-04 02:32:54 +00:00
Ian Lance Taylor 1051c97f63 * config/tc-mips.c (file_mips_isa): New static variable.
(md_begin): Set it.
	(s_mipsset): Add support for .set mipN to set the ISA level.
1994-02-02 17:06:24 +00:00
Ken Raeburn 5ca42ea386 * config/ho-i386aix.h: Include sys/types.h and stdlib.h, not ho-sysv.h. Based
loosely on a patch from Minh Tran-Le.
1994-02-02 00:32:10 +00:00
Ian Lance Taylor 8bbad6fda8 * config/tc-mips.c (mips_ip): Make an unsupported instruction a
warning, not an error.
1994-02-01 23:10:05 +00:00
Ian Lance Taylor 96a8876071 * config/obj-coffbfd.c (symbol_to_chars): bfd_coff_swap_aux_out
now takes more arguments.
1994-02-01 17:18:42 +00:00
Ian Lance Taylor 257df7914d * config/obj-coff.c (dot_text_symbol, dot_data_symbol,
dot_bss_symbol): Don't define if BFD_ASSEMBLER.
	(obj_symbol_to_chars): bfd_coff_swap_aux_out now takes more
	arguments.
	(coff_line_base): Renamed from line_base.  Changed all uses.
	(coff_add_linesym): Renamed from add_line_sym.  Made non-static.
	Changed all uses.
	* config/obj-coff.h: If TC_PPC, include coff/rs6000.h.
	(S_SET_STORAGE_CLASS, S_GET_STORAGE_CLASS): Declare if
	BFD_ASSEMBLER.
	(coff_line_base): Declare.
	(coff_add_linesym): Declare if BFD_ASSEMBLER.
1994-02-01 17:17:52 +00:00
Ken Raeburn 4242632039 (Already checked in write.c and config/tc-alpha.c, but no log msg went
out because $CVSROOT was wrong...)

	* write.c (write_object_file): If tc_frob_file is defined, call it
	just before calling obj_frob_file.
	* config/tc-alpha.c (alpha_gp_value): Renamed from gp_value
	(references changed), and made non-static.
	(getExpression): Return void.
	(select_gp_value): Abort if gp_value is non-zero.  Delete call to
	non-existent bfd_set_gp_value.
	(alpha_validate_fix): Function deleted.
	(alpha_frob_symbol): Function deleted.
	(alpha_local_label): Function deleted.
	(alpha_frob_file): Renamed from alpha_end.
	* config/tc-alpha.h (alpha_frob_symbol, alpha_validate_fix,
	alpha_local_label, alpha_end): Declarations deleted.
	(alpha_gp_value, alpha_frob_file): Declare.
	(tc_frob_symbol, TC_VALIDATE_FIX, md_end): Macros deleted.
	(LOCAL_LABEL): Move code here from tc-alpha.c:alpha_local_label.
	(md_convert_frag): Simplified slightly.
	(tc_frob_file): New macro.
1994-01-30 23:26:55 +00:00
Ken Raeburn c79e67a3b7 * write.c (write_object_file): If tc_frob_file is defined, call it
just before calling obj_frob_file.
* config/tc-alpha.c (alpha_gp_value): Renamed from gp_value (refs changed), made
non-static.
(getExpression): Return void.
(select_gp_value): Abort if gp_value is non-zero.  Delete call to non-existent
bfd_set_gp_value.
(alpha_validate_fix): Function deleted.
(alpha_frob_symbol): Function deleted.
(alpha_local_label): Function deleted.
(alpha_frob_file): Renamed from alpha_end.
* config/tc-alpha.h (alpha_frob_symbol, alpha_validate_fix, alpha_local_label,
alpha_end): Declarations deleted.
(alpha_gp_value, alpha_frob_file): Declare.
(tc_frob_symbol, TC_VALIDATE_FIX, md_end): Macros deleted.
(LOCAL_LABEL): Move code here from tc-alpha.c:alpha_local_label.
(md_convert_frag): Simplified slightly.
(tc_frob_file): New macro.
1994-01-30 23:21:55 +00:00
Ian Lance Taylor 1f029792a2 * config/obj-coff.c (obj_coff_section_header_append): Do not
declare if BFD_ASSEMBLER.
	(stack_pop): Correct test for stack underflow.
	(obj_coff_endef, obj_coff_dim, obj_coff_line, obj_coff_size,
	obj_coff_scl, obj_coff_tag, obj_coff_type, obj_coff_val): Declare
	type of ignored argument to avoid gcc warning.
	(align): Removed unused function.
1994-01-28 16:30:29 +00:00
Ken Raeburn 0b233d31df removed rcs cruft 1994-01-28 05:38:41 +00:00
Ken Raeburn 5749c49700 New Alpha support files, based on files from CMU.
Still to do:
 - fix floating-point handling
 - figure out if we can adapt to using ../opcodes/alpha-opc.h
 - gcc bootstrap testing
 - 32-bit mode support?
 - test cross-assembly
1994-01-28 01:37:02 +00:00
Ken Raeburn 98c6bbbe43 * as.h: If __GNUC__ and inline are both undefined, define inline away.
* write.c (cvt_frag_to_fill): Don't assume that fr_var for rs_align or rs_org
frags will be 1.
(relax_segment): For rs_align, if fr_var is not 1, complain if
required padding is not a multiple of the size of the pad pattern.
(fixup_segment): Leave gp-relative relocations alone.  For pcrel relocations
referring to the same segment, clear fx_pcrel when clearing fx_addsy.
* as.h: Adjust comments on rs_align.

* write.c, config/obj-{aout,bout,coff*}.c, config/tc-sparc.c: Query the fx_done
field instead of fx_addsy to see if the fixup still needs to be applied.  Set
fx_done and clear fx_addsy both, for now.  If TC_HANDLES_FX_DONE isn't defined,
assume md_apply_fix will only clear fx_addsy, and set fx_done accordingly after
returning.
* config/tc-sparc.h (TC_HANDLES_FX_DONE): Define.

* config/obj-coff.c (dot_text_symbol, dot_data_symbol, dot_bss_symbol): Defined
here, static.

* config/obj-aout.c [BFD_ASSEMBLER]: Undef NO_RELOC before including aout/aout64.h.

* write.c (write_object_file): If EMIT_SECTION_SYMBOLS is false, don't write
out a section symbol even if it's used in a relocation; assume relocations will
handle section numbers somehow.  Rename "punt_it" label to "punt_it_if_unused"
to reflect it's true use.
(EMIT_SECTION_SYMBOLS): Default to 1.
(adjust_reloc_syms): Don't create a new symbol for an absolute
reference; just use the absolute section symbol.
(write_relocs): Make printout of reloc values dependent on flag DEBUG3, not
DEBUG2.
* config/obj-aout.h (EMIT_SECTION_SYMBOLS): Define as 0.
* config/obj-ecoff.h (EMIT_SECTION_SYMBOLS): Ditto.
1994-01-28 01:21:53 +00:00
Ken Raeburn c1b625be7b whitespace/comment changes 1994-01-28 00:21:03 +00:00
Ian Lance Taylor c6858c1be5 * ecoff.c (ecoff_frob_symbol): New function. Put undefined
symbols of known size in the undefined section.  Put small common
	symbols in a .scommon section.
	* ecoff.h (ecoff_frob_symbol): Declare.
	* config/obj-ecoff.h (obj_frob_symbol): Define.
	* config/obj-elf.c (obj_elf_write_symbol_p, obj_elf_write_symbol,
	obj_elf_frob_symbol): Removed unused functions.
	* config/obj-elf.h (obj_frob_symbol, obj_write_symbol): Removed
	unused macros.
	(obj_elf_frob_symbol, obj_elf_write_symbol): Removed declarations
	of unused functions.
	(obj_frob_symbol): Define if ECOFF_DEBUGGING.
1994-01-25 00:26:33 +00:00
Ian Lance Taylor 425625680a * tc-mips.c (g_switch_seen): New static variable.
(md_parse_option): Set g_switch_seen for -G option.
	(s_option): If creating PIC code, force the GP size to be 0.  Warn
	if -G switch used with a non-zero value.
1994-01-25 00:24:57 +00:00
Ian Lance Taylor eb8fd0e9b4 * config/tc-mips.c (md_pseudo_table): Add all data allocation
pseudo-ops: .hword, .int, .long, .octa, .quad, .short, .single.
1994-01-20 04:18:14 +00:00
Ian Lance Taylor 13655af625 Smuggle N_WARNING symbols into BFD in obj_aout_frob_symbol. 1994-01-19 05:02:24 +00:00
Jeff Law 2f156c92bd * config/tc-hppa.c: Disable multiple $CODE$ subspace code. It
confuses GDB for some unknown reason.
        * cofnig/obj-som.c: Likewise.
1994-01-19 00:21:16 +00:00
Steve Chamberlain ec0bcbbaa1 * config/obj-coffbfd.c (obj_coff_endef): For C_EFCN, C_BLOCK and
C_FCN assume .val has been set to .
1994-01-19 00:16:03 +00:00
Ian Lance Taylor 4bda835f61 * config/obj-aout.c (obj_aout_frob_symbol): Try to get symbols
with explicitly marked stabs through BFD: if a symbol marked
	N_UNDF | N_EXT is in the absolute section, move it to the
	undefined section; move a symbol marked N_INDR into
	bfd_ind_section and set the BSF_INDIRECT flag.
1994-01-18 22:27:26 +00:00
Ian Lance Taylor 04cb3372f3 Comment and whitespace changes. 1994-01-17 20:39:26 +00:00
Jeff Law 51517966bc * config/tc-hppa.c (pa_ip): Explicitly check for comma before 'u'
and 'f' template operand.
1994-01-17 09:30:07 +00:00
Jeff Law d0286a2112 * config/tc-hppa.c (pa_ip): Handle 'N', 'O', 'o', '0', '1', 'u',
and '2' in copr and sfu instruction templates.
1994-01-17 08:19:56 +00:00
David Edelsohn e79cb10bbe * config/obj-elf.c (obj_elf_section): Fix loop termination test. 1994-01-15 17:31:05 +00:00
Jeff Law 86066d063b * config/obj-som.c (som_frob_file): Call adjust_code_sections
for each section.
        (adjust_code_sections): New function.  Adjusts the VMA for all the
        $CODE$ subspaces.

        * config/tc-hppa.c (md_assemble): Also handle creating a fixup
        for the unwind descriptors if a function's label follows the
        .PROC and .ENTRY directives.
        (pa_entry): Don't set BSF_FUNCTION for the label symbol here; it
        is done elsewhere.  Don't create a fixup for the unwind
        descriptors if the function's label has not been defined yet.
        (pa_proc): For SOM, place each procedure within a new $CODE$
        subspace.  Adjust the segment and frag for the associated
        function label if it exists.
1994-01-13 20:17:39 +00:00
Jeff Law fca59f9d42 * config/tc-hppa.c (hppa_fix_struct): Add new "segment" field.
(hppa_fix_new): Initialize segment field.
        (md_apply_fix): Do nothing for pc-relative fixup which involves
        crossing a segment boundary.
        (pa_procend): Undefine the current label after handling .PROC
        and .PROCEND directives.
        (dummy_symbol): Make type "symbolS *".  Change references as
        appropriate.
1994-01-13 06:06:35 +00:00
Ian Lance Taylor f34e27a18a * config/obj-elf.c: If TC_MIPS, include elf/mips.h.
(special_sections): Define.
	(obj_elf_special_section): Get default types and attributes from
	list of special sections.
	* config/tc-mips.c (ELF_TC_SPECIAL_SECTIONS): Define.
1994-01-11 22:35:16 +00:00
Ian Lance Taylor 8197b58995 * config/tc-mips.c (macro): Corrected $at warnings in a couple of
spots.
1994-01-11 19:18:45 +00:00
Ian Lance Taylor af255ca0bb * listing.c (listing_prev_line): New function.
* listing.c: Include subsegs.h.
	(listing_prev_line): New function.
	(calc_hex): Reset byte_in_frag to zero for each new frag.
	* config/tc-mips.c (append_insn): Call listing_prev_line after
	emitting nop instructions.
	* Makefile.in (listing.o): Depends upon subsegs.h.
1994-01-11 18:06:01 +00:00
Stan Shebs 2a79b2028e Set lose_these_too correctly 1994-01-11 02:55:30 +00:00
Jeff Law 4047ff1d24 * config/tc-hppa.c (pa_ip): Put check for missing label on .PROC
here.  Handle case where label may be defined after the .PROC.
        (pa_proc): It is not an error if the procedure's label isn't
        defined before the .PROC directive.
1994-01-10 17:54:01 +00:00