aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
AgeCommit message (Collapse)AuthorFilesLines
1996-10-07 * config/obj-elf.c (elf_begin): New function.Ian Lance Taylor1-0/+4
(obj_elf_section): Add the section symbol to the symbol table. * config/obj-elf.h (obj_begin): Define. (elf_begin): Declare. * as.c (perform_an_assembly_pass): Call obj_begin if it is defined.
1996-10-01 * as.c (show_usage): Print bug report address.Ian Lance Taylor1-7/+52
(parse_args): Change version printing to match current GNU standards. * gasp.c (show_usage): Print bug report address. (main): Change version printing to match current GNU standards.
1996-06-19 * as.c (emulation_name): Remove unused static variable.Ian Lance Taylor1-1/+2
(default_emul_bfd_name): Add return NULL to avoid warning. * ecoff.c (ecoff_stab): Remove unused variables name and name_end. * frags.c (frag_new): Remove unused variable tmp. * hash.c (hash_grow): Parenthesize + within <<. (hash_print_statistics): Use %lu, not %d, to print unsigned long variables. * messages.c: Include "libiberty.h". (fprint_value): Add cast to avoid printf warning. (sprint_value): Likewise. * read.c: Include "ecoff.h". (emit_expr): Add casts to avoid printf warnings. * read.h: Use extern for function declarations. (pop_insert): Declare. * stabs.c: Include "ecoff.h". * subsegs.c (subseg_set_rest): Remove unused variables tmp, former_last_fragP, and new_fragP. * subsegs.h (subsegs_print_statistics): Declare. * symbols.c (debug_verify_symchain): Change macro to discard arguments. * write.c (dump_section_relocs): Likewise. * write.h: Use extern for function declarations. (write_print_statistics): Declare. * config/e-mipsecoff.c (mipsecoff_bfd_name): Return NULL to avoid warning. * config/e-mipself.c (mipself_bfd_name): Likewise. * config/obj-elf.h (elf_ecoff_set_ext): Declare.
1996-03-22 * as.h (strdup): Don't declare.Ian Lance Taylor1-40/+102
* 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.
1995-08-21 Add support for macros.Ian Lance Taylor1-4/+46
* as.c: Include sb.h and macro.h. (max_macro_next): New global variable. (main): Call macro_init. (macro_expr): New static function. * as.h (max_macro_nest): Declare. * read.c (line_label): Rename from mri_line_label. Change all uses. (potable): Add exitm, irp, irpc, macro, mexit, rept. (read_a_source_file): Always clear line_label at the start of a line, not just when flag_mri or LABELS_WITHOUT_COLONS. Fixup MRI/LABELS_WITHOUT_COLONS handling. In MRI mode, permit label: equ val. Set line_label when calling colon. In MRI mode, a leading '.' does not imply a pseudo-op. Check for macro expansion before calling md_assemble. (s_irp): New function. (get_line_sb): New static function. (s_macro): New function. (s_mexit): New function. (s_rept): New function. * read.h (line_label): Rename from mri_line_label. (s_irp, s_rept): Declare. (s_macro, s_mexit): Declare. * input-scrub.c: Include sb.h. (sb_index, from_sb): New static variables. (macro_nest): New static variable. (struct input_save): Add sb_index and from_sb fields. Change next_saved_file field to be struct input_save *. (next_saved_file): Changed to be struct input_save *. (input_scrub_push): Change to return type struct input_save *. Save sb_index and from_sb. (input_scrub_pop): Change parameter type to struct input_save *. Restore sb_index and from_sb. (input_scrub_include_sb): New function. (input_scrub_next_buffer): Handle reading from from_sb. (bump_line_counters): Only increment lines if not using from_sb. * config/tc-m68k.c (opt_table): Add nest. (opt_nest): New static function. * gasp.c: Include sb.h and macro.h. Move all sb related functions and definitions to sb.h and sb.c. Move all macro related functions and definitions to macro.h and macro.c. * sb.h, sb.c: New files, extracted from gasp.c. * macro.h, macro.c: Likewise. * Makefile.in (OBJS): Add sb.o and macro.o (GASPOBJS): Define. (gasp.new): Depend upon $(GASPOBJS). Use $(GASPOBJS) to link. (TARG_CPU_DEP_m68k): Depend upon subsegs.h. (gasp.o): Depend upon sb.h and macro.h. (sb.o): New target. (macro.o): New target. (as.o): Depend upon sb.h and macro.h. (input-scrub.o): Depend upon sb.h. (read.o): Depend upon sb.h and macro.h.
1995-07-06 Patches from Jerry Blakely <gerry_blakley@wellfleet.com>:Ian Lance Taylor1-2/+11
* as.c (listing_filename): New static variable. (show_usage): Mention -a=file. (parse_args): Support = option of -a to set name of listing file. (main): Pass listing_filename to listing_print. * listing.c (list_file): New static variable. (various): Replace printf with fprintf to list_file. (listing_print): If name argument is not NULL, open it as list_file. * doc/as.texinfo, doc/as.1: Document -a=file. PR 6354.
1995-07-05 * config/tc-sparc.c (md_shortopts): Add "K:" if OBJ_ELF.Ian Lance Taylor1-6/+17
(md_parse_option): If OBJ_ELF, check for -K. Die if -K PIC, since PIC code is not currently supported. * as.c (parse_args): Change std_shortopts to be an array rather than a constant string. Only include 'K' if WORKING_DOT_WORD is not defined. Only check for 'K' in that case as well. * as.h (flag_warn_displacement): Only declare if WORKING_DOT_WORD is not defined. PR 7131.
1995-07-05 * as.c (main): Only use sbrk when HAVE_SBRK defined.Fred Fish1-1/+8
* configure.in: Add test for sbrk. * configure: Regenerate using autoconf 2.4.
1995-05-23more emulation fixesKen Raeburn1-0/+97
1994-12-20* frags.c (frag_init): Call obstack_begin on `frags'.Ken Raeburn1-43/+12
* subsegs.c (subsegs_begin): Don't do it here. * as.c (main): Call frag_init before subsegs_begin. * frags.c (frag_append_1_char): New function. * frags.h (frag_append_1_char): Declare it. (FRAG_APPEND_1_CHAR): Call it. Old definition is commented out for now. * as.h (struct frag): Added (but commented out) new fields for tracking current alignment. (frag_now_fix): Changed macro to function declaration. * frags.c (frag_now_fix): Define function here. (frag_new): Use it instead of accessing `frags' directly. * frags.h (frags): Change comment to indicate it shouldn't be accessed directly. * subsegs.h (struct frchain): New field frch_obstack, intended to eventually replace global `frags' obstack. * subsegs.c (subseg_set_rest): Use frag_now_fix instead of accessing `frags' directly. Initialize fields of new frchainS explicitly instead of with memset. * config/obj-coff.c (obj_coff_ln) [!BFD_ASSEMBLER]: Use frag_now_fix. * config/tc-mips.c (s_loc), config/obj-vms.c (vms_resolve_symbol_redef), symbols.c (colon): Likewise.
1994-11-30switch to libiberty version of xmallocKen Raeburn1-0/+3
1994-11-26Add changes from customer since last work.Michael Tiemann1-10/+31
1994-09-13Use EXIT_SUCCESS and EXIT_FAILURE in all exit calls.Ken Raeburn1-19/+25
Use exit rather than returning from main, for consistency on VMS. Call as_fatal instead of as_bad or as_warn followed by exit.
1994-08-28Conversion to autoconf:Ken Raeburn1-8/+2
* acconfig.h, aclocal.m4: New files. * configure.in: Rewritten (except for some target-specific code) for autoconf. * conf.in, configure: New files, generated from the above. * Makefile.in: Changed magic sequence indicating insertion of makefile fragments. (VPATH, srcdir, CC, LIBS, OBJS dependencies): Use @-substitutions from configure. (LINKED_HEADERS): Deleted a.out.gnu.h, a.out.h, and host.h. (config.status, configure): Rewrite rules. (config-stamp): Depend on conf. Skip variables that configure is now substituting itself. (*.o dependencies): Deleted host.h. (distclean, realclean): Don't delete host.h. * as.c: Don't include stdio.h, string.h, sys/types.h. Include signal.h after as.h. * as.h: Include alloca-conf.h first. Include ctype.h, string.h, strings.h, stdlib.h, unistd.h, sys/types.h, fopen-bin.h, fopen-same.h, as suggested by autoconf test results. [BROKEN_ASSERT]: Don't include assert.h. (strdup): Declare. (volatile, const): Define if not __STDC__ and not already defined. (malloc, realloc) [NEED_MALLOC_DECLARATION]: Declare. (free) [NEED_FREE_DECLARATION]: Declare. * gasp.c: Include config.h, stdlib.h (if HAVE_STDLIB_H). Don't include host.h. (malloc) [NEED_MALLOC_DECLARATION]: Declare. * messages.c: Include as.h first. Include errno.h only if HAVE_ERRNO_H. If HAVE_VARARGS_H and not __STDC__, undefine HAVE_STDARG_H. Set NO_STDARG and NO_VARARGS as appropriate. * doc/Makefile.in (srcdir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf @-substitutions.
1994-08-24gcc lint.Ian Lance Taylor1-5/+18
* as.c (main): Move a inside the #if 0 block which uses it. * ecoff.c (current_stabs_filename): Make const. * frags.h (frag_align_pattern): Declare. * gasp.c (new_file): Cast isp to long, and use %ld to print it. * config/tc-alpha.h (md_operand): Add cast to void. (alpha_do_align): Declare argument types. (tc_get_register): Declare. (alpha_frob_ecoff_data): Declare. * config/tc-alpha.c: Include <ctype.h>. (s_mask): Don't declare; does not exist. (line_comment_chars): Remove /* from descriptive comment. (tc_get_register): Remove unused local reg. (tc_gen_reloc): Don't bother to compare unsigned to zero. (s_base): Correct warning to actually print register number. (md_begin): Remove unused locals retval, lose, and i. (alpha_fix_adjustable): Move default case inside switch to avoid warning. (load_symbol_address): Remove unused locals reloc_addr, p, sym, and addend. (emit_byte_manip_r): Declare types for all arguments. (emit_extract_r, emit_insert_r, emit_mask_r): Likewise. (emit_sign_extend, emit_bis_r, s_proc): Likewise. (alpha_ip): Use sprint_value to print offsetT value. Remove unused local size. Remove unused label get_macro. (alpha_do_align): Make fill const. (md_apply_fix): Remove unused label check_zov.
1994-06-03 * as.c (show_usage), config/tc-alpha.c (md_show_usage),David MacKenzie1-3/+4
config/tc-mips.c (md_show_usage): Fix up messages.
1994-06-03 * as.h: Replace flagseen with separate variables.David MacKenzie1-16/+26
* as.c (parse_args): Set them. Don't accept -1 option, or -v explicitly (it's a synonym for --version). * as.c, input-scrub.c, messages.c, read.c, symbols.c, write.c, config/obj-aout.c, config/obj-aout.h, config/obj-bout.c, config/obj-bout.h, config/obj-coff.c, config/obj-coff.h, config/obj-vms.c, config/tc-hppa.c, config/tc-i386.c, config/tc-i960.c, config/tc-m68k.c, config/tc-mips.c, config/tc-vax.c: Use the new flag variables instead of flagseen. * config/tc-vax.c [OBJ_VMS]: Recognize -+, -1, -v, and document in usage.
1994-06-03 * as.c (show_usage): Remove target specific messages;David MacKenzie1-370/+172
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-02 * as.c (show_usage): New function.David MacKenzie1-65/+295
(parse_args): Code moved from main. Recognize --help and --version. * config/tc-ns32k.h: Define TC_NS32K. * doc/as.texinfo: Document all of the target-independent command line options.
1994-01-27 * as.c (main): Print long values using %ld.Ian Lance Taylor1-1/+1
1994-01-26Tue Jan 25 18:30:34 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-1/+31
* as.c (quiet_flag): New flag. (main): If -noquiet given, display execution time and memory used.
1994-01-14Don't include config.h directly any more.Ken Raeburn1-14/+20
1993-12-20* as.c (main): Call listing_print before BFD gets closed, when symbol dataKen Raeburn1-10/+6
hasn't been freed up yet.
1993-10-29 * as.c (main): Disable "-R" option if NO_FOLD_DATA_AND_TEXTJeff Law1-19/+30
is defined.
1993-07-07localize a conditionally used variableKen Raeburn1-35/+41
1993-03-30look for GAS_VERSION macro, not external version_string varKen Raeburn1-48/+53
1993-02-24more bfd merging - see ChangeLogKen Raeburn1-69/+73
1992-11-23Ran "indent", for GNU coding style; some code & comments still need fixup.Ken Raeburn1-275/+304
Removed some unneeded files. configure.in: Don't look for te-386bsd.h, which doesn't exist...
1992-04-27use -K for broken word option rather than -k which means pic to sun asK. Richard Pixley1-5/+8
1992-02-15White space and comment changes. #ifdef __STDC__ becomes #if __STDC__K. Richard Pixley1-5/+5
== 1. Get the declarations right in listing.[hc].
1992-02-13White space and comments only. The devo tree prior to this delta isK. Richard Pixley1-128/+135
tagged as "vanilla" for your convenience. There are also some comment changes.
1992-01-21 * as.c: change -l to -a[lsn], to avoid conflict with 68000Steve Chamberlain1-25/+80
command line option. * listing.h, listing.c: now prints addresses with ??? instead of 0 when errors in assemble prevent addresses being known. Prints symbol table more tidily. Allows different parts of the listing to be selected.
1991-04-04Initial revisionK. Richard Pixley1-0/+361