Commit Graph

43 Commits

Author SHA1 Message Date
Ken Raeburn ade614d507 (tc_gen_reloc): Use bfd_get_reloc_code_name in error message. 1994-09-07 23:58:32 +00:00
Ken Raeburn 5e0a90a8d7 * tc-sparc.c (sparc_ip): Check more carefully for conflicting architectures.
(md_parse_option) [NO_V9]: Complain if v9 was selected.
(md_show_usage): Derive architecture list in usage message from
architecture_pname array.
(cypress): Macro deleted.
(op_hash): Don't initialize.
(s_common): Use bfd_und_section_ptr instead of bfd_und_section.
(BSR): New function.
(sparc_ip): Use it for right-shift operations of 32 bits or more.
(sparc_ip): Implement new operand type 'x'.
1994-07-28 23:36:16 +00:00
David MacKenzie f3d817d8b7 * as.c (show_usage): Remove target specific messages;
instead, call md_show_usage.
	(parse_args): Use getopt_long_only.  Take pointers to argc and
	argv.
	(main): Pass parse_args pointers.
	* as.h: Remove 3 variables that are redundant with flagseen.
	* as.c, messages.c: Change their users to use flagseen.
	Define getopt stuff.
	* tc.h: Update md_parse_option decl.  Add md_show_usage decl.
	* config/tc-*.c: Add md_shortopts, md_longopts,
	md_longopts_size, md_show_usage.  Change calling convention for
	md_parse_option.  Remove md_parse_long_option.
	* config/tc-ns32k.c: Rename `struct option' to `struct ns32k_option'.
	* config/tc-i386.h: Don't define md_parse_option.
1994-06-03 17:42:27 +00:00
Ken Raeburn c06e55d99a changes from gas-2.3/binutils-2.4 dist (details in branch log msgs, changelogs) 1994-05-27 16:58:05 +00:00
Ian Lance Taylor f9c57637e4 * config/tc-sparc.c (md_section_align): Don't change the size if
OBJ_ELF.
1994-05-19 19:44:02 +00:00
Ken Raeburn a7129c48cf (s_reserve): If section passed isn't bss, don't spew remainder of input file in
error message.
(tc_gen_reloc): If bfd_reloc_type_lookup returns null, print error
message with reloc type and try to process remainder of file.
1994-04-05 18:16:37 +00:00
Ian Lance Taylor 7ab2e983d6 * config/tc-sparc.c (tc_gen_reloc): Add a gruesome hack to get
cross section PC relative relocs right for COFF and ELF.
1994-03-31 21:54:06 +00:00
Ken Raeburn fd0e2cf2d5 fix sparc-solaris reloc bug 1994-01-06 23:17:44 +00:00
Ken Raeburn c999fd9fc2 * config/tc-vax.c (tc_aout_fix_to_chars): Local variable NBYTES_R_LENGTH now
const.

* config/obj-*.c, config/tc-*.c: Omit superfluous "return" statements at ends
of functions.  Don't check for null return from hash_new, since it won't return
at all if there's no memory available.  Also, check for null return from
hash_insert, rather than zero-length string, as success indicator.
1993-12-16 21:31:22 +00:00
Ian Lance Taylor 9b2fd75ba1 * config/tc-sparc.c (sparc_ip): Use strtol to parse membar
argument, to permit hexadecimal numbers.
1993-10-25 18:08:33 +00:00
Ken Raeburn 9b6a882eeb * config/tc-sparc.h: Removed remaining non-BFD_ASSEMBLER code.
* config/tc-sparc.c: Ditto.
(tc_gen_reloc): Include fx_offset for pcrel fixups.
1993-10-25 17:45:17 +00:00
Ian Lance Taylor 7766838e96 * config/tc-sparc.c (md_parse_option): Accept and ignore -sparc
option, which is used by the SunOS make default .s.o rule.
1993-10-21 19:50:57 +00:00
Ian Lance Taylor 58d4951d00 gcc lint. See ChangeLog for details. Also:
* config/obj-elf.h (S_SET_SIZE): Actually set the size.
1993-09-10 16:01:07 +00:00
Ken Raeburn 9242112213 (md_apply_fix): Fill in values for BFD_RELOC_{32,64}, not zeros.
(md_pseudo_table): Handle .uaxword.
1993-08-06 16:10:40 +00:00
Ken Raeburn 693b21e75a * obj-elf.c (obj_elf_stab_generic, in disabled code): If
debug section is new, allocate an extra 12 bytes at its start.  If
".stabs" type is N_SO, fill in filename symbol field of that first
entry.  Return early if "goof", to simplify later code slightly.
(adjust_stab_sections): New function.
(elf_frob_file): Apply adjust_stab_sections to each section.

* obj-elf.c (obj_elf_section, obj_elf_previous): No longer static.
* obj-elf.h (obj_elf_section, obj_elf_previous): Declare.
* tc-sparc.c (md_pseudo_table): Call them for "pushsection"
and "popsection", and call cons for "uaword" and "uahalf".

* obj-elf.c (obj_elf_version): Use English in error messages.

* tc-sparc.c (md_apply_fix, case BFD_RELOC_64): New case,
parallel to BFD_RELOC_32.
(tc_gen_reloc): Accept BFD_RELOC_64.
1993-08-04 23:10:43 +00:00
Ian Lance Taylor 5ac34ac37e * Extensive changes to permit symbols to contain any expression
type and to delay the computation of the expression until the
	value is actually needed.  This permits setting symbols to values
	calculated based on object code size.  Expressions were changed to
	no longer be in a section, to stop the overloading of segment and
	expression type that previously occurred.

	* as.c (big_section, pass1_section, diff_section, absent_section):
	Removed.
	(expr_section): Added (used for dummy symbols which hold
	intermediate expression values).
	(perform_an_assembly_pass): Create expr_section, do not create the
	sections now removed.
	* as.h (segT): Removed SEG_ABSENT, SEG_PASS1, SEG_BIG, and
	SEG_DIFFERENCE.  Added SEG_EXPR.
	(SEG_NORMAL): Corresponding changes.
	* subsegs.c (seg_name, subsegs_begin): Changed accordingly.
	* write.c (write_object_file): Ditto.
	* config/obj-aout.c (seg_N_TYPE): Ditto.
	* config/obj-bout.c (seg_N_TYPE): Ditto.
	* config/obj-coff.c (seg_N_TYPE): Ditto.
	* config/obj-coffbfd.c (seg_N_TYPE): Ditto.
	* config/obj-vms.c (seg_N_TYPE): Ditto.

	* expr.h (operatorT): Moved in from expr.c, added some values.
	(expressionS): Added X_op field, removed X_seg field; renamed
	X_subtract_symbol to X_op_symbol.
	* expr.c: Extensive changes to assign expression types rather than
	sections and to simplify the parsing.
	* write.c (fix_new_internal): New static function.
	(fix_new): Removed sub_symbol argument.
	(fix_new_exp): New function, takes expression argument.
	* write.h: Prototype changes for fix_new and fix_new_exp.
	* cond.c (s_if): Changed accordingly.
	* read.c (s_lsym, pseudo_set, emit_expr, parse_bitfield_cons,
	parse_repeat_cons, get_segmented_expression,
	get_known_segmented_expression, get_absolute_expression): Ditto.
	* symbols.c (resolve_symbol_value, S_GET_VALUE, S_SET_VALUE):
	Ditto.
	* write.c (write_object_file): Ditto.
	* config/obj-coff.c (obj_coff_def, obj_coff_val): Ditto.
	* config/obj-coffbfd.c (obj_coff_def, obj_coff_val,
	obj_coff_endef, yank_symbols): Ditto.
	* config/obj-elf.c (obj_elf_stab_generic, obj_elf_size): Ditto.
	* config/tc-a29k.c (md_assemble, parse_operand, machine_ip,
	print_insn, md_operand): Ditto.
	* config/tc-h8300.c (parse_exp, colonmod24, check_operand,
	do_a_fix_imm, build_bytes): Ditto.
	* config/tc-h8500.c (parse_exp, skip_colonthing, parse_reglist,
	get_specific, check, insert, md_convert_frag): Ditto.
	* config/tc-hppa.c (the_insn, fix_new_hppa, cons_fix_new_hppa,
	md_assemble, pa_ip, getExpression, getAbsoluteExpression,
	evaluateAbsolute, pa_build_unwind_subspace, pa_entry,
	process_exit): Ditto.
	* config/tc-hppa.h (STAB_FIXUP, is_DP_relative, is_PC_relative,
	is_complex): Ditto.
	* config/tc-i386.c (pe, md_assemble, i386_operand,
	md_estimate_size_before_relax, md_create_long_jump): Ditto.
	* config/tc-i860.c (md_assemble, getExpression, print_insn):
	Ditto.
	* config/tc-i960.c (parse_expr, subs, segs, md_convert_frag,
	get_cdisp, mem_fmt, parse_ldconst, relax_cobr, s_sysproc,
	i960_handle_align): Ditto.
	* config/tc-m68k.c (struct m68k_exp, struct m68k_it, seg, op,
	subs, add_fix, isvar, m68k_ip, md_assemble, md_convert_frag_1,
	md_estimate_size_before_relax, md_create_long_jump, get_num):
	Ditto.
	* config/tc-m88k.c (md_assemble, get_imm16, get_pcr,
	md_create_short_jump, md_create_long_jump): Ditto.
	* config/tc-mips.c (md_assemble, append_insn, gp_reference,
	macro_build, macro, my_getExpression): Ditto.  Also removed
	get_optional_absolute_expression; just use get_absolute_expression
	instead.
	* config/tc-ns32k.c (get_addr_mode, evaluate_expr, convert_iif,
	fix_new_ns32k, fix_new_ns32k_exp, cons_fix_new_ns32k): Ditto.
	* config/tc-ns32k.h (fix_new_ns32k prototype): Ditto.
	* config/tc-sh.c (parse_exp, check, insert, md_convert_frag):
	Ditto.
	* config/tc-sparc.c (md_assemble, sparc_ip, getExpression,
	print_insn): Ditto.
	* config/tc-tahoe.c (struct top, md_estimate_size_before_relax,
	tip_op, md_assemble): Ditto.
	* config/tc-vax.c (seg_of_operand, md_assemble,
	md_estimate_size_before_relax, md_create_long_jump): Ditto.
	* config/tc-z8k.c (parse_exp, check_operand, newfix): Ditto.
1993-07-21 00:41:42 +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
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
Ken Raeburn 125f0b0d84 (sparc_ip): Initialize `len' variable to make gcc shut up.
(md_create_short_jump, md_create_long_jump, md_number_to_chars,
md_section_align): Adjusted for new interface.

(s_reserve): Permit use for other than a.out format.
(s_common): Handle Solaris-2 version.

(s_xword): For numbers, call big_cons.
(sparc_ip, md_apply_fix, tc_gen_reloc): Handle some sparc64 reloc types.
(md_number_to_chars): Handle 8-byte values.
1993-07-07 16:58:29 +00:00
Ken Raeburn ed9638af53 (tc_gen_reloc): Handle BFD_RELOC_SPARC_WDISP22 relocation.
(s_local) [OBJ_ELF]: New function.
(md_pseudo_table) [OBJ_ELF]: Call it for "local".
(s_common): Rearrange to handle Solaris .common pseudo, which may sometimes use
bss space instead of common.
(md_parse_option) [OBJ_ELF]: Print version id for -V.  Ignore -Q and -s options
for now.
1993-06-25 09:51:47 +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
Jim Wilson 8fc0776d4e For SPARC V9, for RELOC_WDISP2_14, upper 2 bits start at bit 20 now, instead
of bit 19.
1992-12-15 03:46:14 +00:00
Jim Wilson 0d44b3d1f0 For SPARC V9, change icc to %icc, xcc to %xcc, fccX to %fccX. 1992-11-23 23:40:18 +00:00
Ken Raeburn 355afbcd8b Ran "indent", for GNU coding style; some code & comments still need fixup.
Removed some unneeded files.

obj-coff.c (obj_coff_endef): Use as_warn, not fprintf.
tc-m68k.c (md_assemble): 68000+68881 is okay -- could be emulating.
1992-11-23 20:42:33 +00:00
Jim Wilson 0cef0e20f9 Flag error if absolute constant is too large for an immediate field. 1992-11-06 01:59:36 +00:00
Jim Wilson 71703b0735 Update to SPARC Version 9 Draft 1.0.4. 1992-08-31 17:14:50 +00:00
Ken Raeburn 680227f309 fix for pr1371: heed fx_offset in pcrel relocs 1992-08-01 23:20:55 +00:00
K. Richard Pixley 542e1629fd fighting bitrot in a major way 1992-02-17 15:54:49 +00:00
K. Richard Pixley a87b326934 White space and comment changes, and #ifdef __STDC__ becomes #if
__STDC__ == 1.
1992-02-15 21:09:34 +00:00
K. Richard Pixley 8b228fe958 force all files to end in "/* end of filename" 1992-02-13 09:13:54 +00:00
K. Richard Pixley a39116f1c9 White space and comments only. The devo tree prior to this delta is
tagged as "vanilla" for your convenience.

There are also some comment changes.
1992-02-13 08:33:54 +00:00
K. Richard Pixley 584a0f78d9 rcsid's removed 1992-01-28 20:38:08 +00:00
K. Richard Pixley 60b6e7da1f Corrected relocation overflow checks. 1991-08-15 20:34:42 +00:00
K. Richard Pixley ac1ac0cd4f Abort()'s become as_fatal()'s. 1991-08-15 19:38:52 +00:00
K. Richard Pixley a79c6033ed * no more relocation_info structures. We now squirt directly from
fixS's.

* i960-bout and i960-coff "tested" against their predecessors.
1991-08-14 00:26:06 +00:00
Jim Wilson 116a34785a Ifdef out bogus `relocation overflow' tests. 1991-07-10 13:18:07 +00:00
K. Richard Pixley 9b856b4f9c more v9 fixes. This time %hhi() and %hlo(). 1991-07-10 02:45:05 +00:00
K. Richard Pixley 6321e9eaf5 Changes for v9 gas. 1991-06-20 21:47:57 +00:00
K. Richard Pixley afe3b66847 Add sanitize trigger lines. 1991-05-23 17:14:50 +00:00
K. Richard Pixley 839df5c343 v9 stuff. 1991-05-22 01:18:42 +00:00
K. Richard Pixley 8fb360783f Fixed LOCAL_LABELS_FB bug. 1991-04-11 00:13:41 +00:00
K. Richard Pixley fecd2382e7 Initial revision 1991-04-04 18:19:53 +00:00