Commit Graph

153 Commits

Author SHA1 Message Date
Alan Modra aa820537ea update copyright dates 2009-09-02 07:25:43 +00:00
Jie Zhang 5e8c8f8f89 * read.c (TC_START_LABEL): Add a new argument.
(read_a_source_file): Pass the beginning of the symbol through
	the new argument of TC_START_LABEL.
	* config/tc-arm.h (TC_START_LABEL): Add a new argument.
	* config/tc-bfin.c (bfin_start_label): Only search '(' and '['
	from the beginning of the symbol.
	* config/tc-bfin.h (TC_START_LABEL): Add the new argument.
	* config/tc-d30v.h (TC_START_LABEL): Likewise.
	* config/tc-fr30.h (TC_START_LABEL): Likewise.
	* config/tc-m32c.h (TC_START_LABEL): Likewise.
	* config/tc-m32r.h (TC_START_LABEL): Likewise.
	* config/tc-mep.h (TC_START_LABEL): Likewise.

	testsuite/
	* gas/bfin/stack2.s: Add pop multiple instruction with a label
	on the same line.
	* gas/bfin/stack2.d: Adjust accordingly.
2009-09-01 00:24:02 +00:00
Nick Clifton 9c2799c243 * gas/app, gas/as.c, gas/as.h, gas/atof-generic.c, gas/cgen.c,
gas/config/atof-ieee.c, gas/config/obj-aout.c,
        gas/config/obj-coff.c, gas/config/obj-ecoff.c,
        gas/config/obj-elf.c, gas/config/obj-som.c, gas/config/tc-alpha.c,
        gas/config/tc-arc.c, gas/config/tc-arm.c, gas/config/tc-cr16.c,
        gas/config/tc-cris.c, gas/config/tc-crx.c, gas/config/tc-d30v.c,
        gas/config/tc-dlx.c, gas/config/tc-hppa.c, gas/config/tc-i370.c,
        gas/config/tc-i386-intel.c, gas/config/tc-i386.c,
        gas/config/tc-i860.c, gas/config/tc-i960.c, gas/config/tc-ia64.c,
        gas/config/tc-iq2000.c, gas/config/tc-m32c.c,
        gas/config/tc-m32r.c, gas/config/tc-m68hc11.c,
        gas/config/tc-m68k.c, gas/config/tc-maxq.c, gas/config/tc-mcore.c,
        gas/config/tc-mep.c, gas/config/tc-mips.c, gas/config/tc-mmix.c,
        gas/config/tc-mn10300.c, gas/config/tc-moxie.c,
        gas/config/tc-ns32k.c, gas/config/tc-pj.c, gas/config/tc-ppc.c,
        gas/config/tc-s390.c, gas/config/tc-score.c,
        gas/config/tc-score7.c, gas/config/tc-sh.c, gas/config/tc-sparc.c,
        gas/config/tc-spu.c, gas/config/tc-tic30.c, gas/config/tc-vax.c,
        gas/config/tc-xtensa.c, gas/config/xtensa-relax.c,
        gas/dw2gencfi.c, gas/dwarf2dbg.c, gas/ehopt.c, gas/expr.c,
        gas/frags.c, gas/input-file.c, gas/read.c, gas/sb.c,
        gas/subsegs.c, gas/symbols.c, gas/write.c: Change the name of the
        gas macro `assert' to `gas_assert'.
2009-06-22 17:56:02 +00:00
H.J. Lu d67ffd56e1 2009-03-23 H.J. Lu <hongjiu.lu@intel.com>
PR gas/9966
	* listing.c (listing_newline): Properly handle `\\"' and ';'.

	* read.c (is_end_of_line): Update comments for line separator.
	(read_begin): Set line separator in is_end_of_line to 2.
2009-03-24 01:04:25 +00:00
Joseph Myers cc3f603a65 gas:
* read.c (s_fill, s_space, s_float_space, float_cons, stringer,
	s_incbin): Call md_cons_align (1).

gas/testsuite:
	* gas/arm/mapmisc.d, gas/arm/mapmisc.dat, gas/arm/mapmisc.s: New.
2009-03-05 15:27:59 +00:00
Andrew Stubbs ee3c0378c3 2009-01-26 Andrew Stubbs <ams@codesourcery.com>
gas/
	* config/tc-arm.c (attributes_set_explicitly): New array.
	(s_arm_eabi_attribute): Check return value from s_vendor_attribute.
	(cpu_arch): Add ARM_ARCH_V5T.
	(aeabi_set_attribute_int): New function.
	(aeabi_set_attribute_string): New function.
	(aeabi_set_public_attributes): Set attributes according to the user's
	intentions, rather than the actual state of the binary.
	Use aeabi_set_attribute_int and aeabi_set_attribute_string instead of
	bfd_elf_add_proc_attr_int and bfd_elf_add_proc_attr_string.
	Support WMMXv2. Use attribute names instead of numbers.
	* read.c (s_vendor_attribute): Change return type to int.
	Return the tag number that was set.
	* read.h (s_vendor_attribute): Change return type to int.

	gas/testsuite/
	* gas/arm/attr-cpu-directive.d: New file.
	* gas/arm/attr-cpu-directive.s: New file.
	* gas/arm/attr-default.d: New file.
	* gas/arm/attr-march-all.d: New file.
	* gas/arm/attr-march-armv1.d: New file.
	* gas/arm/attr-march-armv2.d: New file.
	* gas/arm/attr-march-armv2a.d: New file.
	* gas/arm/attr-march-armv2s.d: New file.
	* gas/arm/attr-march-armv3.d: New file.
	* gas/arm/attr-march-armv3m.d: New file.
	* gas/arm/attr-march-armv4.d: New file.
	* gas/arm/attr-march-armv4t.d: New file.
	* gas/arm/attr-march-armv4txm.d: New file.
	* gas/arm/attr-march-armv4xm.d: New file.
	* gas/arm/attr-march-armv5.d: New file.
	* gas/arm/attr-march-armv5t.d: New file.
	* gas/arm/attr-march-armv5te.d: New file.
	* gas/arm/attr-march-armv5tej.d: New file.
	* gas/arm/attr-march-armv5texp.d: New file.
	* gas/arm/attr-march-armv5txm.d: New file.
	* gas/arm/attr-march-armv6-m.d: New file.
	* gas/arm/attr-march-armv6.d: New file.
	* gas/arm/attr-march-armv6j.d: New file.
	* gas/arm/attr-march-armv6k.d: New file.
	* gas/arm/attr-march-armv6kt2.d: New file.
	* gas/arm/attr-march-armv6t2.d: New file.
	* gas/arm/attr-march-armv6z.d: New file.
	* gas/arm/attr-march-armv6zk.d: New file.
	* gas/arm/attr-march-armv6zkt2.d: New file.
	* gas/arm/attr-march-armv6zt2.d: New file.
	* gas/arm/attr-march-armv7-a.d: New file.
	* gas/arm/attr-march-armv7-m.d: New file.
	* gas/arm/attr-march-armv7-r.d: New file.
	* gas/arm/attr-march-armv7.d: New file.
	* gas/arm/attr-march-armv7a.d: New file.
	* gas/arm/attr-march-armv7m.d: New file.
	* gas/arm/attr-march-armv7r.d: New file.
	* gas/arm/attr-march-iwmmxt.d: New file.
	* gas/arm/attr-march-iwmmxt2.d: New file.
	* gas/arm/attr-march-xscale.d: New file.
	* gas/arm/attr-mcpu.d: New file.
	* gas/arm/attr-mfpu-arm1020e.d: New file.
	* gas/arm/attr-mfpu-arm1020t.d: New file.
	* gas/arm/attr-mfpu-arm1136jf-s.d: New file.
	* gas/arm/attr-mfpu-arm1136jfs.d: New file.
	* gas/arm/attr-mfpu-arm7500fe.d: New file.
	* gas/arm/attr-mfpu-fpa.d: New file.
	* gas/arm/attr-mfpu-fpa10.d: New file.
	* gas/arm/attr-mfpu-fpa11.d: New file.
	* gas/arm/attr-mfpu-fpe.d: New file.
	* gas/arm/attr-mfpu-fpe2.d: New file.
	* gas/arm/attr-mfpu-fpe3.d: New file.
	* gas/arm/attr-mfpu-maverick.d: New file.
	* gas/arm/attr-mfpu-neon-fp16.d: New file.
	* gas/arm/attr-mfpu-neon.d: New file.
	* gas/arm/attr-mfpu-softfpa.d: New file.
	* gas/arm/attr-mfpu-softvfp+vfp.d: New file.
	* gas/arm/attr-mfpu-softvfp.d: New file.
	* gas/arm/attr-mfpu-vfp.d: New file.
	* gas/arm/attr-mfpu-vfp10-r0.d: New file.
	* gas/arm/attr-mfpu-vfp10.d: New file.
	* gas/arm/attr-mfpu-vfp3.d: New file.
	* gas/arm/attr-mfpu-vfp9.d: New file.
	* gas/arm/attr-mfpu-vfpv2.d: New file.
	* gas/arm/attr-mfpu-vfpv3-d16.d: New file.
	* gas/arm/attr-mfpu-vfpv3.d: New file.
	* gas/arm/attr-mfpu-vfpxd.d: New file.
	* gas/arm/attr-order.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use.
	* gas/arm/attr-override-cpu-directive.d: New file.
	* gas/arm/attr-override-cpu-directive.s: New file.
	* gas/arm/attr-override-mcpu.d: New file.
	* gas/arm/attr-override-mcpu.s: New file.
	* gas/arm/blank.s: New file.
	* gas/arm/eabi_attr_1.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use.

	ld/testsuite/
	* ld-arm/attr-merge-3.attr: Update following gas change.
	* ld-arm/attr-merge-2.attr: Update Tag_ARM_ISA_use and
	Tag_THUMB_ISA_use following gas changes.
	* ld-arm/attr-merge-4.attr: Likewise.
	* ld-arm/attr-merge-5.attr: Likewise.
	* ld-arm/attr-merge-arch-1.attr: Likewise.
	* ld-arm/attr-merge-arch-2.attr: Likewise.
	* ld-arm/attr-merge-unknown-2.d: Likewise.
	* ld-arm/attr-merge-unknown-2r.d: Likewise.
	* ld-arm/attr-merge-unknown-3.d: Likewise.
	* ld-arm/attr-merge-wchar-00-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-00.d: Likewise.
	* ld-arm/attr-merge-wchar-02-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-02.d: Likewise.
	* ld-arm/attr-merge-wchar-04-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-04.d: Likewise.
	* ld-arm/attr-merge-wchar-20-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-20.d: Likewise.
	* ld-arm/attr-merge-wchar-22-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-22.d: Likewise.
	* ld-arm/attr-merge-wchar-24-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-40-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-40.d: Likewise.
	* ld-arm/attr-merge-wchar-42-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-44-nowarn.d: Likewise.
	* ld-arm/attr-merge-wchar-44.d: Likewise.
	* ld-arm/attr-merge.attr: Likewise.
2009-01-26 14:36:43 +00:00
Andrew Stubbs 2d0bb7614b 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
bfd/
	* elf-attrs.c (is_default_attr): Support defaultless attributes.
	(bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
	(bfd_elf_add_obj_attr_string): Likewise.
	(bfd_elf_add_obj_attr_int_string): Likewise.
	(_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
	* elf-bfd.h (struct obj_attribute): Document new flag bit.
	* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
	Tag_nodefaults has no default value.
	(elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
	comment to reflect the new state.

	gas/
	* read.c (s_vendor_attribute): Allow for unknown flag bits in type.
2009-01-19 11:50:31 +00:00
Andrew Stubbs e04befd0f5 2009-01-16 Andrew Stubbs <ams@codesourcery.com>
Daniel Jacobowitz  <dan@codesourcery.com>

	gas/
	* config/tc-arm.c (arm_copy_symbol_attributes): New function.
	* config/tc-arm.h (arm_copy_symbol_attributes): New prototype.
	(CONVERT_SYMBOLIC_ATTRIBUTE): New define.
	* read.c (s_vendor_attribute): Add support for symbolic tag names.
	Improve string parser.
	* doc/c-arm.texi (ARM Machine Directives): Document
	.eabi_attribute symbolic tag names.

	gas/testsuite/
	* gas/arm/attr-syntax.d: New file.
	* gas/arm/attr-syntax.s: New file.
2009-01-16 10:26:49 +00:00
Andrew Stubbs 7b86a9faa6 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
bfd/
	* elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
	bfd_elf_add_obj_attr_int_string.
	Read Tag_compatibility from its new location in the attribute array,
	rather than the attribute list.
	(_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
	bfd_elf_add_obj_attr_int_string.
	(_bfd_elf_parse_attributes): Likewise.
	(_bfd_elf_merge_object_attributes): There's now only one
	Tag_compatibility, and it's in the array, not the list.
	* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
	Tag_compatibility.
	(bfd_elf_add_obj_attr_compat): Rename to
	bfd_elf_add_obj_attr_int_string.
	(bfd_elf_add_proc_attr_compat): Rename to
	bfd_elf_add_proc_attr_int_string.
	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
	Tag_compatibility.

	gas/
	* read.c (s_vendor_attribute): bfd_elf_add_obj_attr_compat ->
	bfd_elf_add_obj_attr_int_string.
2009-01-15 13:03:05 +00:00
Nick Clifton 4bc2510145 * read.c (emit_expr): Grow frag before filling it so that
dot_value remains valid.
2008-11-14 13:03:25 +00:00
Hans-Peter Nilsson 18d7868b1b * read.c (read_a_source_file): Rearrange evaluation order when
looking for '=' to avoid conditional on undefined contents of
	input_line_pointer[1].
2008-11-12 01:41:12 +00:00
H.J. Lu 97c4f2d9c9 2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
* read.c (pseudo_set): Don't allow global register symbol only
	if TC_GLOBAL_REGISTER_SYMBOL_OK is undefined.
	* symbols.c (S_SET_EXTERNAL): Likewise.

	* config/tc-mmix.h (TC_GLOBAL_REGISTER_SYMBOL_OK): Defined.

	* doc/internals.texi: Document TC_GLOBAL_REGISTER_SYMBOL_OK.
2008-10-07 14:21:59 +00:00
Nick Clifton 7592cfd75d PR 6926
* read.c (get_line_sb): Renamed to get_non_macro_line_sb.
        (_find_end_of_line): Add extra parameter indicating if the line is
        inside a macro.  If it is then do not allow the @ character to be
        treated as a line separator character.
        (read_a_source): Update use of _find_end_of_line.
        (find_end_of_line): Likewise.
        (s_irp): Update use of get_line_sb.
        (s_macro): Likewise.
        (do_repeat): Likewise.
        (get_line_sb): New function.  Like the old version of get_line_sb
        except that it takes an extra parameter indicating whether the
        line is inside a macro.
        (get_macro_line_sb): New function.
2008-10-06 08:17:47 +00:00
Nick Clifton 5808f4a685 PR gas/5895
* read.c (s_mexit): Warn if attempting to exit a macro when not
   inside a macro definition.

   * gas/macros/exit.s: New test case.
   * gas/macros/macros.exp: Run the new test, expect it to produce an
   error result.
2008-03-13 10:51:33 +00:00
H.J. Lu d0548f348f gas/
2008-03-03  Denys Vlasenko <vda.linux@googlemail.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/5543
	* read.c (pseudo_set): Don't allow global register symbol.

	* symbols.c (S_SET_EXTERNAL): Don't allow register symbol
	global.

2008-03-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/5543
	* write.c (write_object_file): Don't allow symbols which were
	equated to register.  Stop if there is an error.

gas/testsuite/

2008-03-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/5543
	* gas/i386/i386.exp: Run inval-equ-1 and inval-equ-2.

	* gas/i386/inval-equ-1.l: New.
	* gas/i386/inval-equ-1.s: Likewise.
	* gas/i386/inval-equ-2.l: Likewise.
	* gas/i386/inval-equ-2.s: Likewise.
2008-03-03 15:28:58 +00:00
Alan Modra 1bf57e9fa3 * read.c (s_weakref): Don't pass unadorned NULL to concat.
* config/tc-i386.c (set_cpu_arch, md_parse_option): Likewise.
2008-02-07 08:40:29 +00:00
Nick Clifton 6e3d6dc1ed Add mingw I64 support for printing long and long long values 2008-01-25 16:18:41 +00:00
Andreas Schwab a4a151e6b1 * read.c (s_space): Declare `repeat' as offsetT. 2008-01-11 16:18:43 +00:00
Bob Wilson 7ddd14deff gas/
* dwarf2dbg.c (out_sleb128): Delete.
	(size_fixed_inc_line_addr, emit_fixed_inc_line_addr): New.
	(out_fixed_inc_line_addr): Delete.
	(relax_inc_line_addr, dwarf2dbg_estimate_size_before_relax): Call new
	size_fixed_inc_line_addr if DWARF2_USE_FIXED_ADVANCE_PC is set.
	(dwarf2dbg_convert_frag): Likewise for emit_fixed_inc_line_addr.
	(process_entries): Remove calls to out_fixed_inc_line_addr.  When
	DWARF2_USE_FIXED_ADVANCE_PC is set, call relax_inc_line_addr.
	* read.h (emit_expr_fix): New prototype.
	* read.c (emit_expr): Move code to emit_expr_fix and use it here.
	(emit_expr_fix): New.
testsuite/
	* gas/lns/lns.exp: Run new lns-big-delta test for targets that set
	DWARF2_USE_FIXED_ADVANCE_PC.
	* gas/lns/lns-big-delta.s: New.
	* gas/lns/lns-big-delta.d: New.
2008-01-09 17:30:59 +00:00
Danny Smith 11ec4ba977 include
* coff/pe.h (COFF_ENCODE_ALIGNMENT) Define.

gas
	* read.c (ALIGN_LIMIT): Rename to ...
	(TC_ALIGN_LIMIT): Guard against prior definition.
	* config/tc-i386.h (TC_ALIGN_LIMIT)[TE_PE]: Define.

bfd
	* pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Let .data, .text
	 and .bss section use the default.
	* pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.

ld/testsuite
	* ld-scripts/align.exp: Enable for PECOFF.
	* ld-scripts/alignof.exp: Likewise.
2007-11-04 23:49:09 +00:00
Nick Clifton 499ac35361 Remove duplicate definitions of the md_atof() function 2007-10-17 16:45:56 +00:00
Alan Modra 05f4ab67ff * read.c (do_s_func): Check asprintf return status.
* stabs.c (stabs_generate_asm_func): Likewise.
	(stabs_generate_asm_endfunc): Likewise.
2007-10-15 02:01:25 +00:00
Nick Clifton 38a57ae7a5 * read.c (potable): Add string8, string16, string32 and string64. Add bit size for stringer function.
(stringer_append_char): New.
 (stringer): Use stringer_append_char().
* config/obj-coff.c (obj_coff_ident): Add bit size for stringer function.
* config/obj-elf.c (obj_elf_ident): Likewise.
* config/tc-alpha.c (s_alpha_stringer): Likewise.
* config/tc-dlx.c (dlx_pseudo_table): Likewise.
* config/tc-hppa.c (pa_stringer): Likewise.
* config/tc-ia64.c (md_pseudo_table, pseudo_opcode): Likewise.
* config/tc-m68hc11.c (md_pseudo_table): Likewise.
* config/tc-mcore.c (md_pseudo_table): Likewise.
* config/tc-mips.c (mips_pseudo_table): Likewise.
* config/tc-spu.c (md_pseudo_table): Likewise.
* config/tc-s390.c (md_pseudo_table): Likewise. Replace '2' by '1'.
* doc/as.texinfo (ABORT): Fix identing.
  (String): Document new string8, string16, string32, string64 functions.
* NEWS: Mention the new feature.

* testsuite/gas/all/gas.exp: Include new test "strings".
* testsuite/gas/all/string.s: New
* testsuite/gas/all/string.d: New.
2007-10-04 17:05:37 +00:00
Alan Modra b6ac5419b4 PR gas/5026
* read.c (emit_expr): Only use long long if required and available.
2007-09-18 01:05:44 +00:00
Nick Clifton 5c61236951 PR gas/5026
* read.c (emit_expr): Use unsigned long long values in warning message about
  truncated expressions.
2007-09-17 16:34:47 +00:00
Nick Clifton ec2655a6a7 Switch to GPLv3 2007-07-03 11:01:12 +00:00
Joseph Myers 104d59d19c bfd:
* elf-attrs.c: New.
	* Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
	(BFD32_BACKENDS_CFILES): Add elf-attrs.c.
	(elf-attrs.lo): Generate dependencies.
	* Makefile.in: Regenerate.
	* configure.in (elf): Add elf-attrs.lo.
	* configure: Regenerate.
	* elf-bfd.h (struct elf_backend_data): Add entries for object
	attributes.
	(NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
	OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
	Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
	New.
	(struct elf_obj_tdata): Add entries for object attributes.
	(elf_known_obj_attributes, elf_other_obj_attributes,
	elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
	New.
	(bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
	bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
	bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
	bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
	bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
	_bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
	_bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
	* elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
	(bfd_section_from_shdr): Handle attributes sections.
	* elflink.c (bfd_elf_final_link): Handle attributes sections.
	* elfxx-target.h (elf_backend_obj_attrs_vendor,
	elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
	elf_backend_obj_attrs_section_type): New.
	(elfNN_bed): Update.
	* elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
	aeabi_attribute_list): Remove.
	(struct elf32_arm_obj_tdata): Remove object attributes fields.
	(check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
	elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
	Update for new object attributes interfaces.
	(uleb128_size, is_default_attr, eabi_attr_size,
	elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
	elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
	elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
	elf32_arm_add_eabi_attr_int, attr_strdup,
	elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
	copy_eabi_attributes, elf32_arm_parse_attributes): Remove.  Moved
	to generic code in elf-attrs.c.
	(elf32_arm_obj_attrs_arg_type): New.
	(elf32_arm_fake_sections): Do not handle .ARM.attributes.
	(elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
	(bfd_elf32_bfd_final_link): Remove.
	(elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
	elf_backend_obj_attrs_arg_type,
	elf_backend_obj_attrs_section_type): New.
	* elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
	attributes.
	* elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
	* elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
	* elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
	* elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
	* elf32-sh.c (sh_elf_copy_private_data): Likewise.
	* elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.

binutils:
	* readelf.c (display_gnu_attribute): New.
	(process_arm_specific): Rearrange as process_attributes.
	(process_arm_specific): Replace by wrapper of process_attributes.

gas:
	* as.c (create_obj_attrs_section): New.
	(main): Call create_obj_attrs_section for ELF.
	* read.c (s_gnu_attribute, skip_whitespace, skip_past_char,
	skip_past_comma, s_vendor_attribute): New.
	(potable): Add gnu_attribute for ELF.
	* read.h (s_vendor_attribute): Declare.
	* config/tc-arm.c (s_arm_eabi_attribute): Replace by wrapper
	round s_vendor_attribute.
	(aeabi_set_public_attributes): Update for new attributes
	interfaces.
	(arm_md_end): Remove attributes contents setting now done
	generically.

include/elf:
	* arm.h (elf32_arm_add_eabi_attr_int,
	elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
	elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
	elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
	Tag_Symbol, Tag_compatibility): Remove.
	* common.h (SHT_GNU_ATTRIBUTES): Define.

ld:
	* emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes.
	(ATTRS_SECTIONS): Define.
	* scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc,
	scripttempl/elf_chaos.sc, scripttempl/elfi370.sc,
	scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
2007-06-29 16:29:17 +00:00
Alan Modra d2bdaea822 * read.c (read_a_source_file): Skip multiple spaces to
cover hack in mmix md_start_line_hook which overwrites a
	colon with a space.  Delete sermon and needless assertion.
2007-04-22 05:27:58 +00:00
Alan Modra db55703487 gas/
* expr.c (expr): Assert on rankarg, not rank which can be unsigned.
	* read.c (read_a_source_file): Remove buffer_limit[-1] assertion.
	Don't skip over NUL char.
	(pseudo_set): Set X_op for registers to O_register.
	* symbols.c (symbol_clone): Remove assertion that sym is defined.
	(resolve_symbol_value): Resolve O_register symbols.
	* config/tc-i386.c (parse_real_register): Don't use i386_float_regtab.
	Instead find st(0) by hash lookup.
	* config/tc-ppc.c (ppc_macro): Warning fix.
opcodes/
	* i386-opc.c (i386_float_regtab, i386_float_regtab_size): Delete.
	Move contents to..
	(i386_regtab): ..here.
	* i386-opc.h (i386_float_regtab, i386_float_regtab_size): Delete.
2007-04-21 06:54:57 +00:00
Alan Modra 05e9452c82 * doc/as.texinfo (Reloc): Document.
* read.c (potable): Add "reloc".
	(s_reloc): New function.
	* write.c (reloc_list): New global var.
	(resolve_reloc_expr_symbols): New function.
	(write_object_file): Call it.
	(write_relocs): Process reloc_list.
	* write.h (struct reloc_list): New.
	(reloc_list): Declare.
2007-03-26 12:23:48 +00:00
Alexandre Oliva e9fc6c2100 * app.c (do_scrub_chars): Recognize comments after # line "file".
* read.c (get_linefile_number): New.
(s_app_line): Accept ill-formed .linefile lines as comments.
2007-03-09 23:25:59 +00:00
Alexandre Oliva 93e914b2d9 * app.c (do_scrub_chars): Turn #<line>"file"flags into .linefile.
* as.h (new_logical_line_flags): New.
* input-scrub.c (new_logical_line): Turned into wrapper for...
(new_logical_line_flags): this.  Handle flags.
* read.c (potable): Add linefile.  Adjust appline argument.
(s_app_file): Fake .appfiles no more.
(s_app_line): For .linefile, accept file name and flags.
2007-03-09 07:14:23 +00:00
Nick Clifton fb25138b35 * read.c (s_align): Initialize the 'stopc' variable to prevent
compiler complaints about it being used without being initialized.
 (s_comm_internal, s_mri_common, s_fail, s_globl, s_space,
  s_float_space, s_struct, cons_worker, equals): Likewise.
2006-08-29 15:19:43 +00:00
Nick Clifton 601e61cdeb PR/2756
* read.c (read_a_source_file): Ignore unknown text after line comment
  character.  Fix misleading comment.
2006-07-24 16:30:55 +00:00
Thiemo Seufer f43abd2b39 * read.c (s_struct): Use IS_ELF.
* config/tc-mips.c (md_begin, mips16_mark_labels, mips_ip,
	md_parse_option, s_change_sec, pic_need_relax, mips_fix_adjustable,
	tc_gen_reloc, mips_frob_file_after_relocs, s_mips_end, s_mips_frame,
	s_mips_mask): Likewise.
2006-07-17 10:40:11 +00:00
Thiemo Seufer a2902af6f4 * read.c (s_struct): Handle ELF section changing.
* config/tc-mips.c (s_align): Leave enabling auto-align to the
	generic code.
	(s_change_sec): Try section changing only if we output ELF.
2006-07-16 10:19:19 +00:00
Alan Modra ebd1c8757c remove some duplicate #include's. 2006-06-07 11:27:58 +00:00
Ben Elliston 89cdfe5739 * listing.c (listing_listing): Remove useless loop.
* macro.c (macro_expand): Remove is_positional local variable.
	* read.c (s_comm_internal): Simplify `if' condition 1 || x -> 1
	and simplify surrounding expressions, where possible.
	(assign_symbol): Likewise.
	(s_weakref): Likewise.
	* symbols.c (colon): Likewise.
2006-05-01 09:21:46 +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
Alan Modra 86ebace269 * config/tc-ppc.c (ppc_pe_comm): Set bfd_com_section segment.
* config/tc-alpha.c (s_alpha_comm): Likewise.  Also, remove
	redundant check.
	* read.c (s_lsym): Remove non-BFD assembler sym handling.
2005-11-16 01:49:48 +00:00
Alan Modra 9eda1ce917 * read.c (s_comm_internal): Set bfd_com_section segment.
(s_mri_common): Likewise.
	* write.c (write_object_file): Remove non-BFD assembler common
	sym handling.
2005-11-15 22:58:38 +00:00
Alexandre Oliva b54788f893 gas/ChangeLog:
* read.c (s_weakref): Do not permit redefinitions.
* symbols.c (colon): Do not permit redefinitions of equated
symbols.
gas/testsuite/ChangeLog:
* gas/all/gas.exp: Remove weakref xfail.  Run weakref4.s.
* gas/all/weakref1.s: Move redefinition bits to...
* gas/all/weakref4.s: ... new file.
* gas/all/weakref1.d: Remove command moved to weakref1u.  Adjust
remaining command for leading tabs.  Regenerate.
* gas/all/weakref1l.d: Regenerate.
* gas/all/weakref1u.d: Likewise.
* gas/all/wealref1w.d: Likewise.
2005-11-04 19:45:25 +00:00
Jan Beulich 6a2b6326c2 gas/
2005-10-27  Jan Beulich  <jbeulich@novell.com>

	* read.c (assign_symbol): Also consider equates already defined.
	* symbols.c (symbol_clone): Also clone the underlying BFD symbol.
	* config/obj-coff.h (obj_symbol_clone_hook): New.
	(coff_obj_symbol_clone_hook): Declare.
	* config/obj-coff.c (coff_obj_symbol_clone_hook): New.

gas/testsuite/
2005-10-27  Jan Beulich  <jbeulich@novell.com>

	* gas/all/gas.exp: Don't xfail equiv1 test anymore.
2005-10-27 07:40:07 +00:00
Alexandre Oliva 06e77878ef gas/ChangeLog:
* read.c (potable): Add weakref.
(s_weakref): New.
* read.h (s_weakref): Declare.
* struc-symbol.h (struct symbol): Add sy_weakrefr and sy_weakrefd.
* symbols.c (colon): Clear weakrefr.
(symbol_find_exact): Rename to, and reimplement in terms of...
(symbol_find_exact_noref): ... new function.
(symbol_find): Likewise...
(symbol_find_noref): ... ditto.
(resolve_symbol_value): Resolve weakrefr without setting their
values.
(S_SET_WEAK): Call hook.
(S_GET_VALUE): Follow weakref link.
(S_SET_VALUE): Clear weakrefr.
(S_IS_WEAK): Follow weakref link.
(S_IS_WEAKREFR, S_SET_WEAKREFR, S_CLEAR_WEAKREFR): New.
(S_IS_WEAKREFD, S_SET_WEAKREFD, S_CLEAR_WEAKREFD): New.
(symbol_set_value_expression, symbol_set_frag): Clear weakrefr.
(symbol_mark_used): Follow weakref link.
(print_symbol_value_1): Print weak, weakrefr and weakrefd.
* symbols.h (symbol_find_noref, symbol_find_exact_noref): Declare.
(S_IS_WEAKREFR, S_SET_WEAKREFR, S_CLEAR_WEAKREFR): Declare.
(S_IS_WEAKREFD, S_SET_WEAKREFD, S_CLEAR_WEAKREFD): Declare.
* write.c (adust_reloc_syms): Follow weakref link.  Do not
complain if target is undefined.
(write_object_file): Likewise.  Remove weakrefr symbols.  Drop
unreferenced weakrefd symbols.
* config/obj-coff.c (obj_frob_symbol): Do not force WEAKREFD
symbols EXTERNAL.
(pecoff_obj_set_weak_hook, pecoff_obj_clear_weak_hook): New.
* config/obj-coff.h (obj_set_weak_hook, obj_clear_weak_hook): Define.
* doc/as.texinfo: Document weakref.
* doc/internals.texi: Document new struct members, internal
functions and hooks.
gas/testsuite/ChangeLog:
* gas/all/weakref1.s, gas/all/weakref1.d: New test.
* gas/all/weakref1g.d, gas/all/weakref1l.d: New tests.
* gas/all/weakref1u.d, gas/all/weakref1w.d: New tests.
* gas/all/weakref2.s, gas/all/weakref3.s: New tests.
* gas/all/gas.exp: Run new tests.
2005-10-24 17:51:42 +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
Alan Modra 66bd02d33d * read.c (pseudo_set): Don't set undefined symbols to expr_section. 2005-09-21 00:12:19 +00:00
Alan Modra aba4aa7d5d * read.c (pseudo_set): Set segment of expression syms to expr_section. 2005-09-20 03:06:13 +00:00
Alan Modra 7be1c4891a * README-vms: Delete.
* config-gas.com: Delete.
	* makefile.vms: Delete.
	* vmsconf.sh: Delete.
	* config/atof-tahoe.c: Delete.
	* config/m88k-opcode.h: Delete.
	* config/obj-bout.c: Delete.
	* config/obj-bout.h: Delete.
	* config/obj-hp300.c: Delete.
	* config/obj-hp300.h: Delete.
	* config/tc-a29k.c: Delete.
	* config/tc-a29k.h: Delete.
	* config/tc-h8500.c: Delete.
	* config/tc-h8500.h: Delete.
	* config/tc-m88k.c: Delete.
	* config/tc-m88k.h: Delete.
	* config/tc-tahoe.c: Delete.
	* config/tc-tahoe.h: Delete.
	* config/tc-tic80.c: Delete.
	* config/tc-tic80.h: Delete.
	* config/tc-w65.c: Delete.
	* config/tc-w65.h: Delete.
	* config/te-aux.h: Delete.
	* config/te-delt88.h: Delete.
	* config/te-delta.h: Delete.
	* config/te-dpx2.h: Delete.
	* config/te-hp300.h: Delete.
	* config/te-ic960.h: Delete.
	* config/vms-a-conf.h: Delete.
	* doc/c-a29k.texi: Delete.
	* doc/c-h8500.texi: Delete.
	* doc/c-m88k.texi: Delete.
	* README: Remove obsolete examples, and list of supported targets.
	* Makefile.am: Remove a29k, h8500, m88k, tahoe, tic80, w65,
	bout and hp300 support.
	(DEP_FLAGS): Don't define BFD_ASSEMBLER.
	* configure.in: Remove --enable-bfd-assembler, need_bfd,
	primary_bfd_gas.
	* configure.tgt: Remove a29k, h8300-coff, h8500-*, i960 non-elf,
	m68k non bfd, m88k, or32-coff, tic80-*, vax non-bfd, w65k-*, *-nindy.
	* as.c: Remove all non-BFD_ASSEMBLER code, support for above targets.
	* as.h: Likewise.
	* dw2gencfi.c: Likewise.
	* dwarf2dbg.c: Likewise.
	* ehopt.c: Likewise.
	* input-file.c: Likewise.
	* listing.c: Likewise.
	* literal.c: Likewise.
	* messages.c: Likewise.
	* obj.h: Likewise.
	* output-file.c: Likewise.
	* read.c: Likewise.
	* stabs.c: Likewise.
	* struc-symbol.h: Likewise.
	* subsegs.c: Likewise.
	* subsegs.h: Likewise.
	* symbols.c: Likewise.
	* symbols.h: Likewise.
	* tc.h: Likewise.
	* write.c: Likewise.
	* write.h: Likewise.
	* config/aout_gnu.h: Likewise.
	* config/obj-aout.c: Likewise.
	* config/obj-aout.h: Likewise.
	* config/obj-coff.c: Likewise.
	* config/obj-coff.h: Likewise.
	* config/obj-evax.h: Likewise.
	* config/obj-ieee.h: Likewise.
	* config/tc-arm.c: Likewise.
	* config/tc-arm.h: Likewise.
	* config/tc-avr.c: Likewise.
	* config/tc-avr.h: Likewise.
	* config/tc-crx.h: Likewise.
	* config/tc-d10v.h: Likewise.
	* config/tc-d30v.h: Likewise.
	* config/tc-dlx.h: Likewise.
	* config/tc-fr30.h: Likewise.
	* config/tc-frv.h: Likewise.
	* config/tc-h8300.c: Likewise.
	* config/tc-h8300.h: Likewise.
	* config/tc-hppa.h: Likewise.
	* config/tc-i370.h: Likewise.
	* config/tc-i386.c: Likewise.
	* config/tc-i386.h: Likewise.
	* config/tc-i860.h: Likewise.
	* config/tc-i960.c: Likewise.
	* config/tc-i960.h: Likewise.
	* config/tc-ip2k.h: Likewise.
	* config/tc-iq2000.h: Likewise.
	* config/tc-m32c.h: Likewise.
	* config/tc-m32r.h: Likewise.
	* config/tc-m68hc11.h: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-m68k.h: Likewise.
	* config/tc-maxq.c: Likewise.
	* config/tc-maxq.h: Likewise.
	* config/tc-mcore.c: Likewise.
	* config/tc-mcore.h: Likewise.
	* config/tc-mn10200.h: Likewise.
	* config/tc-mn10300.c: Likewise.
	* config/tc-mn10300.h: Likewise.
	* config/tc-ms1.h: Likewise.
	* config/tc-msp430.c: Likewise.
	* config/tc-msp430.h: Likewise.
	* config/tc-ns32k.c: Likewise.
	* config/tc-ns32k.h: Likewise.
	* config/tc-openrisc.h: Likewise.
	* config/tc-or32.c: Likewise.
	* config/tc-or32.h: Likewise.
	* config/tc-ppc.c: Likewise.
	* config/tc-ppc.h: Likewise.
	* config/tc-s390.h: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-sh.h: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-tic30.c: Likewise.
	* config/tc-tic30.h: Likewise.
	* config/tc-tic4x.c: Likewise.
	* config/tc-tic4x.h: Likewise.
	* config/tc-tic54x.c: Likewise.
	* config/tc-tic54x.h: Likewise.
	* config/tc-v850.h: Likewise.
	* config/tc-vax.c: Likewise.
	* config/tc-vax.h: Likewise.
	* config/tc-xstormy16.h: Likewise.
	* config/tc-xtensa.h: Likewise.
	* config/tc-z8k.c: Likewise.
	* config/tc-z8k.h: Likewise.
	* config/vms-a-conf.h
	* doc/Makefile.am: Likewise.
	* doc/all.texi: Likewise.
	* doc/as.texinfo: Likewise.
	* doc/Makefile.in: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* config.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2005-08-11 01:25:29 +00:00
Nick Clifton 47837f8ec2 (s_app_line): Accept a line number of 0 for compatibility with gcc's output
for assembler-with-cpp files.
2005-08-07 10:34:52 +00:00
Jan Beulich 40a4d956e2 gas/
2005-05-17  Jan Beulich  <jbeulich@novell.com>

	* read.c (_find_end_of_line): New.
	(find_end_of_line): New.
	(HANDLE_CONDITIONAL_ASSEMBLY): Use it.
	(read_a_source_file): Use it.
	(s_globl): Use it.
	(s_macro): Use it.
	(get_line_sb): Use it.
	(s_errwarn): Replace discard_rest_of_line by ignore_rest_of_line.
	(s_comm_internal): Likewise.
	(s_lsym): Likewise.
	(s_macro): Likewise.
	(s_ignore): Use ignore_rest_of_line.
	* read.h (find_end_of_line): Prototype.
	(discard_rest_of_line): Remove prototype. #define to
	ignore_rest_of_line.

gas/testsuite/
2005-05-17  Jan Beulich  <jbeulich@novell.com>

	* gas/mmix/err-byte1.s: Adjust expected error text on line 10.
2005-05-17 14:02:30 +00:00