Commit Graph

1404 Commits

Author SHA1 Message Date
Ian Lance Taylor ba97ba7e35 tweak last change 1996-05-02 03:11:26 +00:00
Ian Lance Taylor 7681eb9df7 * subsegs.h (segment_info_type): If MANY_SEGMENTS and not
BFD_ASSEMBLER, add name field.
	* config/obj-coff.c (coff_header_append): Handle long section
	names.
	(crawl_symbols): Just use the name field for the symbol name,
	without worrying about null byte termination.
	(w_strings): Handle long section names.
	(write_object_file): Likewise.  Also, use the name field, rather
	than scnhdr.s_name.
	(obj_coff_add_segment): Permit long section names.
	(obj_coff_init_stab_section): Use the name field, rather than
	scnhdr.s_name.
	(adjust_stab_section): Likewise.
	* config/te-pe.h (COFF_LONG_SECTION_NAMES): Define.
1996-05-02 02:32:52 +00:00
Ian Lance Taylor 8fe2ec52ee * config/tc-i960.c (brtab_emit): Don't set fx_im_disp field.
(mem_fmt): Likewise.
	(md_apply_fix): Don't check fx_im_disp field.
Fixes problem introduced by September 5, 1995 change to fx_im_disp
definition.
1996-05-01 20:40:16 +00:00
Ian Lance Taylor f9e36fc627 * configure.in: Add * after sparc*-*-vxworks.
* configure: Rebuild.
1996-04-25 21:16:58 +00:00
Ian Lance Taylor 556829bcb9 * app.c (do_scrub_begin): If tc_comment_chars is not defined,
define it to comment_chars.  Use tc_comment_chars rather than
	comment_chars.
	(do_scrub_chars): Use tc_comment_chars rather than comment_chars.
	* config/tc-m68k.h (tc_comment_chars): Define.
	(m68k_comment_chars): Declare.
	* config/tc-m68k.c (m68k_comment_chars): Rename from
	comment_chars.  Change into a pointer rather than an array.
	(md_longopts): Add "bitwise-or".
	(md_parse_option): Handle OPTION_BITWISE_OR.
	(md_show_usage): Mention --bitwise-or.
	* doc/c-m68k.texi: Document --bitwise-or.
PR 9518.
1996-04-25 15:43:13 +00:00
Ian Lance Taylor 912e424518 * config/tc-m68k.c (m68k_ip): Prevent attempts to use long offsets
in 68000 mode.
1996-04-24 21:05:20 +00:00
Ian Lance Taylor 116bf30f41 * config/obj-coff.c (obj_coff_section): BFD_ASSEMBLER version:
call demand_empty_rest_of_line.  Non BFD_ASSEMBLER version:
	correct handling of input line pointer, and call
	demand_empty_rest_of_line.
PR 9525.
1996-04-24 15:30:56 +00:00
David Edelsohn 58c9a12bb8 * config/tc-sparc.c (in_bitfield_range): New static function.
(sparc_ip): New cases X,Y.  Use SPARC_OPCODE_ARCH_V9_P.
	(md_apply_fix, cases BFD_RELOC_32_PCREL_S2,
	BFD_RELOC_SPARC_{WDISP16,WDISP19}): Fix undefined code.
	(md_apply_fix): New cases BFD_RELOC_SPARC_[56].
	(tc_gen_reloc): New cases BFD_RELOC_SPARC_[56].
1996-04-23 01:25:42 +00:00
Ian Lance Taylor ff406bd3bf * config/obj-coff.c: BFD_ASSEMBLER:
(coff_last_bf): New static variable.
	(coff_frob_symbol): Set endndx of a .bf symbol.
	Non BFD_ASSEMBLER:
	(obj_coff_endef): Call SF_SET_PROCESS on a .bf symbol.
	(last_bfP): New static variable.
	(yank_symbols): Set endndx of a .bf symbol.
PR 9467.
1996-04-18 23:00:29 +00:00
Michael Meissner 47d12b2ce0 Add -le/-be/-s from Solaris. 1996-04-18 15:56:03 +00:00
Ian Lance Taylor 3ce7f41ac4 * read.c (s_space): Support non-constant fill value. Handle fill
value correctly for a size other than 1.
PR 9474.
1996-04-17 16:33:21 +00:00
David Edelsohn 865447db04 * config/tc-arm.c (my_get_float_expression): Update call to
gen_to_words, X_PRECISION changed from 6 to 5.
1996-04-16 22:18:20 +00:00
Michael Meissner 159e6ef88f Add -m{,no-}regnames support; Add Solaris/linux support 1996-04-16 14:41:45 +00:00
Ian Lance Taylor aa9e2dbe32 * config/tc-mips.c (mips_frob_file): Permit multiple %hi relocs to
be associated with a single %lo reloc.
1996-04-15 23:01:50 +00:00
Ian Lance Taylor 7a15a226ad * config/tc-mips.c (load_address): Cast X_add_number to valueT
before comparing against MAX_GPREL_OFFSET, so that negative
	numbers are handled correctly.
	(macro): Likewise.
1996-04-15 16:28:19 +00:00
Ian Lance Taylor ed94c2b89d * config/tc-sparc.c (last_insn): New static variable.
(md_assemble): Warn about putting floating point branches in a
	delay slot.  If architecture is less than v9, insert NOP
	instructions between floating point instructions and floating
	point branches.  (The SunOS assembler does both these operations.)
	Save the last instruction opcode.
	(sparc_ip): Add pinsn parameter.  Change caller.
PR 355.
1996-04-11 21:35:01 +00:00
Ian Lance Taylor 65feb78d13 * config/tc-m68k.c (md_estimate_size_before_relax): Correct check
for byte jump to next instruction to skip empty frags.
PR 7044.
1996-04-11 16:41:48 +00:00
Ian Lance Taylor 456c301f6e * config/tc-alpha.c (alpha_ip): If we are going to call emit_add64
for addq with a 16 bit signed value, just emit a lda instruction
	instead.
PR 6982.
1996-04-10 20:50:02 +00:00
Jeff Law b3ed89e865 * config/tc-h8300.c (do_a_fix_imm): Don't cut off high bits
of a 32bit operand.
Fix for mov32bug.s.
1996-04-10 20:33:58 +00:00
Ian Lance Taylor b4cb4ea2ac * configure.in: Permit --enable-shared to specify a list of
directories.
	* configure: Rebuild.
1996-04-08 18:45:08 +00:00
Jeff Law dcb195f8fa * config/tc-h8300.c (get_specific): Remove some #if 0 code.
(build_bytes): Remove all ABSMOV related code; it's unnecessary.
ABSMOV is gone... Cleaning up.  hmse.
1996-04-06 00:06:10 +00:00
Ian Lance Taylor 13e4a17e76 Fri Apr 5 15:13:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config/atof-ieee.c: Fix handling of denormalized extended
	precision numbers and overflow/underflow detection.
	(MAX_PRECISION, X_PRECISION, P_PRECISION): Changed from 6 to 5, to
	not include the 16 bit gap in the m68k extended precision format.
1996-04-05 20:14:43 +00:00
Ian Lance Taylor 2ae5f50bf2 * configure.in: Add i386-*-freebsdelf* target; from John Polstra
<jdp@polstra.com>.
	* configure: Rebuild.
1996-04-05 19:30:22 +00:00
Jackie Smith Cashion 54ea771f6a Fri Apr 5 18:39:28 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c: Allow non-zero offsets from .sdata symbols to
 	be accessed using the $gp register.
	* config/tc-mips.h (MAX_GPREL_OFFSET): Added.

This ensures that the $gp addressing will continued to be used if the
"combine_statics" optimisation is enabled within GCC.
1996-04-05 17:43:05 +00:00
David Edelsohn 65b12103ff * config/tc-sparc.c (sparc_md_end): Set bfd machine number to
bfd_mach_sparc_sparclet if current_architecture is sparclet.
1996-04-03 18:59:08 +00:00
Ian Lance Taylor 2271578d4e * read.c (get_line_sb): Bump line counters based on
input_line_pointer[-1], not *input_line_pointer.  Don't bother to
	call LISTING_NEWLINE.
	(s_macro): Don't call demand_empty_rest_of_line.
	* app.c (do_scrub_chars): When handling C style comments, unget
	ch2 rather than ch.
1996-04-01 22:03:07 +00:00
Ian Lance Taylor 7d3741edcb * read.h (enum linkonce_type): Define.
(s_linkonce): Declare.
	* read.c (potable): Add "linkonce".
	(s_linkonce): New function.
	* subsegs.h (segment_info_type): Add linkonce field to
	MANY_SEGMENTS && ! BFD_ASSEMBLER section.
	* config/obj-coff.h (obj_handle_link_once): Define if TE_PE.
	(obj_coff_pe_handle_link_once): Declare if TE_PE.
	* config/obj-coff.c: If TE_PE and not BFD_ASSEMBLER, #include
	"coff/pe.h".
	(obj_coff_pe_handle_link_once): New function, defined if TE_PE.
	(c_section_symbol): If TE_PE, set the x_comdat field in the aux
	entry based on the linkonce field in segment_info.
	* doc/as.texinfo: Document .linkonce.
1996-03-29 21:35:44 +00:00
J.T. Conklin 0c20334015 * doc/as.1: Changed to be recognized by catman -w on Solaris. 1996-03-29 19:33:43 +00:00
Ian Lance Taylor 3197da91f9 * stabs.c (s_stab_generic): Call the listing functions before
doing the rest of the processing, which may involve freeing the
	string.  Pass string, not string + stroff, to OBJ_PROCESS_STAB in
	SEPARATE_STAB_SECTIONS case.
1996-03-28 23:13:30 +00:00
Ian Lance Taylor 3c071b9f4e * config/tc-hppa.c: Remove nested comment.
(tc_gen_reloc): Move label done inside the ifdef in which it is
	used.
	(md_apply_fix): Pass pointers to correct types to libhppa.h
	functions.  Always return a value.
1996-03-28 22:49:45 +00:00
Ian Lance Taylor 867a58b368 * config/tc-mips.h (tc_frob_file): Define.
(mips_frob_file): Declare.
	* config/tc-mips.c (struct mips_hi_fixup): Define.
	(mips_hi_fixup_list): New static variable.
	(imm_unmatched_hi): New static variable.
	(md_assemble): Clear imm_reloc, imm_unmatched_hi, and
	offset_reloc.  Pass imm_unmatched_hi to append_insn.
	(append_insn): Add unmatched_hi parameter.  If it is set, add the
	new fixup to mips_hi_fixup_list.  Change all callers.
	(mips_ip): Set imm_unmatched_hi when appropriate.
	(mips_frob_file): New function.
1996-03-28 20:37:02 +00:00
David Edelsohn d0352cbbe8 * configure.in (sparc-*-solaris2*): Renamed from sparc*-*-solaris2*.
* configure: Regenerated.
1996-03-28 19:49:54 +00:00
Ian Lance Taylor 4f74c0421b * as.c (main): Call bfd_set_error_program_name. 1996-03-26 23:20:22 +00:00
Ian Lance Taylor c7a89bde9b * as.h (strdup): Don't declare.
* stabs.c: Include libiberty.h
	(get_stab_string_offset): Use xstrdup rather than strdup.
	(s_stab_generic): Likewise.
	* as.c (parse_args): Likewise.
	* read.c (s_mri_sect): Likewise.
1996-03-22 16:44:21 +00:00
Ian Lance Taylor 5ba7c0bee1 * gasp.c (change_base): Recognize \(...) construct documented to
pass through enclosed characters literally through to the output.
	(process_assigns): Likewise.  Also, be more careful to avoid
	looking past the end of the buffer.
PR 9268.
1996-03-22 16:14:07 +00:00
Ian Lance Taylor d1f38e137a Wed Mar 20 18:13:32 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* doc/as.texinfo, doc/c-i960.texi: Fix typos.
1996-03-20 23:14:38 +00:00
Ian Lance Taylor 649d87fe30 Wed Mar 20 17:05:16 1996 David Mosberger-Tang <davidm@azstarnet.com>
* config/alpha-opcode.h: Added cvtst instruction.
1996-03-20 22:10:07 +00:00
Ian Lance Taylor 975def01a5 * ecoff.c (ecoff_stab): Don't try to make a symbol out of the stab
string.  Extract the addend from the result of expression.
1996-03-18 18:13:59 +00:00
Ian Lance Taylor fde6018a93 * app.c (do_scrub_chars): If whitespace is seen in state 11, and
LABELS_WITHOUT_COLONS is not defined, and we are not in m68k MRI
	mode, change the state to 3 rather than 1.
1996-03-15 22:12:10 +00:00
Ian Lance Taylor ee0f488d03 * config/obj-coff.h (C_REGISTER_SECTION): Change from 20 to 50, to
correspond to 11 March change.
1996-03-14 23:19:08 +00:00
Jeff Law 9da28504b8 * config/tc-h8300.c (build_bytes, MEMIND case): Generate
an R_MEM_INDIRECT reloc rather than R_RELBYTE.
hmse
1996-03-14 22:55:12 +00:00
Ian Lance Taylor ea2488ad2e * configure: Rebuild with autoconf 2.8. 1996-03-12 17:22:07 +00:00
Ian Lance Taylor 8fee8bf38e * config/atof-ieee.c (gen_to_words): Improve handling of
X_PRECISION numbers.  Based on patches from Andreas Schwab
	<schwab@issan.informatik.uni-dortmund.de>.
1996-03-11 23:58:15 +00:00
Steve Chamberlain a31c2bc74c * as.h (SEG_NORMAL, SEG_LIST): Bump segment limit from 10 to 40.
(SEG_LAST): New.
	* subsegs.c (MANY_SEGMENTS): Increase segment limit.
	* obj-coff.c (seg_N_TYPE, seg_info_off_by_4): Likewise.
	(do_relocs_for, w_symbols, obj_coff_add_segment, do_linenos_for,
	crawl_symbols, coff_header_append): Loop to SEG_LAST rather than
	SEG_E9.

Until BFD backend works with i386-pe.
1996-03-11 18:05:58 +00:00
Jeff Law 73578b1e49 * config/tc-hppa.c (SUBSEG_MILLI): Define.
(pa_def_subspaces): Add $MILLICODE$.
        (pa_spaces_begin): Set section flags for $MILLICODE$.
1996-03-07 16:19:23 +00:00
Ian Lance Taylor 6b8ed20d4a * config/obj-elf.c (obj_elf_section): Only SEC_LOAD if the type is
not SHT_NOBITS.  Don't tamper with flags based on type if a
	special section was found (revert Feb 29 change).
1996-03-06 22:19:22 +00:00
Ian Lance Taylor 0c27542fad * config/tc-sh.c (sh_do_align): Only align using the nop pattern
if aligning to a longword boundary or greater.
1996-03-06 19:16:17 +00:00
Jim Wilson 6a413d6f3e * tc-sh.c (sh_do_align): Pass 1 not 2 to frag_align. 1996-03-06 18:50:20 +00:00
Steve Chamberlain 4b29551786 * configure.in (i386-*-cygwin32): Don't use bfd_gas.
* configure: Regenerated.
1996-03-05 05:04:56 +00:00
Jeff Law 421e2c270e * config/tc-hppa.c: Add default definitions for R_N0SEL and
R_N1SEL since they're not defined for old versions of hpux.
1996-03-04 19:42:03 +00:00
Jeff Law eff5fcda23 * config/tc-hppa.c (tc_gen_reloc): Fix typo in R_COMP2 code.
Set "sym_ptr_ptr" and "addend" fields to dummy values for
        R_N0SEL and R_N1SEL.
Net buglet, and something I just noticed was wrong.
1996-03-04 17:15:23 +00:00
Ian Lance Taylor d197a7abbc Fri Mar 1 10:20:52 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* flonum-konst.c: Add two more constants for 1e+-2048 and
	1e+-4096, and correct the other constants.
1996-03-01 15:34:47 +00:00
Ian Lance Taylor bb1013d939 Fri Mar 1 10:20:52 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* symbols.c (resolve_symbol_value): Handle O_logical_not.
1996-03-01 15:24:19 +00:00
Michael Meissner 0d8405e80d fix typo 1996-02-29 23:16:24 +00:00
Michael Meissner 30510276e6 All predefined sections to be of NOBITS type 1996-02-29 19:04:49 +00:00
Jeff Law 24b216e1dd * config/tc-hppa.c (hppa_fix_adjustable): For SOM, don't
reduce relocs using e_nlrsel field selectors.
1996-02-29 00:51:00 +00:00
Jeff Law 75c90d612e * write.c (fix_new_exp): Don't use #elif. Some compilers
don't handle it.
Fixes build problem with certain versions of the hpux compiler.
1996-02-28 22:39:09 +00:00
Jeff Law 83b59013fb * config/tc-hppa.c (selector_table): Add "n", "nl", and "nlr" to
the selector table.
        (pa_chk_field_selector): Handle new field selectors for SOM.
More new stuff for hpux10.
1996-02-28 18:34:32 +00:00
Ian Lance Taylor 535cfd0fd9 Tue Feb 27 14:42:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (m68k-*-linux*aout*, m68k-*-linux*): New targets.
	* configure: Rebuild.
	* config/te-linux.h (LOCAL_LABELS_FB): Define.
	* config/tc-m68k.h (TARGET_FORMAT) [TE_LINUX]: Define to
	"a.out-m68k-linux".
	* config/tc-m68k.c (comment_chars): Don't include '#' if TE_LINUX
	is defined.
1996-02-27 20:01:48 +00:00
Stan Shebs d214421eee * mpw-make.sed: Update to handle shared library support. 1996-02-27 03:03:21 +00:00
David Edelsohn 110b814dba * config/tc-sparc.c (sparc_ip): Print all architectures that support
the insn on mismatch.
1996-02-26 18:38:33 +00:00
Rob Savoye 805e36ab5d * configure.in: Add support for a29-coff.
* configure: Rebuild.
1996-02-24 04:46:41 +00:00
Ian Lance Taylor 101a23469f * config/tc-sh.c (sh_coff_frob_file): Don't consider the address
of the section when looking for the R_SH_USES fixup, because the
	frag addresses have not yet been adjusted.
PR 9072.
1996-02-23 01:15:39 +00:00
Ian Lance Taylor 940c413f96 * gdbinit.in: Set a breakpoint on as_warn_where. 1996-02-23 01:09:38 +00:00
Ian Lance Taylor e41ab2a6a4 * config/tc-mips.c (macro): Add missing arguments to macro_build
omitted in last change.  From Jim Wilson <wilson@cygnus.com>.
1996-02-23 00:41:09 +00:00
Ian Lance Taylor c6016ce293 * config/tc-h8300.c (tc_reloc_mangle): Change reloc based on size
if it is TC_CONS_RELOC.  Set a size of 4 to R_RELLONG.
PR 5166.
1996-02-21 22:02:54 +00:00
David Edelsohn b32fbe0779 * config/tc-sparc.c (sparc_ip): Recognize %asr0 for v8. 1996-02-21 17:26:21 +00:00
David Edelsohn 2e5e6879d5 * config/tc-sparc.c (parse_keyword_arg): Accept leading '%'.
(sparc_ip): Accept %asr[1..31] for v8 and %asr[%16..31] for v9.
	Recognize [uU] format args as sparclet cpregs.
1996-02-21 05:50:22 +00:00
Ian Lance Taylor 8a2e1fdd3c * config/tc-sh.c (sh_handle_align): Don't emit R_SH_ALIGN relocs
in bss_section.
PR 9044.
1996-02-21 03:30:01 +00:00
Ian Lance Taylor 21965655ed * config/tc-sparc.h (TC_RELOC_RTSYM_LOC_FIXUP): Check S_IS_WEAK as
well as S_IS_EXTERNAL.
	(tc_fix_adjustable): Likewise.
	* config/tc-sparc.c (md_apply_fix): In OBJ_ELF case, check for
	S_IS_WEAK as well as S_IS_EXTERNAL when deciding whether to return
	early.
	(tc_gen_reloc): Check S_IS_WEAK as wel as S_IS_EXTERNAL when
	deciding whether to convert BFD_RELOC_32_PCREL_S2 if PIC.
1996-02-19 19:29:17 +00:00
David Edelsohn d8b42b96d1 * config/tc-sparc.c (max_architecture): Change to sparclite for
32 bit arch.
	(default_compatible): Delete.
	(sparc_ffs): New function.
	(md_begin): Only call SPARC_OPCODE_CONFLICT_P once.
	(sparc_ip): Rewrite architecture match and bump logic.
1996-02-19 10:43:01 +00:00
Ian Lance Taylor 7925f4d4b9 * configure.in: Check for 'do not mix' from native linker before
trying to use -rpath.
	* configure: Rebuild.
1996-02-18 20:07:36 +00:00
Ian Lance Taylor ef2074c25a * config/obj-coff.h (SF_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
(SF_GET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
	(SF_SET_ADJ_LNNOPTR): Define (non BFD_ASSEMBLER).
	* config/obj-coff.c (obj_coff_endef): Set ADJ_LNNOPTR when LNNOPTR
	is set.
	(w_symbols): If ADJ_LNNOPTR is set, add the section lnnoptr field
	to the symbol lnnoptr field, to get the correct file offset.
PR 7428.
1996-02-16 21:56:19 +00:00
Michael Meissner 28910c57ce Force all PPC symbols that otherwise do not have a symbol type to be BSF_OBJECT 1996-02-15 19:54:38 +00:00
Ian Lance Taylor 1a2f3c3f1f * configure: Set and substitute RPATH_ENVVAR.
* configure: Rebuild.
	* Makefile.in (RPATH_ENVVAR): New variable.
	(check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH.
1996-02-15 19:00:54 +00:00
Ian Lance Taylor 7c2fadd1af * configure.in: Accept i686. From H.J. Lu <hjl@zoom.com>: i386
doesn't need opcodes.  If configuring shared, opcodes needs bfd.
	* configure: Rebuild.
1996-02-15 16:22:03 +00:00
Ian Lance Taylor ae09d880bd From Alan Modra <alan@spri.levels.unisa.edu.au>:
* configure.in: Remove duplicate setting of cpu_type.  Check
	whether opcodes library is required for on all targets, not just
	primary one.
	* configure: Rebuild.
1996-02-14 23:13:13 +00:00
Ian Lance Taylor 8a6f53e91b Wed Feb 14 16:33:12 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
* read.c (s_mri_sect): Don't return '\0' in type.  Set all
	appropriate flags in BFD section.

	* configure.in (m68k-*-psos*): New target.
	* configure: Rebuild.
	* config/te-psos.h: New file.
	* config/tc-m68k.c (comment_chars): Don't include '#' if TE_PSOS
	is defined.
1996-02-14 21:37:16 +00:00
Ian Lance Taylor fb251650e9 * config/tc-mips.c (mips_big_got): New static variable.
(s_extern): Don't declare.
	(reg_needs_delay): New static function.
	(macro_build): Permit GOT/CALL_HI/LO relocs.
	(macro_build_lui): If place is not NULL, use the number in the
	expression.
	(load_address): Handle mips_big_got case.
	(macro): Handle mips_big_got for M_LA_AB, M_JAL_A, and load and
	store macros.
	(OPTION_XGOT): Define.
	(md_longopts): Add "xgot" if OBJ_ELF.
	(md_parse_option): Handle -xgot.
	(md_show_usage): Mention -xgot.
	(md_apply_fix): Permit GOT/CALL_HI/LO relocs.
	(tc_gen_reloc): Handle GOT/CALL_HI/LO relocs.
1996-02-14 18:49:27 +00:00
Ian Lance Taylor d9396c16ce Wed Feb 14 11:22:27 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config/tc-m68k.c (m68k_ip) [operand kind '#']: When fixing
	the byte relocation, point it to the low byte of the word.
1996-02-14 16:23:19 +00:00
Ian Lance Taylor 56f9773ffd * configure.in: Set HDLFLAGS for *-*-hpux with --enable-shared.
* configure: Rebuild.
1996-02-13 20:34:53 +00:00
Ian Lance Taylor 20710f1c0c * read.c (potable): Add "mri" and ".mri".
(s_mri): New function.
	* read.h (s_mri): Declare.
	* app.c (scrub_m68k_mri): New static variable.
	(mri_pseudo): New static variable.
	(do_scrub_begin): Add m68k_mri parameter.  Use it rather than
	flag_m68k_mri.  Initialize scrub_m68k_mri.
	(mri_state, mri_last_ch): New static variables.
	(struct app_save): Add scrub_m68k_mri, mri_state, and mri_last_ch
	fields.
	(app_push): Save new fields.
	(app_pop): Restore new fields.
	(do_scrub_chars): Check scrub_m68k_mri rather than flag_mri_mri.
	If TC_M68K, use a trivial state machine to look for occurrences of
	the .mri pseudo-op, and change the mode appropriately.
	* as.h (do_scrub_begin): Update prototype.
	* input-scrub.c (input_scrub_begin): Pass flag_m68k_mri to
	do_scrub_begin.
	* config/tc-m68k.c (reg_prefix_optional_seen): New static
	variable.
	(m68k_mri_mode_change): New function.
	(md_parse_option): Set reg_prefix_optional_seen.
	* config/tc-m68k.h (m68k_mri_mode_change): Declare.
	(MRI_MODE_CHANGE): Define.
	* doc/as.texinfo: Document .mri pseudo-op.
1996-02-13 00:20:13 +00:00
David Edelsohn 63e4edb555 * configure.in: Recognize any sparc* cpu.
* configure: Regenerated.
1996-02-12 23:54:50 +00:00
Ian Lance Taylor 15ed5f2c3f * app.c (do_scrub_chars): In MRI mode, don't treat '#' as a
comment character.
1996-02-12 20:41:58 +00:00
Ian Lance Taylor a043f579df Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Support for OBJ_ELF on m68k, mostly inside #ifdef OBJ_ELF:
	* config/m68k-parse.h (enum pic_relocation): Define.
	(struct m68k_exp): Add pic_reloc field.
	* config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
	(tc_fix_adjustable): Define to call tc_m68k_fix_adjustable.
	(NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
	otherwise.
	* config/tc-m68k.c: Delete definition of NO_RELOC.
 	(struct m68k_it): Add pic_reloc field.
	(add_fix): Copy over pic_reloc field.
	(md_pseudo_table): Interpret .align parameter as byte count.
	(mote_pseudo_table): Likewise.
	(tc_m68k_fix_adjustable): New function.
	(get_reloc_code): New function.
	(md_assemble): Use it as last argument to fix_new_exp.
	(md_apply_fix_2): For a relocation against a symbol don't put the
	addend into the data.
	(tc_gen_reloc): Different addend computation for OBJ_ELF.
	(m68k_ip): Don't relax an operand that requires pic relocation.
	(md_begin): Align .text, .data and .bss on 4 byte boundary by
	default.
	* write.c (fixup_segment): Don't add symbol value to addend if
 	TC_M68K and OBJ_ELF.
	* config/m68k-parse.y (yylex): Handle @PLTPC, etc.
	(motorola_operand): Add rule for `(zapc, EXPR)'.
1996-02-12 20:33:06 +00:00
Ian Lance Taylor 6ca1156def Mon Feb 12 10:07:33 1996 David Mosberger-Tang <davidm@azstarnet.com>
* ecoff.c (ecoff_directive_weakext): Fixed so that whitespace
	*really* is permissible before the comma.
1996-02-12 15:08:04 +00:00
Ian Lance Taylor fcee3e24c2 * config/tc-sh.c (sh_do_align): Align to a 2 byte boundary before
inserting nop instructions.
PR 8974.
1996-02-12 05:12:40 +00:00
Ian Lance Taylor 3e1c964dfa * config/te-aux.h: Change include of aux.h to aux-coff.h. 1996-02-09 15:55:06 +00:00
Ian Lance Taylor d782e3cc8f * config/tc-i960.c (tc_coff_symbol_emit_hook): Correct storage
class setting for a CALLNAME symbol in COFF.
1996-02-09 01:29:59 +00:00
Ian Lance Taylor 4080c27065 * read.c (potable): Pass negative numbers for new .balign[wl] and
.p2align[wl] pseudo-ops.
	(s_align_bytes): Treat a negative argument as specifying the fill
	length.
	(s_align_ptwo): Likewise.
1996-02-09 01:04:21 +00:00
Ian Lance Taylor 71dd3c40ca * read.c (potable): Add balignw, balignl, p2alignw, and p2alignl.
(do_align): Take new len parameter.  Change all callers.  Pass it
	to md_do_align.
	(s_align_bytes): Arg now indicates the length of the fill pattern.
	(s_align_ptwo): Likewise.
	* config/obj-coff.c (write_object_file): Pass length to
	md_do_align.
	* config/tc-i386.h (md_do_align): Take new len parameter.
	* config/tc-m88k.h (md_do_align): Likewise.
	* config/tc-m88k.c (m88k_do_align): Likewise.
	* config/tc-sh.h (md_do_align): Likewise.
	* config/tc-sh.c (sh_do_align): Likewise.
	* doc/as.texinfo: Document new pseudo-ops.

	* config/obj-coff.c (fixup_mdeps): Divide offset by fr_var, as is
	done in cvt_frag_to_fill.
PR 8974.
1996-02-08 00:22:02 +00:00
Ian Lance Taylor 9addcbb182 * config/tc-sh.h (sh_do_align): Declare.
(md_do_align): Define.
	* config/tc-sh.c (sh_do_align): New function.
PR 8974.
1996-02-07 22:00:28 +00:00
Ian Lance Taylor c15ea23aaf * ecoff.c (ecoff_build_lineno): Don't try to store the address
difference if the next address is before the current one.
1996-02-07 20:20:56 +00:00
Ian Lance Taylor 9e64486e44 * config/tc-m68k.c (struct m68k_cpu): Add alias field.
(archs): Initialize new field.
	(m68k_ip): Don't list alias names when listing CPUs which support
	an instruction.
1996-02-07 19:35:15 +00:00
Ian Lance Taylor 1c9dbb83f1 * configure.in: Check for --enable-shared. If linking against
shared BFD and opcodes, fix library name on SunOS, and try to set
	-rpath reasonably.
	* configure: Rebuild.
1996-02-07 19:13:20 +00:00
Ian Lance Taylor f9e90c2ec6 * config/tc-i960.c (ARCH_HX): Define.
(arch_tab): Add HX.
	(targ_has_sfr): Handle ARCH_HX.
	(targ_has_iclass): Handle ARCH_HX.
	(tc_coff_fix2rtype): Add return 0 to avoid warning.
	(tc_headers_hook): If the architecture was specified explicitly,
	use it when setting the flags.  Set the extern variable coff_flags
	rather than headers->filehdr.f_flags, since the latter is set
	unconditionally in obj-coff.c.
	(i960_handle_align): Remove unused variable fixp.
1996-02-05 23:52:42 +00:00
Ian Lance Taylor dd1d79e8b9 Support for building bfd and opcodes as shared libraries, based on
patches from Alan Modra <alan@spri.levels.unisa.edu.au>:
	* configure.in: Set OPCODES and BFD to search directories.
	Substitute OPCODES_DEP and BFDDEP.  On SunOS, set HLDFLAGS.
	* configure: Rebuild.
	* Makefile.in (LDFLAGS, HLDFLAGS): New variables.
	(LIBDEPS): New variable.
	(as.new0: Depend upon $(LIBDEPS) rather than $(LIBS).  Use
	$(HLDFLAGS) in link.
	(check): Set LD_LIBRARY_PATH in the environment.
1996-02-05 21:32:01 +00:00
Ian Lance Taylor e277d131e8 Fri Feb 2 14:09:25 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
* Makefile.in (INSTALL_XFORM): Remove -e.
1996-02-02 19:10:33 +00:00
Ian Lance Taylor e24cf2b556 * write.c (write_relocs): Use S_IS_DEFINED and S_IS_COMMON rather
than comparing S_GET_SEGMENT to undefined_section.
	(write_object_file): Skip symbols which were equated to an
	undefined or common symbol.
	* symbols.c (resolve_symbol_value): Use S_IS_DEFINED and
	S_IS_COMMON rather than comparing S_GET_SEGMENT to
	undefined_section.
	(S_GET_VALUE): Likewise.  Avoid recursion problems if S_IS_DEFINED
	or S_IS_COMMON call S_GET_VALUE.
	* config/obj-aout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
	* config/obj-aout.c (obj_emit_relocations): If a reloc is equated
	to an undefined or common symbol, convert the reloc to be against
	the target symbol.
	(obj_crawl_symbol_chain): Skip symbols which were equated to an
	undefined or common symbol.
	* config/obj-bout.h (S_IS_COMMON): Define if not BFD_ASSEMBLER.
	* config/obj-bout.c (obj_emit_relocations): If a reloc is equated
	to an undefined or common symbol, convert the reloc to be against
	the target symbol.
	(obj_crawl_symbol_chain): Skip symbols which were equated to an
	undefined or common symbol.
	* config/obj-coff.c (do_relocs_for): Use S_IS_DEFINED and
	S_IS_COMMON rather than comparing S_GET_SEGMENT to
	undefined_section.
	(yank_symbols): Skip symbols which were equated to an undefined or
	common symbol.
1996-02-02 17:46:05 +00:00
Ian Lance Taylor 9e396994aa * config/obj-aout.h (S_IS_LOCAL): Check for \002 as well as \001.
* config/obj-bout.h (S_IS_LOCAL): Likewise.
1996-02-01 21:24:15 +00:00
Ian Lance Taylor 4d9e33e490 * configure.in: Make sure we only add m68k-parse.o to
${extra_objects} once, no matter how many m68k targets have been
	enabled.
	* configure: Rebuild.
1996-02-01 20:36:23 +00:00
Steve Chamberlain 0ff513d912 * configure.in (i386-*-cygwin32, ppc-*-cygwin32): New.
* configure: Rebuild.
1996-02-01 02:42:51 +00:00
Ian Lance Taylor 615c0a79da * config/obj-coff.h (S_IS_LOCAL): Check for \001 as well as \002. 1996-01-31 22:40:55 +00:00
Ian Lance Taylor c174fb5c71 Wed Jan 31 14:03:17 1996 Richard Henderson <rth@tamu.edu>
* config/tc-m68k.c (md_pseudo_table): Add "extend" and "ldouble".
	* doc/c-m68k.texi: Document .extend and .ldouble.
1996-01-31 19:31:29 +00:00
Ian Lance Taylor 66b935dace Wed Jan 31 14:03:17 1996 Richard Henderson <rth@tamu.edu>
* configure.in (m68*-apple-aux*): New target.
	* config/te-aux.h: New file.
	* config/obj-coff.c (compare_external_relocs): New static function
	if TE_AUX.
	(do_relocs_for): Sort relocs if TE_AUX.
	(fixup_segment): If TE_AUX, store common symbol value in segment.
	* config/tc-m68k.h (TARGET_FORMAT): Define if TE_AUX.
1996-01-31 19:06:17 +00:00
Ian Lance Taylor 30c2a08e89 * config/tc-mips.c (s_mips_globl): Set BSF_OBJECT if it is not
BSF_FUNCTION.
	(s_cpload): Set BSF_OBJECT for _gp_disp symbol.
	* read.c (s_lcomm): If S_SET_SIZE is defined, set the size of the
	symbol.
	* ecoff.c (add_procedure): Set the BSF_FUNCTION flag.
	(ecoff_build_symbols): If S_SET_SIZE is defined, set the size of
	an undefined symbol and the size of a function symbol.
	* config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
	for all common symbols.
1996-01-31 17:28:44 +00:00
Ken Raeburn 0e6f2f82d2 * config/tc-i960.c (parse_memop): In MRI mode, don't use implicit scaling of
index.

* expr.c (operand): Accept 0x hex constants in MRI mode if not on m68k.

(PR 8836)
1996-01-30 18:12:41 +00:00
Ian Lance Taylor 3e78d07241 * config/obj-elf.c (obj_elf_type): Set BSF_OBJECT flag for a type
of object.  From Ronald F. Guilmette <rfg@monkeys.com>.
1996-01-29 22:11:12 +00:00
Ian Lance Taylor 8e3ff08126 * ecoff.c (localsym_t): Add addend field.
(add_ecoff_symbol): Add addend argument.  Change all callers.
	(coff_sym_value): Make static.
	(coff_sym_addend): New static variable.
	(ecoff_directive_def): Initialize coff_sym_addend.
	(ecoff_directive_val): Accept symbol + constant.
	(ecoff_directive_endef): Pass coff_sym_addend to add_ecoff_symbol.
	(ecoff_build_symbols): Include the addend in the symbol value.
1996-01-29 17:25:26 +00:00
Kim Knuttila 79edc8468f Ignore overflow on toc relocs 1996-01-27 00:31:16 +00:00
David Edelsohn 6cbc4e35bd * config/tc-sparc.c (default_compatible): New static local.
(md_begin): Initialize it.  Rewrite warn_on_bump handling.
	(sparc_ip): If no architecture or -bump specified, don't mark as
	mismatched those in default_compatible.
1996-01-26 04:37:04 +00:00
Ian Lance Taylor 4fe0fdddfb SCO ELF support from Robert Lipe <robertl@arnet.com>:
* configure.in (i386-*-sco*elf*): Use fmt elf, targ sco5.
	* configure: Rebuild.
	* config/sco5.mt: New file; set TDEFINES to -DSCO_ELF.
	* config/tc-i386.c (sco_id): New function, if SCO_ELF.
	* config/tc-i386.h (tc_init_after_args): Define if SCO_ELF.
	(sco_id): Declare if SCO_ELF.
1996-01-25 17:25:25 +00:00
David Edelsohn e70ad5d561 * config/tc-sparc.c (initial_architecture,can_bump_v9_p): Deleted.
({max,warn_after}_architecture): New static locals.
	(md_begin): Replace NUMOPCODES with sparc_num_opcodes.
	If both architecture and -bump requested, set max_architecture to max.
	(sparc_md_end): Simplify.
	(sparc_ip): Replace references to can_bump_v9_p with max_architecture.
	Rewrite code to bump architecture and check for conflicts.
	(md_longopts): Recognize -xarch={v8plus,v8plusa} for compatibility
	with Solaris assembler.
	(md_parse_option): Likewise.  Call sparc_opcode_lookup_arch.
	(md_show_usage): Update.
1996-01-25 11:20:06 +00:00
David Edelsohn a82488318b * Makefile.in (RUNTEST): Fix reference to $${srcdir}. 1996-01-25 06:11:23 +00:00
David Edelsohn 7fcb31916d * conf.in: Regenerated. 1996-01-22 19:25:36 +00:00
Ian Lance Taylor 16ce20d4d7 * symbols.c (resolve_symbol_value): If a symbol is equated to an
undefined symbol, preserve the X_op of O_symbol.
	(S_GET_VALUE): Fix check to permit this case.
	* write.c (write_relocs): If a reloc is against an undefined
	symbol equated to another symbol, change the reloc to be against
	the latter symbol.
	* config/obj-coff.c (do_relocs_for): Likewise.
If the MRI assembler sees
foo EQU bar
	call foo
where bar is not defined, it generates a reloc against bar rather than
against foo.  Since the gas documentation does not define this case,
this change makes gas compatible.
1996-01-22 18:00:01 +00:00
David Edelsohn 6df07e7f7e * config/tc-sparc.h (TARGET_FORMAT): Use #ifdef SPARC_ARCH64 instead of
#ifdef sparcv9 when choosing value.
	(ENV64): Delete.
	(md_end): Define.
	(sparc_md_end): Declare.
	* config/tc-sparc.c (SPARC_V9): Renamed from sparcv9.
	(initial_architecture): New static local.
	(can_bump_v9_p): Likewise.
	(NO_V9): Delete all occurrences.
	(sparc_md_end): New function.
	(sparc_ip): New local v9_arg_p.  Rework fp reg number test.
	Don't bump architecture to v9 unless can_bump_v9_p set.
	(md_parse_option): -A<arch> passed, set can_bump_v9_p accordingly.
	* configure.in (sparc64 target cpu): Don't set obj_format here.
	(SPARC_V9): Renamed from sparcv9.
	(sparc64-*-elf*): Define SPARC_ARCH64.
	* configure: Regenerated.
	* acconfig.h (SPARC_V9): Renamed from sparcv9.
	(SPARC_ARCH64): Add.
	* config/vmsconf.h: Update.
1996-01-22 17:53:34 +00:00
Jackie Smith Cashion c9c7c1d777 Mon Jan 22 17:24:47 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-mips.c (load_register): Optimise "dli" loads.
	(md_show_usage): add "-mcpu=vr4100" to help text.

Provide code to check for either the hi32, or lo32 bits of a 64bit
"dli" constant being 0xffffffff. Also for bit15 of a 16bit constant
being set, so that sign-extension can be used to fill the higher order
bits if required.
1996-01-22 17:30:23 +00:00
Ian Lance Taylor 07ce72c9bb * config/tc-ppc.c (ppc_csect): An unnamed csect is storage class
XMC_PR.
1996-01-22 16:53:42 +00:00
Michael Meissner d971d39e46 Add support for eabi relocations and sections 1996-01-22 16:02:29 +00:00
Kim Knuttila 0291f0f543 Changed alignment on .pdata and .reldata 1996-01-18 23:03:48 +00:00
Michael Meissner c682be533c Add more relocation suffixes 1996-01-15 22:46:10 +00:00
Michael Meissner ee4fdbb93d Allow .gcc_except_table to have unfixed pointers with -mrelocatable 1996-01-15 02:34:07 +00:00
Michael Meissner 747b98fe5d Make elf section functions ELF specific 1996-01-13 16:10:33 +00:00
Ian Lance Taylor 2a4e49a925 * subsegs.c (section_symbol): Don't try to look up the section
symbol in the hash table.  It should be possible to have a symbol
	with the same name as a section, but no connection to it.
1996-01-12 21:11:43 +00:00
Michael Meissner f99d287b2a Add support for exclude section flag and ordered section type 1996-01-12 20:35:38 +00:00
Ian Lance Taylor d9f4dec191 * read.c (cons_worker): Only call mri_comment_end from flag_mri.
From James Carlson <carlson@xylogics.com>.
1996-01-12 17:10:24 +00:00
Ian Lance Taylor 347a705b78 * expr.c (operand): Skip whitespace after a close parenthesis.
From James Carlson <carlson@xylogics.com>.
1996-01-12 17:07:04 +00:00
Jim Wilson 10c8c95ec0 For SH port, make relocation overflow an error instead of a warning. 1996-01-02 20:45:49 +00:00
Jeff Law cb84431489 * ecoff.c (ecoff_stab): Simplify. Correctly handle sym + offset
addresses for static variables.
So we can access statics in the static block on mips/alpha when using
gas.
1995-12-31 06:41:24 +00:00
Michael Meissner 36cb0e7c73 Make @got be real GOT reloc; make @xgot be old TOC16 reloc 1995-12-21 17:54:31 +00:00
Ian Lance Taylor 5e69b693c9 * config/tc-mips.c (load_address): Correctly handle a constant in
SVR4_PIC case.  From Richard Kenner <kenner@vlsi1.ultra.nyu.edu>.
1995-12-20 19:56:41 +00:00
J.T. Conklin 29861dd01a * config/tc-sh.c (parse_reg): Recognize SH3 registers.
(get_specific): Handle A_SSR, A_SPC and A_REG_B.
(build_Mbytes): Handle REG_B.
1995-12-15 22:30:33 +00:00
Ian Lance Taylor 432b8fa87a * ecoff.c (ecoff_build_aux): Use new bfd_big_endian macro. 1995-12-15 21:12:36 +00:00
Raymond Jou ee68a042d2 * mpw-make.sed: If linking, edit ALL_CFLAGS to CFLAGS. 1995-12-15 20:17:52 +00:00
Ian Lance Taylor b14630f2df * config/obj-coff.c (write_object_file): Set the s_align field to
the number of bytes, rather than to the power of 2.
PR 8674, 8678.
1995-12-14 20:12:31 +00:00
Ian Lance Taylor 4a3d48fc1e * Makefile.in (DISTCLEAN_HERE): New variable.
(distclean): Use it.
	(maintainer-clean): Depend upon clean-here rather than clean,
	distclean, and clean-info.  Run make maintainer-clean in doc.
	Remove files listed in DISTCLEAN_HERE.
	* doc/Makefile.in (maintainer-clean realclean): Split out from
	distclean.  Depend upon clean-info and distclean.
1995-12-12 17:21:31 +00:00
Stan Shebs 7e5e83cfb4 * mac-as.r: Fix copyright and version strings.
(cfrg): Use PROG_NAME instead of literal name.
1995-12-12 00:27:29 +00:00
Ian Lance Taylor 1b10f50d90 * read.c (read_a_source_file): If tc_unrecognized_line is defined,
call it.
	* config/tc-a29k.h (tc_unrecognized_line): Define.
	* config/tc-a29k.c (a29k_unrecognized_line): New function.
	(md_operand): Handle a29k style local dollar labels.
1995-12-11 19:23:10 +00:00
Ian Lance Taylor 2f3bbb1b70 * config/obj-multi.h: If OBJ_MAYBE_ELF, define OBJ_SYMFIELD_TYPE. 1995-12-07 02:04:14 +00:00
Ken Raeburn 624c91d1e7 * read.c (s_fill): If md_flush_pending_output is defined, call it. 1995-12-05 22:28:25 +00:00
Ken Raeburn 9e4b3a2329 * config/obj-coff.c (size_section, fill_section, fixup_mdeps): Treat
rs_align_code like rs_align.
1995-12-04 23:11:02 +00:00
David Edelsohn 3554987a2f * config/tc-arm.c (cp_address_required_here): Set pre_inc when
converting an absolute address into a PC-relative one.
1995-12-03 23:26:32 +00:00
Stan Shebs 90f543f684 * mpw-config.in: Don't always use te-generic.h for emulation.
(powerpc-apple-macos): Use emulation te-macos.h.
start-sanitize-gm
	(mips-gm-magic): New configuration.
end-sanitize-gm
	* mpw-make.sed (install, install-only): Edit in Mac-specific
	install procedure.
1995-12-01 22:40:56 +00:00
Ian Lance Taylor 2eec871057 * configure.in: Improve message about unsupported ELF targets.
* configure: Rebuild.
1995-12-01 19:38:40 +00:00
Ian Lance Taylor d4c8a45ee7 * config/tc-m88k.c (m88k_do_align): Correct check for whether fill
pattern is zero.  From Manfred Hollstein.
1995-12-01 15:56:25 +00:00
Kim Knuttila 531a1af274 idata alignment in .s files 1995-11-30 18:47:11 +00:00
Ian Lance Taylor 464070de43 Thu Nov 30 11:23:42 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
* config/obj-coff.c (fixup_segment): If TC_M88K is defined, do not
	add section's paddr to add_number; compatibility to native as and
	ld forbids.
1995-11-30 16:25:27 +00:00
Ken Raeburn 9d5aef8075 configure.in: handle m68k-sysv4 correctly 1995-11-30 04:24:08 +00:00
Ken Raeburn ac9ef8eef1 Move struct hash_entry from hash.h to hash.c. 1995-11-30 04:22:27 +00:00