Commit Graph

39 Commits

Author SHA1 Message Date
Nick Clifton 329e276daf Add support for a -g switch to GAS 2004-08-17 12:19:58 +00:00
Nick Clifton e59763172f Remove duplicate code and provide a function for generating internally consistent 'value out of range' messages 2004-05-06 11:01:48 +00:00
Kazu Hirata 436d9e4643 * README-vms: Fix comment typos.
* as.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* ecoff.c: Likewise.
	* hash.c: Likewise.
	* listing.c: Likewise.
	* write.c: Likewise.
2003-11-23 02:14:21 +00:00
Kazu Hirata 73ee5e4c0f * app.c: Convert to ISO-C.
* as.h: Likewise.
	* atof-generic.c: Likewise.
	* bignum-copy.c: Likewise.
	* bignum.h: Likewise.
	* cgen.c: Likewise.
	* cgen.h: Likewise.
	* cond.c: Likewise.
2003-11-21 01:52:16 +00:00
Kazu Hirata 47eebc207f * ChangeLog: Fix typos.
* ChangeLog-9295: Likewise.
	* as.c: Fix comment typos.
	* as.h: Likewise.
	* atof-generic.c: Likewise.
	* bit_fix.h: Likewise.
	* frags.h: Likewise.
	* hash.c: Likewise.
	* input-file.c: Likewise.
	* input-scrub.c: Likewise.
	* itbl-ops.c: Likewise.
	* itbl-parse.y: Likewise.
	* listing.c: Likewise.
	* macro.h: Likewise.
	* read.c: Likewise.
	* sb.c: Likewise.
	* sb.h: Likewise.
	* symbols.c: Likewise.
	* symbols.h: Likewise.
2003-10-27 12:45:17 +00:00
Nick Clifton 05da430218 * as.c (use_gnu_debug_info_extensions) : New variable.
(parse_args) : Accept new --gstabs+ option, and set `use_gnu_debug_info_extensions'.
 (show_usage) : Document --gstabs+ option.
* as.h (use_gnu_debug_info_extensions) : New extern declaration.
* stabs.c (stabs_generate_asm_file) : If `use_gnu_debug_info_extensions' is set
  add the compilation directory to the stabs debug info.
* doc/as.texinfo : Document --gstabs+ option.
* NEWS: Mention new feature.
2003-10-08 14:37:20 +00:00
Jakub Jelinek 68d55fe3f0 * as.c (show_usage): Document --execstack and --noexecstack.
(parse_args): Add --execstack and --noexecstack.
	(main): Create .note.GNU-stack section if --execstack or
	--noexecstack was given on comand line, set its SHF_EXECINSTR bit.
	* as.h (flag_execstack, flag_noexecstack): New.
2003-06-04 16:54:45 +00:00
Alan Modra 54cfded08e * dw2gencfi.c, dw2gencfi.h: New files.
* config/tc-i386.c (tc_x86_cfi_init): New function.
	* config/tc-i386.h (TARGET_USE_CFIPOP, tc_cfi_init): New defines.
	* as.c (parse_args): Set verbose flag on --verbose.
	(main): Call tc_cfi_init()/cfi_finish().
	* as.h (verbose): New external variable.
	* read.c (pobegin): Insert CFI pops to the list.
	* symbols.c (local_symbol_make): Make symbol external.
	* symbols.h (local_symbol_make): New prototype.
	* Makefile.am: Add dw2gencfi.[ch] files.  Run "make dep-am".
	* Makefile.in: Regenerate.
	* doc/as.texinfo: Added node "CFI directives" with description of
	all implemented .cfi_* directives.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2003-05-20 07:58:07 +00:00
Alan Modra 1d3b2b274b Update copyright date 2003-01-24 01:12:30 +00:00
Alan Modra ae6063d440 * symbols.c (S_FORCE_RELOC): Add "strict" param.
* symbols.h (S_FORCE_RELOC): Likewise.
	* config/obj-aout.h (S_FORCE_RELOC): Likewise.
	* config/obj-bout.h (S_FORCE_RELOC): Likewise.
	* config/obj-coff.h (S_FORCE_RELOC): Likewise.
	* config/obj-ieee.h (S_FORCE_RELOC): Likewise.
	* config/obj-vms.h (S_FORCE_RELOC): Likewise.
	* write.c (generic_force_reloc): New function.
	(TC_FORCE_RELOCATION): Use it here instead of S_FORCE_RELOC.
	(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
	(adjust_reloc_syms): Adjust S_FORCE_RELOC call.
	* as.h (generic_force_reloc): Declare.
	* doc/internals.texi (S_FORCE_RELOC): Update.
	(TC_FORCE_RELOCATION_SUB_SAME): Update.

	* config/tc-alpha.c (alpha_force_relocation): Adjust to use
	generic_force_reloc.
	(alpha_fix_adjustable): Likewise.
	* config/tc-arm.c (arm_force_relocation): Likewise.
	* config/tc-cris.c (md_cris_force_relocation): Likewise.
	* config/tc-frv.c (frv_force_relocation): Likewise.
	* config/tc-i386.c (md_apply_fix3): Likewise.
	* config/tc-ia64.c (ia64_force_relocation): Likewise.
	* config/tc-ip2k.c (ip2k_force_relocation): Likewise.
	* config/tc-m32r.c (m32r_force_relocation): Likewise.
	* config/tc-m68hc11.c (tc_m68hc11_force_relocation): Likewise.
	* config/tc-mcore.c (mcore_force_relocation): Likewise.
	* config/tc-mips.c (mips_force_relocation): Likewise.
	* config/tc-mmix.c (mmix_force_relocation): Likewise.
	* config/tc-ppc.c (ppc_force_relocation): Likewise.
	* config/tc-s390.c (tc_s390_force_relocation): Likewise.
	* config/tc-sh.c (sh_force_relocation): Likewise.
	(md_pcrel_from_section): Likewise.
	* config/tc-sparc.c (tc_gen_reloc): Likewise.
	* config/tc-v850.c (v850_force_relocation): Likewise.
	* config/tc-xstormy16.c (xstormy16_force_relocation): Likewise.
	* config/tc-i386.h (TC_FORCE_RELOCATION): Likewise.
	* config/tc-mcore.h (TC_FORCE_RELOCATION): Likewise.
	* config/tc-sparc.h (tc_fix_adjustable): Likewise.

	* config/tc-d10v.c (d10v_force_relocation): Delete.
	* config/tc-d10v.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-dlx.c (md_dlx_force_relocation): Delete.
	* config/tc-dlx.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-fr30.c (fr30_force_relocation): Delete.
	* config/tc-fr30.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-mn10300.c (mn10300_force_relocation): Delete.
	* config/tc-mn10300.h (TC_FORCE_RELOCATION): Don't define.
	(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
	* config/tc-i960.h (TC_FORCE_RELOCATION_SUB_SAME): Likewise.
	* config/tc-hppa.c (hppa_force_relocation): Adjust S_FORCE_RELOC call.
	* config/tc-mips.c (RELAX_BRANCH_TOOFAR): Warning fix.
	* config/tc-mips.h (TC_FORCE_RELOCATION_SUB_SAME): Don't define.
	* config/tc-openrisc.c (openrisc_force_relocation): Delete.
	* config/tc-openrisc.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-sparc.c (elf32_sparc_force_relocation): Delete.
	* config/tc-sparc.h (TC_FORCE_RELOCATION): Don't define for ELF.
	* config/tc-i386.c (i386_force_relocation): Delete.
	* config/tc-i386.h (TC_FORCE_RELOCATION): Don't define for
	BFD_ASSEMBLER.
	(EXTERN_FORCE_RELOC): Fix TE_PE and STRICT_PE_FORMAT nesting.
	* config/tc-m68k.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-pj.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-sh.h (TC_FORCE_RELOCATION_SUB_ABS): Don't call
	S_FORCE_RELOC.
	(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
	* config/tc-sh64.h (TC_FORCE_RELOCATION_SUB_SAME): Likewise.
2003-01-23 12:51:05 +00:00
Nick Clifton 177a493c21 Include fopen-bin.h not fopen-same.h for mingw32 hosts. 2003-01-22 10:10:25 +00:00
Alan Modra a161fe5320 gas reloc rewrite. 2002-09-05 00:01:18 +00:00
Alan Modra 29589b0c52 * Makefile.am (OBJS): Depend on ansidecl.h and fopen-same.h.
* Makefile.in: Regenerate.
	* dep-in.sed: Reorder to match OBJS in Makefile.am.
	* configure.in (ALL_OBJ_DEPS): Add symcat.h when need_bfd.
	* configure: Regenerate.
	* as.h: Use #include "" instead of <> for local header files.
	* flonum-konst.c: Likewise.
	* flonum-mult.c: Likewise.
	* gasp.c: Likewise.
	* listing.c: Likewise.
	* config/tc-ia64.h: Likewise.
	* config/tc-v850.h: Likewise.
2002-05-25 12:53:29 +00:00
Kazu Hirata d1a6c2428d * as.h: Fix formatting.
* cgen.c: Likewise.
	* cgen.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* frags.h: Likewise.
	* gasp.c: Likewise.
	* macro.c: Likewise.
	* read.c: Likewise.
	* stabs.c: Likewise.
	* symbols.c: Likewise.
2002-05-03 02:25:33 +00:00
H.J. Lu 3882b01078 Locale changes from Bruno Haible <haible@clisp.cons.org>. 2001-09-19 05:33:36 +00:00
Alan Modra fa6e93186b * as.h (alloca): Don't declare if __GNUC__. Remove an old comment.
Comment indentation of #pragma.
	* macro.c (alloca): Likewise.
2001-08-10 02:49:27 +00:00
Nick Clifton f7e42eb4af Fix copyright notices 2001-03-08 23:24:26 +00:00
Nick Clifton 0d2bcfafbf Updated ARC assembler from arccores.com 2001-01-11 21:20:20 +00:00
Richard Henderson 0a9ef43907 * as.h (rs_align_test): New.
* frags.c (NOP_OPCODE): Move default from read.c.
	(MAX_MEM_FOR_RS_ALIGN_CODE): New default.
	(frag_align_code): New.
	* frags.h (frag_align_code): Declare.
	* read.c (NOP_OPCODE): Remove.
	(do_align): Use frag_align_code.
	* write.c (NOP_OPCODE): Remove.
	(get_recorded_alignment): New.
	(cvt_frag_to_fill): Handle rs_align_test.
	(relax_segment): Likewise.
	(subsegs_finish): Align last subseg in section to the
	section alignment.  Use frag_align_code.
	* write.h (get_recorded_alignment): Declare.
	* config/obj-coff.c (size_section): Handle rs_align_test.
	(fill_section, fixup_mdeps): Likewise.
	(write_object_file): Use frag_align_code.

	* config/tc-alpha.c (alpha_align): Use frag_align_code.
	(alpha_handle_align): New.
	* config/tc-alpha.h (HANDLE_ALIGN): New.
	(MAX_MEM_FOR_RS_ALIGN_CODE): New.

	* config/tc-i386.h (md_do_align): Use frag_align_code.
	(MAX_MEM_FOR_RS_ALIGN_CODE): New.

	* config/tc-ia64.c (ia64_md_do_align): Don't do code alignment.
	(ia64_handle_align): New.
	* config/tc-ia64.h (HANDLE_ALIGN): New.
	(MAX_MEM_FOR_RS_ALIGN_CODE): New.

	* config/tc-m32r.c (m32r_do_align): Remove.
	(m32r_handle_align): New.
	(fill_insn): Use frag_align_code.
	* config/tc-m32r.h (md_do_align): Remove.
	(HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New.
	* config/tc-m88k.c, config/tc-m88k.h: Similarly.
	* config/tc-mips.c, config/tc-mips.h: Similarly.

	* config/tc-sh.c (sh_cons_align): Use rs_align_test.
	(sh_handle_align): Likewise.  Handle rs_align_code.
	(sh_do_align): Remove.
	* config/tc-sh.h (md_do_align): Remove.
	(MAX_MEM_FOR_RS_ALIGN_CODE): New.

	* config/tc-sparc.c (sparc_cons_align): Use rs_align_test.
	(sparc_handle_align): Likewise.  Handle rs_align_code.
	* config/tc-sparc.h (md_do_align): Remove.
	(MAX_MEM_FOR_RS_ALIGN_CODE): New.
2000-12-28 10:07:56 +00:00
Kazu Hirata ee515fb7fa 2000-12-13 Kazu Hirata <kazu@hxi.com>
* as.h: Fix formatting.
	* cgen.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* input-scrub.c: Likewise.
	* read.h: Likewise.
2000-12-14 01:12:43 +00:00
Richard Henderson 220e750f6f * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output
until dwarf2_finish; use relaxation to get cross-fragment offsets;
        thread multiple subsegments properly; handle multiple code
        sections properly; emit proper compilation unit info for assembler
        generated debugging.

        * as.h (enum _relax_state): Add rs_dwarf2dbg.
        * dwarf2dbg.h (struct dwarf2_line_info): Remove filename.
        (dwarf2dbg_estimate_size_before_relax): Declare.
        (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare.
        * write.c: Include dwarf2dbg.h.
        (cvt_frag_to_fill): Handle rs_dwarf2dbg.
        (relax_segment): Likewise.
2000-11-29 21:42:41 +00:00
Richard Henderson 4dc7ead9fd * as.c (debug_type): Init to DEBUG_UNSPECIFIED.
* as.h (debug_type): Clarify documentation of the meaning
	of this variable.
	* dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1.
	(print_stats): Fix parenthesis problem.
	(now_subseg_size): New.
	(dwarf2_finish): Use it.  If DEBUG_DWARF2, emit bits for .debug_info.
	(dwarf2_directive_file): Don't set debug_type.
	(dwarf2_where): Honor DEBUG_DWARF2 first.
	(dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno;
	do nothing if not emitting dwarf2 debug info, or no work.
	* dwarf2dbg.h (dwarf2_emit_insn): Update.
	* ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED.
	(ecoff_new_file): Likewise.
	* read.c (generate_lineno_debug): Kill ecoff hackery.  Update
	commentary wrt dwarf2.

	* config/tc-alpha.c (alpha_adjust_symtab_relocs): Add
	ATTRIBUTE_UNUSED as needed.
	(emit_insn): Call dwarf2_emit_insn.
	(s_alpha_file): New.
	(s_alpha_loc): New.
	(s_alpha_coff_wrapper): Don't handle them.
	(md_pseudo_table): Update for .file and .loc.
	* config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New.

	* config/tc-arm.c (output_inst): Update for dwarf2_emit_insn;
	don't protect with debug_type.
	* config/tc-hppa.c (md_assemble): Likewise.
	* config/tc-m68hc11.c (m68hc11_new_insn): Likewise.
	* config/tc-mn10300.c (md_assemble): Likewise.
	* config/tc-sh.c (md_assemble): Likewise.
	* config/tc-v850.c (md_assemble): Likewise.

	* config/tc-arm.c (arm_end_of_source): Remove.
	* config/tc-hppa.c (pa_end_of_source): Remove.
	* config/tc-m68hc11.c (m68hc11_end_of_source): Remove.
	* config/tc-mn10300.c (mn10300_finalize): Remove.
	* config/tc-sh.c (sh_finalize): Remove.
	* config/tc-v850.c (sh_finalize): Remove.

	* config/tc-arm.h (md_end): Remove.
	* config/tc-hppa.h (md_end): Remove.
	(DWARF2_LINE_MIN_INSN_LENGTH): New.
	* config/tc-m68hc11.h (md_end): Remove.
	* config/tc-mn10300.h (md_end): Remove.
	* config/tc-sh.h (md_end): Remove.
	* config/tc-v850.h (md_end): Remove.

	* config/tc-ia64.c (emit_one_bundle): Don't protect
	dwarf2 bits with debug_type.
	(md_assemble): Likewise.
	(ia64_end_of_source): Don't call dwarf2_finish.
2000-11-17 08:47:52 +00:00
Hans-Peter Nilsson d8374dcd8a * as.h (OPTION_MD_BASE): Bump to 190.
* as.c (parse_args) <std_longopts>: Add comment about the need to
	check OPTION_MD_BASE in as.h.
2000-10-30 20:15:02 +00:00
Kazu Hirata 30a2b4ef8f 2000-10-12 Kazu Hirata <kazu@hxi.com>
* app.c: Fix formatting.
	* as.c: Likewise.
	* as.h: Likewise.
	* bit_fix.h: Likewise.
	* cgen.c: Likewise.
	* cgen.h: Likewise.
	* cond.c: Likewise.
2000-10-11 20:24:32 +00:00
Kazu Hirata a01b9fa4ba 2000-09-12 Kazu Hirata <kazu@hxi.com>
* as.h: Fix formatting.
	* asintl.h: Likewise.
	* bit_fix.h: Likewise.
	* dwarf2dbg.h: Likewise.
	* expr.h: Likewise.
	* flonum.h: Likewise.
	* frags.h: Likewise.
	* itbl-ops.h: Likewise.
	* macro.h: Likewise.
	* read.h: Likewise.
	* sb.h: Likewise.
	* struc-symbol.h: Likewise.
	* subsegs.h: Likewise.
	* symbols.h: Likewise.
	* tc.h: Likewise.
	* write.h: Likewise.
2000-09-12 20:57:14 +00:00
Alan Modra 4c400d5ea7 comment-finding hack for hppa-linux. 2000-07-28 05:05:20 +00:00
Alan Modra 8fce3f5ef7 Michael Sokolov's 68000 patches + assorted compiler warning fixes. 2000-05-08 10:24:06 +00:00
Alan Modra a1934524a3 Correctly check gcc version. 2000-04-29 00:56:29 +00:00
Alan Modra 12ff5d5690 Portability fixes. 2000-04-14 04:14:25 +00:00
Alan Modra c20f4f8c21 Move bug report string to one place. 2000-04-03 14:10:05 +00:00
Timothy Wall 9f10757c40 Add macro handling extensions and line substitution support. 2000-03-26 14:47:33 +00:00
Alan Modra abd63a324b Remove dead code when not TC_M68K. 2000-02-24 01:56:31 +00:00
Timothy Wall f805106cd3 Add handling for numbers with suffixed radix. 2000-02-08 14:21:53 +00:00
Timothy Wall bea9907b2a octets vs bytes changes for GAS 2000-02-03 18:20:23 +00:00
Geoffrey Keating 2bdd6cf599 * as.c (show_usage): Document new options.
(parse_args): Add --no-warn, --warn, --fatal-warnings,
which become 'W', OPTION_WARN, and OPTION_WARN_FATAL.
(parse_args): Parse the new options.
(main): If there were warnings, and --fatal-warnings
was specified, print an error.
* as.h: New variable, flag_fatal_warnings, for new option.
1999-10-11 04:07:10 +00:00
Ian Lance Taylor b9e57a387a * subsegs.c (subseg_text_p): New function.
* as.h (subseg_text_p): Declare.
	* read.c (do_align): Use subseg_text_p to set the default fill.
	* write.c (subsegs_finish): Likewise.
	* config/obj-coff.c (write_object_file): Likewise.
	* config/tc-i386.h (md_maybe_text): Don't define.
	(md_do_align): Use subseg_text_p to set the default fill.
	* config/tc-m32r.c (m32r_do_align): Likewise.
	* config/tc-sh.c (sh_do_align): Likewise.
	* config/tc-sparc.h (md_do_align): Likewise.
1999-06-12 16:49:51 +00:00
Richard Henderson fac0d250c7 * as.c (parse_args): Add option -gdwarf2 to allow requesting
DWARF2 debug info (line information only, at this point).
        * as.h: Update comment about supported debug formats.
        * dwarf2dbg.c, dwarf2dbg.h: New files.
        * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them.
1999-06-03 02:51:53 +00:00
Ian Lance Taylor 2b47531bf9 * app.c (input_buffer): New static variable.
(app_push): Save saved_input in allocated buffer.
	(app_pop): Restored saved_input.
	(do_scrub_chars): Change get parameter to take char * and int as
	arguments.  Change GET macro to pass input_buffer to get
	function.  Don't save input into allocated buffer.
	* as.h (do_scrub_chars): Update declaration.
	* input-file.c (input_file_get): Change to take char * and int.
	Read data into passed in buffer.  Remove static buffer.
	* read.c (scrub_from_string): Change to take char * and int.  Copy
	data into passed in buffer.
1999-06-03 00:24:14 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00