Nick Clifton
d02603dc20
Allow symbol and label names to be enclosed in double quotes.
...
gas PR gas/18581
* expr.c (get_symbol_end): Rename to get_symbol_name. Add a
return parameter pointing to the start of the symbol. Allow
symbol names enclosed in double quotes.
(restore_line_pointer): New function. Replace the NUL character
inserted into the input stream with the given character. If the
character was a double quote, advance the input pointer.
* expr.h (get_symbol_end): Delete.
(get_symbol_name): Add prototype.
(restore_line_pointer): Prototype.
* read.h (SKIP_WHITESPACE_AFTER_NAME): New macro.
* doc/as.texinfo (Symbol Intro): Document that symbol names can
now be enclosed in double quotes.
* cond.c (s_ifdef): Replace get_symbol_end with get_symbol_name.
Use restore_line_pointer to replace the NUL in the input stream.
Use SKIP_WHITESPACE_AFTER_NAME to skip past the end of a symbol.
Check for the use of double quoted symbol names.
* expr.c: Likewise.
* config/obj-aout.c: Likewise.
* config/obj-coff-seh.c: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-elf.c: Likewise.
* config/obj-evax.c: Likewise.
* config/obj-macho.c: Likewise.
* config/obj-som.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i386-intel.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-iq2000.c: Likewise.
* config/tc-m32r.c: Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-microblaze.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mmix.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-nios2.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-score.c: Likewise.
* config/tc-score7.c: Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-tic6x.c: Likewise.
* config/tc-tilegx.c: Likewise.
* config/tc-tilepro.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-xtensa.c: Likewise.
* config/tc-z80.c: Likewise.
* dw2gencfi.c: Likewise.
* dwarf2dbgc.: Likewise.
* ecoff.c: Likewise.
* read.c: Likewise.
* stabs.c: Likewise.
tests PR gas/18581
* gas/all/byte.d: Disable this test. Quoted expressions
are now allowed in .byte directives.
* gas/all/quoted-sym-names.s: New test.
* gas/all/quoted-sym-names.d: Expected output.
* gas/all/gas.exp: Run the new test.
2015-08-21 16:42:14 +01:00
Nick Clifton
da7119c99c
Fix compile time warnings about a local variable being used before it is set.
...
PR 18313
* cond.c (s_if): Stop compile time warning about stopc being used
before it is set.
(s_ifc): Likewise.
2015-04-28 11:22:57 +01:00
Alan Modra
b90efa5b79
ChangeLog rotatation and copyright year update
2015-01-02 00:53:45 +10:30
Alan Modra
4b95cf5c0c
Update copyright years
2014-03-05 22:16:15 +10:30
H.J. Lu
34bca50861
Remove trailing white spaces on gas
...
* app.c: Remove trailing white spaces.
* as.c: Likewise.
* as.h: Likewise.
* cond.c: Likewise.
* dw2gencfi.c: Likewise.
* dwarf2dbg.h: Likewise.
* ecoff.c: Likewise.
* input-file.c: Likewise.
* itbl-lex.h: Likewise.
* output-file.c: Likewise.
* read.c: Likewise.
* sb.c: Likewise.
* subsegs.c: Likewise.
* symbols.c: Likewise.
* write.c: Likewise.
* config/tc-i386.c: Likewise.
* doc/Makefile.am: Likewise.
* doc/Makefile.in: Likewise.
* doc/c-aarch64.texi: Likewise.
* doc/c-alpha.texi: Likewise.
* doc/c-arc.texi: Likewise.
* doc/c-arm.texi: Likewise.
* doc/c-avr.texi: Likewise.
* doc/c-bfin.texi: Likewise.
* doc/c-cr16.texi: Likewise.
* doc/c-d10v.texi: Likewise.
* doc/c-d30v.texi: Likewise.
* doc/c-h8300.texi: Likewise.
* doc/c-hppa.texi: Likewise.
* doc/c-i370.texi: Likewise.
* doc/c-i386.texi: Likewise.
* doc/c-i860.texi: Likewise.
* doc/c-m32c.texi: Likewise.
* doc/c-m32r.texi: Likewise.
* doc/c-m68hc11.texi: Likewise.
* doc/c-m68k.texi: Likewise.
* doc/c-microblaze.texi: Likewise.
* doc/c-mips.texi: Likewise.
* doc/c-msp430.texi: Likewise.
* doc/c-mt.texi: Likewise.
* doc/c-s390.texi: Likewise.
* doc/c-score.texi: Likewise.
* doc/c-sh.texi: Likewise.
* doc/c-sh64.texi: Likewise.
* doc/c-tic54x.texi: Likewise.
* doc/c-tic6x.texi: Likewise.
* doc/c-v850.texi: Likewise.
* doc/c-xc16x.texi: Likewise.
* doc/c-xgate.texi: Likewise.
* doc/c-xtensa.texi: Likewise.
* doc/c-z80.texi: Likewise.
* doc/internals.texi: Likewise.
2013-01-10 19:51:55 +00:00
Nick Clifton
9fd07943ff
* config/tc-m32r.c (md_show_usage): Fix typos in descriptions.
...
* config/tc-mt.c (md_assemble): Fix typos in warning messages.
* cond.c (s_else): Fix typos in error messages.
* config/tc-pj.c (md_assemble): Fix typo in error message.
2011-05-17 16:15:59 +00:00
Alan Modra
aa820537ea
update copyright dates
2009-09-02 07:25:43 +00:00
Nick Clifton
ec2655a6a7
Switch to GPLv3
2007-07-03 11:01:12 +00:00
Alan Modra
ebd1c8757c
remove some duplicate #include's.
2006-06-07 11:27:58 +00:00
Jan Beulich
92757bc916
gas/
...
2005-11-17 Jan Beulich <jbeulich@novell.com>
* symbols.h (S_CLEAR_VOLATILE): Declare.
* symbols.c (colon): Also accept redefinable symbols for
redefinition. Clone them before modifying.
(S_CLEAR_VOLATILE): Define.
* cond.c (s_ifdef): Also test for equated symbols.
* read.c (s_comm_internal): Also exclude non-redefinable
equated symbols. Clone redefinable ones before modifying.
(s_weakref): Clone redefinable symbols before modifying.
* doc/internals.texi: Document sy_volatile, sy_forward_ref,
S_IS_VOLATILE, S_SET_VOLATILE, S_CLEAR_VOLATILE,
S_IS_FORWARD_REF, and S_SET_FORWARD_REF.
gas/testsuite/
2005-11-17 Jan Beulich <jbeulich@novell.com>
* gas/all/cond.s: Also check ifdef works on equates and
commons.
* gas/all/cond.l: Adjust.
* gas/all/redef2.s: Also test redefining equate to label.
* gas/all/redef2.d: Adjust.
* gas/all/redef3.[sd]: New.
* gas/all/redef4.s: New.
* gas/all/redef5.s: New.
* gas/elf/redef.s: New, copied from original gas/all/redef2.s.
* gas/elf/redef.d: Remove #source.
* gas/all/gas.exp: Remove exclusion of iq2000-*-* from and
adjust xfails for redefinition tests. Run new tests. Exclude
alpha*-*-*, mips*-*-*, *c54x*-*-* from weakref tests.
2005-11-17 07:29:28 +00:00
Nick Clifton
9497f5ac6b
This adjusts equate handling by
...
- allowing true forward references (which will always assume the referenced
symbols have at the point of use) through the new .eqv pseudo-op and the
new == operator
- disallowing changing .equiv-generated equates (so that the protection this
provides is both forward and backward)
- snapshotting equates when their value gets changed so that previous uses
don't get affected by the new value.
- allowing expressions in places where absolute expressions (or register
names) are needed which were not completely resolvable at the point of
their definition but which are fully resolvable at the point of use
In addition it fixes PR/288.
2005-10-11 11:16:17 +00:00
Jan Beulich
26aca5f60e
gas/
...
2005-05-06 Jan Beulich <jbeulich@novell.com>
* cond.c (s_ifb): New.
* read.c (potable): Add s_ifb as handler for .ifb and .ifnb.
* read.h (s_ifb): Prototype.
* doc/as.texinfo: Document .ifb and .ifnb.
gas/testsuite/
2005-05-06 Jan Beulich <jbeulich@novell.com>
* gas/all/cond.s: Also test .ifb/.ifnb.
* gas/all/cond.d: Adjust.
2005-05-06 06:38:11 +00:00
Nick Clifton
4b4da1607a
Update the address and phone number of the FSF
2005-05-05 09:13:19 +00:00
Alan Modra
2da5c03714
update copyright dates
2005-03-03 01:29:54 +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
Nick Clifton
8dfa01881f
Make .ifdef treat a referenced but not yet defined symbol as if it were
...
undefined, in exactly the same way as .equiv.
2002-07-19 11:35:06 +00:00
Alan Modra
0e389e770d
* read.c: Standardize error/warning messages - don't capitalise, no
...
final period or newline, don't say "ignored" or "zero assumed" for
as_bad messages. In some cases, change the wording to that used
elsewhere for similar messages.
* app.c, as.c, atof-generic.c, cgen.c, cond.c, depend.c, dwarf2dbg.c,
ecoff.c, expr.c, frags.c, input-file.c, input-scrub.c, listing.c,
output-file.c, stabs.c, subsegs.c, symbols.c, write.c: Likewise.
* ecoff.c (ecoff_directive_end): Test for missing name by
comparing input line pointers rather than reading string.
(ecoff_directive_ent): Likewise.
* read.c (s_set): Likewise.
(s_align): Report a warning rather than an error for
alignment too large.
(s_comm): Check for missing symbol name.
(s_lcomm_internal): Likewise.
(s_lsym): Likewise.
(s_globl): Use is_end_of_line instead of looking for '\n'.
(s_lcomm_internal): Likewise.
(ignore_rest_of_line): Report a warning rather than an error.
2001-08-01 01:44:25 +00:00
Alan Modra
61b96bb428
Fix conditional assembly listings when more than one .else/.elsif
2001-03-31 06:47:54 +00:00
Alan Modra
cdbc6895e5
* cond.c (s_endif): Correct handling of "if .. elseif .." trees.
...
Don't abort on NULL current_cframe.
2001-03-31 02:06:24 +00:00
Nick Clifton
f7e42eb4af
Fix copyright notices
2001-03-08 23:24:26 +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
76b0a8c0ed
2000-08-31 Kazu Hirata <kazu@hxi.com>
...
* as.c: Fix formatting.
* cond.c: Likewise.
2000-08-31 23:17:47 +00:00
Alan Modra
abd63a324b
Remove dead code when not TC_M68K.
2000-02-24 01:56:31 +00:00
Timothy Wall
3fd9f0476f
New elseif directive has been added.
2000-02-08 14:13:57 +00:00
Ian Lance Taylor
ab9da55419
* Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
...
as appropriate. Fill in structure initializations. Add variable
initializations. Add casts.
* dwarf2dbg.c (print_stats): Change i to size_t.
* listing.c (listing_listing): Change list_line to unsigned int.
1999-07-11 20:20:04 +00:00
Ian Lance Taylor
49309057b4
Add support for storing local symbols in a small structure to save
...
memory when assembling large files.
* as.h: Don't include struc-symbol.h.
(symbolS): Add typedef.
* symbols.c: Include struc-symbol.h.
(local_hash): New static variable.
(save_symbol_name): New static function, from symbol_create.
(symbol_create): Call save_symbol_name.
(local_symbol_count): New static variable.
(local_symbol_conversion_count): Likewise.
(LOCAL_SYMBOL_CHECK): Define.
(local_symbol_make): New static function.
(local_symbol_convert): New static function.
(colon): Handle local symbols. Create local symbol for local
label name.
(symbol_table_insert): Handle local symbols.
(symbol_find_or_make): Create local symbol for local label name.
(symbol_find_base): Check for local symbol.
(symbol_append, symbol_insert): Check for local symbols.
(symbol_clear_list_pointers, symbol_remove): Likewise.
(verify_symbol_chain): Likewise.
(copy_symbol_attributes): Likewise.
(resolve_symbol_value): Handle local symbols.
(resolve_local_symbol): New static function.
(resolve_local_symbol_values): New function.
(S_GET_VALUE, S_SET_VALUE): Handle local symbols.
(S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise.
(S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise.
(S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise.
(S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise.
(symbol_previous, symbol_next): New functions.
(symbol_get_value_expression): Likewise.
(symbol_set_value_expression): Likewise.
(symbol_set_frag, symbol_get_frag): Likewise.
(symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise.
(symbol_mark_used_in_reloc): Likewise.
(symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise.
(symbol_mark_mri_common, symbol_clear_mri_common): Likewise.
(symbol_mri_common_p): Likewise.
(symbol_mark_written, symbol_clear_written): Likewise.
(symbol_written_p): Likewise.
(symbol_mark_resolved, symbol_resolved_p): Likewise.
(symbol_section_p, symbol_equated_p): Likewise.
(symbol_constant_p): Likewise.
(symbol_get_bfdsym, symbol_set_bfdsym): Likewise.
(symbol_get_obj, symbol_set_obj): Likewise.
(symbol_get_tc, symbol_set_tc): Likewise.
(symbol_begin): Initialize local_hash.
(print_symbol_value_1): Handle local symbols.
(symbol_print_statistics): Print local symbol statistics.
* symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER.
Declare new symbols.c functions. Move many declarations here from
struc-symbol.h.
(SYMBOLS_NEED_BACKPOINTERS): Define if needed.
* struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set.
(struct symbol): Move bsym to make it clearly the first field.
Remove TARGET_SYMBOL_FIELDS.
(symbolS): Don't typedef.
(struct broken_word): Remove.
(N_TYPE_seg, seg_N_TYPE): Move to symbol.h.
(SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise.
(symbol_clear_list_pointers): Likewise.
(symbol_insert, symbol_remove): Likewise.
(symbol_previous, symbol_append): Likewise.
(verify_symbol_chain, verify_symbol_chain_2): Likewise.
(struct local_symbol): Define.
(local_symbol_converted_p, local_symbol_mark_converted): Define.
(local_symbol_resolved_p, local_symbol_mark_resolved): Define.
(local_symbol_get_frag, local_symbol_set_frag): Define.
(local_symbol_get_real_symbol): Define.
(local_symbol_set_real_symbol): Define.
Define.
* write.c (write_object_file): Call resolve_local_symbol_values.
* config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define.
(TARGET_SYMBOL_FIELDS): Don't define.
* config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If
ECOFF_DEBUGGING, add ECOFF fields.
(ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
* config/obj-multi.h (struct elf_obj_sy): Add local field. If
ECOFF_DEBUGGING, add ECOFF fields.
(ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
(ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define.
* config/tc-mcore.h: Don't include struc-symbol.h.
(TARGET_SYMBOL_FIELDS): Don't define.
(struct mcore_tc_sy): Define.
(TC_SYMFIELD_TYPE): Define.
* Many files: Use symbolS instead of struct symbol. Use new
accessor functions rather than referring to symbolS fields
directly.
* read.c (s_mri_common): Don't add in value of line_label.
* config/tc-mips.c (md_apply_fix): Correct parenthesization when
checking for SEC_LINK_ONCE.
* config/tc-sh.h (sh_fix_adjustable): Declare.
1999-06-03 00:29:48 +00:00
Richard Henderson
252b5132c7
19990502 sourceware import
1999-05-03 07:29:11 +00:00