Commit Graph

6063 Commits

Author SHA1 Message Date
Iain Sandoe 687be931eb handle absolute indirect syms in mach-o
bfd:

	* mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
	indirect symbols.
gas:

	* config/obj-macho.c (obj_mach_o_set_indirect_symbols): Handle
	absolute indirect symbols.

gas/testsuite:

	* gas/mach-o/dysymtab-3.d: New.
	* gas/mach-o/symbols-7.s: New.
2012-01-13 12:59:30 +00:00
Iain Sandoe c3402d2056 set vma on mach-o sections.
gas:

	* config/obj-macho.c (obj_mach_o_set_vma_data): New type.
	(obj_mach_o_set_section_vma): New.
	(obj_mach_o_post_relax_hook): New.
	* config/obj-macho.h (md_post_relax_hook): Define.
	(obj_mach_o_post_relax_hook): Declare.

gas/testsuite:

	* gas/mach-o/dysymtab-2.d: Update to include the set VMA.
	* gas/mach-o/symbols-1-64.d: Likewise.
	* gas/mach-o/symbols-1.d: Likewise.
	* gas/mach-o/symbols-6.d: Likewise.
	* gas/mach-o/zerofill-1.d: Likewise.
	* gas/mach-o/zerofill-2.d: Likewise.
2012-01-13 11:55:02 +00:00
Iain Sandoe 50d10658ee add indirect_symbol to mach-o port.
bfd:

	* mach-o.c (bfd_mach_o_count_indirect_symbols): New.
	(bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
	* mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
	file. (bfd_mach_o_section): Add indirect_syms field.

gas:

	* config/obj-macho.c (obj_mach_o_set_symbol_qualifier): Switch off
	lazy when the symbol is private_extern.
	(obj_mach_o_indirect_sym): New type.
	(obj_mach_o_indirect_symbol): New.
	(mach_o_pseudo_table): Use obj_mach_o_indirect_symbol.
	(obj_macho_frob_label): Adjust to avoid adding bsyms for locals.
	(obj_macho_frob_label): Likewise.  Adjust external and comm
	symbol tests.
	(obj_mach_o_set_indirect_symbols): New.
	(obj_mach_o_frob_file_after_relocs): New.
	*config/obj-macho.h (obj_frob_file_after_relocs): Define.
	(obj_mach_o_frob_file_after_relocs): Declare.

include/mach-o:

	* loader.h (BFD_MACH_O_INDIRECT_SYM_LOCAL): New.
	(BFD_MACH_O_INDIRECT_SYM_ABS): New

gas/testsuite:

	* gas/mach-o/dysymtab-2.d: New.
	* gas/mach-o/err-syms-4.s: New.
	* gas/mach-o/err-syms-5.s: New.
	* gas/mach-o/err-syms-6.s: New.
	* gas/mach-o/symbols-6-64.d: New.
	* gas/mach-o/symbols-6-64.s: New.
	* gas/mach-o/symbols-6.d: New.
	* gas/mach-o/symbols-6.s: New.
2012-01-12 14:03:12 +00:00
Tristan Gingold 0a4734dc09 2012-01-12 Tristan Gingold <gingold@adacore.com>
PR gas/13591
	* config/obj-coff.h (sy_obj): Rename macro to avoid a name conflict.
2012-01-12 08:53:34 +00:00
Tristan Gingold 158184ac9e 2012-01-10 Tristan Gingold <gingold@adacore.com>
* struc-symbol.h (struct symbol_flags): New struct, created from...
	(struct symbol): ... this one.  Add sy_flags field, remove flag fields.
	(struct local_symbol): Replace lsy_marker field by lsy_flags.
	Adjust comment.
	(local_symbol_resolved_p): Adjust.
	(local_symbol_mark_resolved): Likewise.
	* symbols.c (LOCAL_SYMBOL_CHECK): Adjust.
	(local_symbol_make, local_symbol_convert, colon)
	(symbol_clone_if_forward_ref, verify_symbol_chain)
	(resolve_symbol_value, snapshot_symbol, S_GET_VALUE)
	(S_IS_WEAKREFR, S_IS_WEAKREFD, S_IS_VOLATILE, S_IS_FORWARD_REF)
	(S_SET_WEAKREFR, S_CLEAR_WEAKREFR, S_SET_WEAKREFD)
	(S_CLEAR_WEAKREFD, S_SET_VOLATILE, S_CLEAR_VOLATILE)
	(S_SET_FORWARD_REF, symbol_same_p, symbol_mark_used)
	(symbol_clear_used, symbol_used_p, symbol_mark_used_in_reloc)
	(symbol_clear_used_in_reloc, symbol_used_in_reloc_p)
	(symbol_mark_mri_common, symbol_clear_mri_common)
	(symbol_mri_common_p, symbol_mark_written, symbol_clear_written)
	(symbol_written_p, symbol_mark_resolved, symbol_resolved_p)
	(symbol_equated_reloc_p, dot_symbol_init)
	(print_symbol_value_1): Adjust.
2012-01-10 11:48:26 +00:00
Iain Sandoe b22161d698 add symbol qualifiers for mach-o to bfd/gas
bfd:

	* mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
	(bfd_mach_o_write_symtab): Remove handling for indirect syms.
	(bfd_mach_o_primary_symbol_sort_key): Likewise.
	(bfd_mach_o_cf_symbols): Likewise.
	(bfd_mach_o_sort_symbol_table): Remove.
	(bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
	for indirect and dysymtab counts.  Do the symbol sorting here.
	(bfd_mach_o_build_dysymtab_command): Count the symbol types here.
	Make the indirect symbols a TODO.
	(bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
	(bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
	a non-zero value.
	(bfd_mach_o_read_symtab_symbol): Record the symbol index.
	(bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
	* mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
	(IS_MACHO_INDIRECT): Remove.
	(SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.

gas:

	* config/obj-macho.c (obj_mach_o_weak): Remove.
	(obj_mach_o_common_parse): Set symbol qualifiers.
	(LAZY, REFE): New macros.
	(obj_mach_o_symbol_type): New enum.
	(obj_mach_o_set_symbol_qualifier): New.
	(obj_mach_o_sym_qual): New.
	(mach_o_pseudo_table): Add symbol qualifiers, set indirect_symbol to
	a dummy function.
	(obj_mach_o_type_for_symbol): New.
	(obj_macho_frob_label): New.
	(obj_macho_frob_symbol): New.
	* config/obj-macho.h (S_SET_ALIGN): Amend temorary var name.
	(obj_frob_label, obj_macho_frob_label): Declare.
	(obj_frob_symbol, obj_macho_frob_symbol): Declare.

gas/testsuite:

	* gas/mach-o/err-syms-1.s: New.
	* gas/mach-o/err-syms-2.s: New.
	* gas/mach-o/err-syms-3.s: New.
	* gas/mach-o/symbols-2.d: New.
	* gas/mach-o/symbols-2.s: New.
	* gas/mach-o/symbols-3.s: New.
	* gas/mach-o/symbols-4.s: New.
	* gas/mach-o/symbols-5.d: New.
	* gas/mach-o/symbols-5.s: New.
2012-01-09 10:47:50 +00:00
Richard Sandiford de64cffdf8 gas/
* config/tc-mips.c (s_tls_rel_directive): Call mips_clear_insn_labels.

gas/testsuite/
	* gas/mips/tls-relw.s, gas/mips/tls-relw.d: New test.
	* gas/mips/mips.exp: Run it.
2012-01-08 12:33:54 +00:00
Richard Sandiford 462427c418 gas/
2011-01-08  Andrew Pinski  <andrew.pinski@caviumnetworks.com>
	    Richard Sandiford  <rdsandiford@googlemail.com>

	* config/tc-mips.c (mips_move_labels): Take the list of labels and
	textness as parameters.
	(mips_move_text_labels): New function.
	(append_insn): Use it instead of mips_move_labels.
	(mips_emit_delays, start_noreorder): Likewise.
	(mips_align): Take the labels rather than just one label.
	Move all labels to after the .align.
	(s_align): Change the last argument to mips_align.
	(s_cons): Likewise.
	(s_float_cons): Likewise.
	(s_gpword): Likewise.
	(s_gpdword): Likewise.

gas/testsuite/
	* gas/mips/align3.s, gas/mips/align3.d: New testcase.
	* gas/mips/mips.exp: Run it.
2012-01-08 12:11:42 +00:00
Tristan Gingold d382c57985 2012-01-06 Tristan Gingold <gingold@adacore.com>
* config/tc-i386.c: Update copyright year.
	(lex_got): Also defined for Mach-O.
	Add a guard for non-ELF configuration.
	(md_longopts): Also handle -64 for Mach-O.
	(md_parse_option): Likewise.
	(i386_target_format): Adjust for x86_64-darwin.
2012-01-06 16:23:39 +00:00
Nick Clifton 23e1d3291c Rotate ChangeLogs 2012-01-05 10:09:39 +00:00
Iain Sandoe 8b282ca52a gas/testsuite:
* gas/mach-o/zerofill-2.d: New.
2012-01-04 11:25:11 +00:00
Iain Sandoe 8cf6e08400 add .zerofill to mach-o GAS.
gas:

	* config/obj-macho.c (obj_mach_o_segT_from_bfd_name): Tidy definition.
	(obj_mach_o_get_section_names): New (split from obj_mach_o_section).
	(obj_mach_o_make_or_get_sect): Likewise.
	(obj_mach_o_section): Split out the functionality shared with zerofill.
	(obj_mach_o_zerofill): New.
	(obj_mach_o_common_parse): Ensure whitespace is skipped.
	(mach_o_pseudo_table): Add .zerofill.

gas/testsuite:

	* gas/mach-o/zerofill-1.d: New.
	* gas/mach-o/zerofill-1.s: New.
2012-01-04 10:59:54 +00:00
Iain Sandoe 68588f9540 support stabs on mach-o GAS.
bfd:

	* mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
	for stabd symbols.
	(bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
	(bfd_mach_o_cf_symbols): Likewise.

gas:

	* config/obj-macho.c (obj_macho_process_stab): New.
	* config/obj-macho.h (OBJ_PROCESS_STAB): Define.
	(obj_macho_process_stab): Declare.
2012-01-03 13:18:48 +00:00
Iain Sandoe 7f3072381b add dysymtab write support to bfd/mach-o.
bfd:

	* mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
	as the value of an indirect symbol.  Keep the string table index in
	non-indirect syms for reference.
	(bfd_mach_o_write_dysymtab): New.
	(bfd_mach_o_primary_symbol_sort_key): New.
	(bfd_mach_o_cf_symbols): New.
	(bfd_mach_o_sort_symbol_table): New.
	(bfd_mach_o_mangle_symbols): Return early if no symbols.  Sort symbols.
	If we are emitting a dysymtab, process indirect symbols and count the
	number of each other kind.
	(bfd_mach_o_mangle_sections): New.
	(bfd_mach_o_write_contents): Split out some pre-requisite code into
	the command builder. Write dysymtab if the command is present.
	(bfd_mach_o_count_sections_for_seg): New.
	(bfd_mach_o_build_seg_command): New.
	(bfd_mach_o_build_dysymtab_command): New.
	(bfd_mach_o_build_commands): Reorganize to support the fact that some
	commands are optional and should not be emitted if there are no
	sections or symbols.
	(bfd_mach_o_set_section_contents): Amend comment.
	* mach-o.h: Amend and add to comments.
	(mach_o_data_struct): Add fields for dysymtab symbols counts and a
	pointer to the indirects, when present.
	(bfd_mach_o_should_emit_dysymtab): New macro.
	(IS_MACHO_INDIRECT): Likewise.

gas/testsuite:

	* gas/mach-o/dysymtab-1-64.d: New.
	* gas/mach-o/dysymtab-1.d: New.
	* gas/mach-o/symbols-1-64.d: New.
	* gas/mach-o/symbols-1.d: New.
	* gas/mach-o/symbols-base-64.s: New.
	* gas/mach-o/symbols-base.s: New.
2012-01-03 10:54:01 +00:00
Iain Sandoe bcf0aac6f6 adjust mach-o default GAS sections.
gas:

	* as.c (perform_an_assembly_pass): Do not create text, data and bss
	sections for MACH-O.  Do not switch to the text section.
	* config/obj-macho.c (obj_mach_o_segT_from_bfd_name): Forward decl.
	(mach_o_begin): Startup with only text section unless suppressed.
	* config/obj-macho.h (obj_begin): define to mach_o_begin ().

gas/testsuite:

	* gas/mach-o/sections-1.d: Amend to recognize that bss is not emitted
	by default.
	* gas/mach-o/sections-2.d: New.
2011-12-29 10:53:10 +00:00
DJ Delorie 9cea966c22 [bfd]
* elf32-rl78.c (rl78_elf_howto_table): Add R_RL78_RH_RELAX.
	(rl78_reloc_map): Add BFD_RELOC_RL78_RELAX.
	(rl78_elf_relocate_section): Add R_RL78_RH_RELAX, R_RL78_RH_SFR,
	and R_RL78_RH_SADDR.
	(rl78_elf_finish_dynamic_sections): Only validate PLT section if
	we didn't relax anything, as relaxing might remove a PLT reference
	after we've set up the table.
	(elf32_rl78_relax_delete_bytes): New.
	(reloc_bubblesort): New.
	(rl78_offset_for_reloc): New.
	(relax_addr16): New.
	(rl78_elf_relax_section): Add support for relaxing long
	instructions into short ones.

[gas]
	* config/rl78-defs.h (rl78_linkrelax_addr16): Add.
	(rl78_linkrelax_dsp, rl78_linkrelax_imm): Remove.
	* config/rl78-parse.y: Tag all addr16 and branch patterns with
	relaxation markers.
	* config/tc-rl78.c (rl78_linkrelax_addr16): New.
	(rl78_linkrelax_branch): New.
	(OPTION_RELAX): New.
	(md_longopts): Add relax option.
	(md_parse_option): Add OPTION_RELAX.
	(rl78_frag_init): Support relaxation.
	(rl78_handle_align): New.
	(md_assemble): Support relaxation.
	(md_apply_fix): Likewise.
	(md_convert_frag): Likewise.
	* config/tc-rl78.h (MAX_MEM_FOR_RS_ALIGN_CODE): New.
	(HANDLE_ALIGN): New.
	(rl78_handle_align): Declare.

	* config/rl78-parse.y (rl78_bit_insn): New.  Set it for all bit
	insn patterns.
	(find_bit_index): New.  Strip .BIT suffix off relevent
	expressions for bit insns.
	(rl78_lex): Exclude bit suffixes from expression parsing.

[include/elf]
	* rl78.h (R_RL78_RH_RELAX, R_RL78_RH_SFR, R_RL78_RH_SADDR): New.
	(RL78_RELAXA_BRA, RL78_RELAXA_ADDR16: New.
2011-12-23 01:49:37 +00:00
Nick Clifton 74929e7bba PR gas/13449
* config/tc-arm.c (create_unwind_entry): Zero allocated table
	entries.
2011-12-21 17:07:26 +00:00
Iain Sandoe ab76eeafa5 bfd:
* mach-o-i386.c (bfd_mach_o_section_type_valid_for_tgt): Define NULL.
	* mach-o-target.c (bfd_mach_o_backend_data): Initialize bfd_mach_o_section_type_valid_for_tgt
	* mach-o-x86-64.c (bfd_mach_o_section_type_valid_for_x86_64): New.
	(bfd_mach_o_section_type_valid_for_tgt): Set to bfd_mach_o_section_type_valid_for_x86_64.
	* mach-o.c (bfd_mach_o_section_type_name): Reorder and eliminate dup.
	(bfd_mach_o_section_attribute_name): Reorder.
	(bfd_mach_o_get_section_type_from_name): If the target has defined a validator for section
	types, then use it.
	* mach-o.h (bfd_mach_o_get_section_type_from_name): Alter declaration to include the bfd.

gas:

	* config/obj-macho.c (obj_mach_o_section): Account for target-dependent section
	types.  Improve error handling when wrong section types/attributes are specified.

gas/testsuite:

	* gas/mach-o/err-sections-1.s: New.
	* gas/mach-o/err-sections-2.s: New.
	* gas/mach-o/sections-3.d: New.
	* gas/mach-o/sections-3.s: New.
2011-12-19 15:42:37 +00:00
Chung-Lin Tang d0f1368214 2011-12-19 Chung-Lin Tang <cltang@codesourcery.com>
gas/
	* config/tc-mips.c (mips_pseudo_table): Add tprelword/tpreldword
	entries.
	(mips16_percent_op): Add MIPS16 TLS relocation ops.
	(md_apply_fix): Add BFD_RELOC_MIPS16_TLS_* switch cases.
	(s_tls_rel_directive): Rename from s_dtprel_internal(). Abstract out
	directive string and reloc type as function parameters. Update
	comments.
	(s_dtprelword,s_dtpreldword): Change to use s_tls_rel_directive().
	(s_tprelword,s_tpreldword): New functions.

	include/
	* elf/mips.h (elf_mips_reloc_type): Add R_MIPS16_TLS_* entries.

	bfd/
	* reloc.c (BFD_RELOC_MIPS16_TLS_GD,BFD_RELOC_MIPS16_TLS_LDM,
	BFD_RELOC_MIPS16_TLS_DTPREL_HI16,BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
	BFD_RELOC_MIPS16_TLS_GOTTPREL,BFD_RELOC_MIPS16_TLS_TPREL_HI16,
	BFD_RELOC_MIPS16_TLS_TPREL_LO16): New relocations for MIPS16 TLS.
	* bfd-in2.h (bfd_reloc_code_real): Regenerate.
	* libbfd.h (bfd_reloc_code_real_names): Regenerate.
	* elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_TLS_*
	entries.
	(mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
	mappings.
	* elfn32-mips.c (elf_mips16_howto_table_rel,
	elf_mips16_howto_table_rela): Add R_MIPS16_TLS_* entries.
	(mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
	mappings.
	* elf64-mips.c (mips16_elf64_howto_table_rel,
	mips16_elf64_howto_table_rela): Add R_MIPS16_TLS_* entries.
	(mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
	mappings.
	* elfxx-mips.c (TLS_RELOC_P,mips16_reloc_p,
	_bfd_mips_elf_check_relocs): Add cases for R_MIPS16_TLS_* relocations.
	(tls_gd_reloc_p): Add R_MIPS16_TLS_GD case.
	(tls_ldm_reloc_p): Add R_MIPS16_TLS_LDM case.
	(tls_gottprel_reloc_p): Add R_MIPS16_TLS_GOTTPREL case.
	(mips_elf_calculate_relocation): Add cases for R_MIPS16_TLS_*,
	R_MIPS_TLS_DTPREL32/64, and R_MIPS_TLS_TPREL32/64 relocations.
2011-12-19 07:58:02 +00:00
Tristan Gingold 499963bcf1 2011-12-15 Tristan Gingold <gingold@adacore.com>
* config/obj-macho.c (obj_mach_o_fileprop): Fix typo.
2011-12-15 11:43:52 +00:00
Nick Clifton 83c257caea * readelf.c (get_symbol_type): Add ELFOSABI_FREEBSD to the
supported abi's.

	* config/obj-elf.c (obj_elf_type): Add ELFOSABI_FREEBSD to the
	supported abi's.
2011-12-15 11:37:03 +00:00
Tristan Gingold 0c9ef0f001 bfd/
2011-12-15  Iain Sandoe  <iains@gcc.gnu.org>

	* mach-o-target.c (bfd_mach_o_bfd_set_private_flags): Use
	bfd_mach_o_bfd_set_private_flags.
	* mach-o.c (bfd_mach_o_bfd_set_private_flags): New.
	* mach-o.h (bfd_mach_o_bfd_set_private_flags): Declare.

gas/
2011-12-15  Iain Sandoe  <iains@gcc.gnu.org>

	* config/obj-macho.c (obj_mach_o_subsections_by_symbols): New global.
	(obj_mach_o_file_properties): New enum.
	(obj_mach_o_subsections_via_symbols):  Generalize name to...
	... (obj_mach_o_fileprop) and use to set subsections_via_symbols.

gas/testsuite/
2011-12-15  Iain Sandoe  <iains@gcc.gnu.org>

	* gas/mach-o/subsect-via-symbols-0.d: New.
	* gas/mach-o/subsect-via-symbols-1.d: New.
	* gas/mach-o/subsect-via-symbols.s: New.
2011-12-15 10:56:48 +00:00
Nick Clifton 5011093dd0 * frv.opc (parse_uhi16): Fix handling of %hi operator on 64-bit
hosts.

	* cgen-asm.c (cgen_parse_signed_integer): Add code to handle the
	sign extension of negative values on a 64-bit host.
	* frv-asm.c: Regenerate.

	* gas/frv/immediates.s: New test file - checks assembly of
	constant values.
	* gas/frv/immediates.d: Expected disassmbly.
	* gas/frv/allinsn.exp: Run the new test.
2011-12-15 10:21:51 +00:00
Jie Zhang 370a075d48 gas/
2011-12-14  Stuart Henderson  <shenders@gcc.gnu.org>

	* config/bfin-parse.y (asm_1): set SRCx fields to all 1s for
	dspalu32 instrs that don't use them.

gas/testsuite/
2011-12-14  Stuart Henderson  <shenders@gcc.gnu.org>

	* gas/bfin/move.d: Update SRCx field expectations.
	* gas/bfin/move2.d: Likewise.
	* gas/bfin/parallel.d: Likewise.
	* gas/bfin/parallel2.d: Likewise.
	* gas/bfin/parallel3.d: Likewise.
	* gas/bfin/parallel4.d: Likewise.
	* gas/bfin/video.d: Likewise.
	* gas/bfin/video2.d: Likewise.
2011-12-15 04:25:10 +00:00
Tristan Gingold 9dadd4aee8 2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* gas/mach-o/comm-1.d: New.
	* gas/mach-o/comm-1.s: New.
	* gas/mach-o/lcomm-1.s: New.
	* gas/mach-o/mach-o.exp: Update to use run_dump_tests[].
	* gas/mach-o/sections-1.d: New.
	* gas/mach-o/sections-1.s: New.
	* gas/mach-o/warn-1.s: Add .comm alignment range warning.
2011-12-14 15:32:25 +00:00
Nick Clifton 66dbb2bbf4 * config/tc-cris.c (md_convert_frag): Mark the length_code local
variable as unused as it is only used when ENABLE_CHECKING is on.
2011-12-14 14:10:57 +00:00
Tristan Gingold f68e81fcd4 2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* gas/mach-o: New.
	* gas/mach-o/mach-o.exp: New.
	* gas/mach-o/warn-1.s: New.
	* gas/mach-o/lcomm-1.s: New.
	* gas/mach-o/lcomm-1.d: New.
2011-12-14 13:27:34 +00:00
Tristan Gingold a455111938 bfd/
2011-12-14  Iain Sandoe  <iains@gcc.gnu.org>

	* mach-o-i386.c (text_section_names_xlat): New table.
	(data_section_names_xlat): Likewise.
	(import_section_names_xlat): Likewise.
	(mach_o_i386_segsec_names_xlat): Likewise.
	(bfd_mach_o_tgt_seg_table): Use new tables.
	* mach-o-x86-64.c (bfd_mach_o_tgt_seg_table): Set NULL.
	* mach-o.c (mach_o_section_name_xlat, mach_o_segment_name_xlat):
	Move to mach-o.h as   typedefs.
	(text_section_names_xlat): Update for current GCC usage.
	(data_section_names_xlat): Likewise.
	(dwarf_section_names_xlat): Likewise.
	(objc_section_names_xlat): New table.
	(segsec_names_xlat): Add objc table.
	(bfd_mach_o_normalize_section_name):  Replace with...
	(bfd_mach_o_section_data_for_mach_sect): New.
	(bfd_mach_o_section_data_for_bfd_name): New.
	(bfd_mach_o_section_data_for_bfd_name): Update to use additional data.
	(bfd_mach_o_convert_section_name_to_mach_o): Likewise.
	(bfd_mach_o_bfd_copy_private_section_data): Implement.
	(bfd_mach_o_write_symtab): Write a zero-length string as the first entry
	for compatibility with system tools.
	(bfd_mach_o_build_commands): Update section alignment info.
	(bfd_mach_o_new_section_hook): Use translation table data to define
	default section flags, type, attributes and alignment, when available.
	(bfd_mach_o_init_section_from_mach_o): Add TODO comment.
	(bfd_mach_o_section_type_name): Add 'symbol_stubs'.
	(bfd_mach_o_section_attribute_name): Add 'self_modifying_code'.
	(bfd_mach_o_get_section_type_from_name): Change "not-found" return
	value.
	(bfd_mach_o_tgt_seg_table): Set default NULL.
	* mach-o.h (bfd_mach_o_segment_command):  Use define for name length.
	(bfd_mach_o_backend_data): Move until after contents are defined.
	(bfd_mach_o_normalize_section_name): Remove.
	(bfd_mach_o_convert_section_name_to_bfd): Declare.
	(mach_o_section_name_xlat): Declare.
	(mach_o_segment_name_xlat): Declare.
	(bfd_mach_o_section_data_for_mach_sect): Declare.
	(bfd_mach_o_section_data_for_bfd_name): Declare.

include/
2011-12-14  Iain Sandoe  <iains@gcc.gnu.org>

	* mach-o/loader.h (bfd_mach_o_section_type): define
	BFD_MACH_O_S_ATTR_NONE to 0.


gas/
2011-12-14  Iain Sandoe  <iains@gcc.gnu.org>

	* config/obj-macho.c: Add some more top-level comments.
	(collect_16char_name): New.
	(obj_mach_o_section): Amend to allow syntax compatible with existing system
	tools.  Use section translation data when available.
	(obj_mach_o_segT_from_bfd_name): New.
	(known_sections): Update.
	(obj_mach_o_known_section): Use obj_mach_o_segT_from_bfd_name.
	(objc_sections): New.
	(obj_mach_o_objc_section): New.
	(debug_sections): New.
	(obj_mach_o_debug_section): New.
	(tgt_sections): New.
	(obj_mach_o_opt_tgt_section): New.
	(obj_mach_o_base_section): New.
	(obj_mach_o_common_parse): Update to create BSS on demand and to handle
	lcomm optional alignment param.
	(obj_mach_o_comm): Update parameter name.
	(obj_mach_o_placeholder): New.
	(mach_o_pseudo_table): Update for GCC section directives.
	* config/obj-macho.h (_OBJ_MACH_O_H): New.
	(USE_ALIGN_PTWO): Define.
	(S_SET_ALIGN) Define.
2011-12-14 10:30:09 +00:00
Nick Clifton 621e3db6a5 * doc/internals.texi (TC_FORCE_RELOCATION_SUB_SAME): Update
to match code.
2011-12-13 12:56:33 +00:00
Andrew Pinski bb8e626db9 opcodes:
2011-12-08  Andrew Pinski  <apinski@cavium.com>

	* mips-opc.c (mips_builtin_opcodes): Add "pause".
gas/testsuite:
2011-12-08  Andrew Pinski  <apinski@cavium.com>

        * gas/mips/mips32-mt.d: Add pause instruction encoding to the end.
        * gas/mips/micromips@mips32r2.d: Likewise.
        * gas/mips/mips32r2.d: Likewise.
        * gas/mips/mips32-mt.s: Add pause instruction to the end.
        * gas/mips/mips32r2.s: Likewise.
2011-12-08 20:52:42 +00:00
Andrew Pinski 432233b359 bfd:
2011-12-08  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

	* archures.c (bfd_mach_mips_octeon2): New macro
	* bfd-in2.h: Regenerate.
	* cpu-mips.c (I_mipsocteon2): New enum value.
	(arch_info_struct): Add bfd_mach_mips_octeon2.
	* elfxx-mips.c (_bfd_elf_mips_mach): Support E_MIPS_MACH_OCTEON2.
	(mips_set_isa_flags): Add bfd_mach_mips_octeon2.
	(mips_mach_extensions): Add bfd_mach_mips_octeon2.

gas:
2011-12-08  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

        * tc-mips.c (CPU_IS_OCTEON): Add Octeon2.
        (mips_cpu_info_table): Add Octeon2.
        * doc/c-mips.texi: Document octeon2 as an acceptable value for -march=.

gas/testsuite:
2011-12-08  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

        * gas/mips/mips.exp: Add Octeon2 for an architecture.
        Run octeon2 test.
        * gas/mips/octeon2.d: New file.
        * gas/mips/octeon2.s: New file.

include/opcode:
2011-12-08  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

        * mips.h (INSN_CHIP_MASK): Update according to INSN_OCTEON2.
        (INSN_OCTEON2): New macro.
        (CPU_OCTEON2): New macro.
        (OPCODE_IS_MEMBER): Add Octeon2.

opcodes:
2011-12-08  Andrew Pinski  <apinski@cavium.com>
            Adam Nemet  <anemet@caviumnetworks.com>

	* mips-dis.c (mips_arch_choices): Add Octeon2.
	For "octeon+", just include OcteonP for the insn.
	* mips-opc.c (IOCT): Include Octeon2.
	(IOCTP): Include Octeon2.
	(IOCT2): New macro.
	(mips_builtin_opcodes): Add "laa", "laad", "lac", "lacd", "lad",
	"ladd", "lai", "laid", "las", "lasd", "law", "lawd".
	Move "lbux", "ldx", "lhx", "lwx", and "lwux" up to where the standard
	loads are, and add IOCT2 to them.
	Add "lbx" and "lhux".
	Add "qmac.00", "qmac.01", "qmac.02", "qmac.03", "qmacs.00",
	"qmacs.01", "qmacs.01", "qmacs.02" and "qmacs.03".
	Add "zcb" and "zcbt".
2011-12-08 20:47:27 +00:00
Matthew Gretton-Dann bd340a044c 2011-12-07 Sameera Deshpande <sameera.deshpande@arm.com>
* gas/config/tc-arm.c (do_t_ldstd): Warn for unpredictable cases.
	* gas/testsuite/gas/arm/thumb2_ldstd_unpredictable.d: New testcase.
	* gas/testsuite/gas/arm/thumb2_ldstd_unpredictable.l: Likewise.
	* gas/testsuite/gas/arm/thumb2_ldstd_unpredictable.s: Likewise.
	* gas/testsuite/gas/testsuite/gas/arm/sp-pc-validations-bad-t.l: Update
	testcase.
	* gas/testsuite/gas/testsuite/gas/arm/sp-pc-validations-bad-t.s: Likewise.
2011-12-07 16:58:35 +00:00
Matthew Gretton-Dann ad6cec4372 * gas/config/tc-arm.c (ARM_IT_MAX_OPERANDS): New define.
(arm_it): Use ARM_IT_MAX_OPERANDS.
	(neon_select_shape): Ensure we have matched all	operands.
	* gas/testsuite/gas/arm/neon-suffix-bad.l: Add testcase.
	* gas/testsuite/gas/arm/neon-suffix-bad.s: Likewise.
2011-12-07 16:46:35 +00:00
Matthew Gretton-Dann 1b11b49fe4 * gas/config/tc-arm.c (parse_neon_mov): Update which_operand
correctly.
2011-12-07 16:44:55 +00:00
Richard Earnshaw ddd7f988d4 * tc-arm.c (aeabi_set_public_attributes): Correctly set
Tag_ARM_ISA_use and Tag_Thumb_ISA_use.

	* gas/arm/attr-any-armv4t.d: New test.
	* gas/arm/attr-any-armv4t.s: New file.
	* gas/arm/attr-any-thumbv6.d: New test.
	* gas/arm/attr-any-thumbv6.s: New file.
2011-12-05 15:43:53 +00:00
Matthew Gretton-Dann f3bad4690f * gas/config/tc-arm.c (arm_cpu_option_table): Add name_len field.
(arm_arch_option_table): Likewise.
	(arm_option_extension_value_table): Likewise.
	(ARM_CPU_OPT): New define.
	(ARM_ARCH_OPT): Likewise.
	(ARM_EXT_OPT): Likewise.
	(arm_cpus): Use ARM_CPU_OPT to initialize.
	(arm_archs): Use ARM_ARCH_OPT to initialize.
	(arm_extensions): Use ARM_EXT_OPT to initialize.
	(arm_parse_extension): Ensure option string matching matches
	the whole string.
	(arm_parse_cpu): Likewise.
	(arm_parse_arch): Likewise.
	* gas/testsuite/gas/arm/cmdline-bad-arch.d: New test case.
	* gas/testsuite/gas/arm/cmdline-bad-cpu.d: Likewise.
2011-12-05 14:51:54 +00:00
Richard Sandiford 725fc8eddf gas/testsuite/
* gas/mips/mips.exp (run_dump_test_arch): Add an opts parameter.
	(run_dump_test_arches): Allow additional options to be passed.
	(run_list_test_arch): Add opts to the name.
	(run_list_test_arches): Allow the options to be elided.
	(mips4-fp, mips5-fp): Run twice, one with -32 and once with -mabi=o64.
	(mips64r2-ill, octeon-ill): Remove empty options string.
2011-12-03 10:29:53 +00:00
Andrew Pinski dd6a37e700 opcode/
2011-11-29  Andrew Pinski  <apinski@cavium.com>

        * mips-dis.c (mips_arch_choices): Add Octeon+.
        * mips-opc.c (IOCT): Include Octeon+.
        (IOCTP): New macro.
        (mips_builtin_opcodes): Add "saa" and "saad".
bfd/
2011-11-29  Andrew Pinski  <apinski@cavium.com>

        * archures.c (bfd_mach_mips_octeonp): New macro.
        * bfd-in2.h: Regenerate.
        * bfd/cpu-mips.c (I_mipsocteonp): New enum value.
        (arch_info_struct): Add bfd_mach_mips_octeonp.
        * elfxx-mips.c (mips_set_isa_flags): Add bfd_mach_mips_octeonp.
        (mips_mach_extensions): Add bfd_mach_mips_octeonp.
include/opcodes/
2011-11-29  Andrew Pinski  <apinski@cavium.com>

        * mips.h (INSN_CHIP_MASK): Update according to INSN_OCTEONP.
        (INSN_OCTEONP): New macro.
        (CPU_OCTEONP): New macro.
        (OPCODE_IS_MEMBER): Add Octeon+.
        (M_SAA_AB, M_SAAD_AB, M_SAA_OB, M_SAAD_OB): New enum values.
gas/
2011-11-29  Andrew Pinski  <apinski@cavium.com>

        * config/tc-mips.c (CPU_IS_OCTEON): New macro function.
        (CPU_HAS_SEQ): Change to use CPU_IS_OCTEON.
        (NO_ISA_COP): Likewise.
        (macro) <ld_st>: Add support when off0 is true.
        Add support for M_SAA_AB, M_SAA_OB, M_SAAD_OB and M_SAAD_AB.
        (mips_cpu_info_table): Add octeon+.
        * doc/c-mips.texi: Document octeon+ as an acceptable value for -march=.
gas/testsuite/
2011-11-29  Andrew Pinski  <apinski@cavium.com>

        * gas/mips/mips.exp: Add octeon+ for an architecture.
        Run octeon-saa-saad test.
        (run_dump_test_arch): For Octeon architectures, also try octeon@.
        * gas/mips/octeon-pref.d: Remove -march=octeon from command line.
        * gas/mips/octeon.d: Likewise.
        * gas/mips/octeon-saa-saad.d: New file.
        * gas/mips/octeon-saa-saad.s: New file
2011-11-29 20:28:55 +00:00
Matthew Gretton-Dann c6400f8afd * gas/config/tc-arm.c (do_t_mov_cmp): Allow MOV lowreg, lowreg when no CPU
is specified.
	* gas/testsuite/gas/arm/mov-highregs-any.d: New testcase.
	* gas/testsuite/gas/arm/mov-highregs-any.s: Likewise.
	* gas/testsuite/gas/arm/mov-lowregs-any.d: Likewise.
	* gas/testsuite/gas/arm/mov-lowregs-any.s: Likewise.
2011-11-25 15:17:36 +00:00
Tristan Gingold 9b80deddf2 2011-11-23 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (s_alpha_prologue): Requires empty line.
2011-11-23 11:32:42 +00:00
Tristan Gingold 467b607ec0 2011-11-23 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (s_alpha_frame): Emit a warning if bad value
	of RA.
	(s_alpha_pdesc): Adjust comment.
2011-11-23 11:27:51 +00:00
Richard Earnshaw 837b3435bc 2011-11-23 Thomas Klein <th.r.klein@web.de>
* config/tc-arm.c (do_t_mov_cmp): Prevent emitting code for MOV
	with two low register at arch v4t or v5t when assember using
	unified syntax.
2011-11-23 10:50:53 +00:00
DJ Delorie cc18928581 * config/rl78-defs.h (rl78_error): Add "const".
* config/rl78-parse.y (rl78_error): Likewise.
2011-11-21 17:10:31 +00:00
Alan Modra edc1d65242 * config/tc-ppc.c (ppc_target_format): Add format for powerpc*-freebsd. 2011-11-21 13:19:33 +00:00
Maciej W. Rozycki fbdd3712c9 * gas/mips/micromips@24k-branch-delay-1.d: New test.
* gas/mips/micromips@24k-triple-stores-1.d: New test.
	* gas/mips/micromips@24k-triple-stores-2.d: New test.
	* gas/mips/micromips@24k-triple-stores-3.d: New test.
	* gas/mips/micromips@24k-triple-stores-4.d: New test.
	* gas/mips/micromips@24k-triple-stores-5.d: New test.
	* gas/mips/micromips@24k-triple-stores-6.d: New test.
	* gas/mips/micromips@24k-triple-stores-7.d: New test.
	* gas/mips/micromips@24k-triple-stores-8.d: New test.
	* gas/mips/micromips@24k-triple-stores-9.d: New test.
	* gas/mips/micromips@24k-triple-stores-10.d: New test.
	* gas/mips/micromips@24k-triple-stores-11.d: New test.
	* gas/mips/24k-triple-stores-1.s: Adjust for microMIPS
	disassembly.
	* gas/mips/24k-triple-stores-2.s: Likewise.
	* gas/mips/24k-triple-stores-3.s: Likewise.
	* gas/mips/24k-triple-stores-4.s: Likewise.
	* gas/mips/24k-triple-stores-5.s: Likewise.
	* gas/mips/24k-triple-stores-6.s: Likewise.
	* gas/mips/24k-triple-stores-7.s: Likewise.
	* gas/mips/24k-triple-stores-8.s: Likewise.
	* gas/mips/24k-triple-stores-9.s: Likewise.
	* gas/mips/24k-triple-stores-10.s: Likewise.
	* gas/mips/24k-triple-stores-11.s: Likewise.
	* gas/mips/mips.exp: Run the new tests.
2011-11-21 11:18:28 +00:00
Maciej W. Rozycki 9535b3e573 * gas/mips/micromips@loc-swap-2.d: Correct test case. 2011-11-21 11:12:41 +00:00
David S. Miller a7bbf4e9b9 * config/tc-sparc.c (md_apply_fix): Handle BFD_RELOC_8. 2011-11-17 04:24:56 +00:00
Maciej W. Rozycki 7bd942df4a gas/
* config/tc-mips.c (macro): Fix unsupported opcode message
	capitalization.
	(mips_ip, mips16_ip): Likewise.

	gas/testsuite/
	* gas/mips/mips-double-float-flag.l: Adjust according to
	unsupported opcode message capitalization fix.
	* gas/mips/mips-hard-float-flag.l: Likewise.
	* gas/mips/mips-macro-ill-nofp.l: Likewise.
	* gas/mips/mips-macro-ill-sfp.l: Likewise.
	* gas/mips/mips1-fp.l: Likewise.
	* gas/mips/mips16e-64.l: Likewise.
	* gas/mips/mips32-sf32.l: Likewise.
	* gas/mips/mips32r2-fp32.l: Likewise.
	* gas/mips/mips4-branch-likely.l: Likewise.
	* gas/mips/mips4-fp.l: Likewise.
	* gas/mips/octeon-ill.l: Likewise.
2011-11-16 12:34:34 +00:00
Maciej W. Rozycki 9ddc84cc26 * config/tc-mips.c (ISA_SUPPORTS_MCU_ASE): Also set if microMIPS
mode.
2011-11-16 12:29:56 +00:00
Maciej W. Rozycki 2906b03761 * config/tc-mips.c (macro_build_jalr): Reverse a negative
conditional.
	(mips_ip): Likewise.
2011-11-16 12:27:06 +00:00
Maciej W. Rozycki 7a795ef4a7 * config/tc-mips.c (mips_cpu_info_table): Add "m14ke" and
"m14kec".
	* doc/c-mips.texi (MIPS architecture options): Add "m14ke" and
	"m14kec" to the list of -march options.
2011-11-16 12:21:35 +00:00
Maciej W. Rozycki 080f9e4f20 * write.c (dump_section_relocs): Don't convert PC-relative relocs
that have an in-place addend narrower than the addresses used.
2011-11-15 13:08:17 +00:00
Maciej W. Rozycki 9301f9c3e3 gas/
* config/tc-mips.c (can_swap_branch_p): Exclude microMIPS
	variant frags too.

	gas/testsuite/
	* gas/mips/relax-swap3.d: New test.
	* gas/mips/mips16@relax-swap3.d: Likewise.
	* gas/mips/micromips@relax-swap3.d: Likewise.
	* gas/mips/relax-swap3.s: New test source.
	* gas/mips/mips.exp: Run the new tests.
2011-11-14 13:43:23 +00:00
Matthew Gretton-Dann c90460e450 * gas/config/tc-arm.c (arm_cpus): Add cortex-a7 entry.
* gas/doc/c-arm.texi (ARM Options): Add cortex-a7 to list of accepted
	CPUs.
2011-11-07 16:20:48 +00:00
DJ Delorie b14cf9dd6a * doc/c-rl78.texi (RL78-Float): Remove unused menu entry. 2011-11-04 16:04:13 +00:00
DJ Delorie 6652d298c0 [bfd]
* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Delete unused
	variable.

[gas]
	* config/tc-rl78.c (tc_gen_reloc): Remove unused variable.
2011-11-02 20:40:22 +00:00
Nick Clifton 3da1d841a1 * config/tc-arm.c (md_begin): Remove ARM_PLT32 reloc associated
with the (PLT) instruction suffix when operating in eabi mode.
	* doc/c-arm.texi (ARM_Relocations): Extend description of (PLT)
	suffix.

	* gas/arm/pic.d: Update expected output.
2011-11-02 11:13:59 +00:00
DJ Delorie 99c513f6ac [.]
* configure.ac (rl78-*-*) New case.
	* configure: Regenerate.

[bfd]
	* Makefile.am (ALL_MACHINES): Add cpu-rl78.lo.
	(ALL_MACHINES_CFILES): Add cpu-rl78.c.
	(BFD32_BACKENDS): Add elf32-rl78.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-rl78.c.
	(Makefile.in): Regenerate.
	* archures.c (bfd_architecture): Define bfd_arch_rl78.
	(bfd_archures_list): Add bfd_rl78_arch.
	* config.bfd: Add rl78-*-elf.
	* configure.in: Add bfd_elf32_rl78_vec.
	* reloc.c (bfd_reloc_code_type): Add BFD_RELOC_RL78_* relocations.
	* targets.c (bfd_target_vector): Add bfd_elf32_rl78_vec.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* libbfd.h: Regenerate.
	* cpu-rl78.c: New file.
	* elf32-rl78.c: New file.

[binutils]
	* readelf.c: Include elf/rl78.h
	(guess_is_rela): Handle EM_RL78.
	(dump_relocations): Likewise.
	(get_machine_name): Likewise.
	(is_32bit_abs_reloc): Likewise.
	* NEWS: Mention addition of RL78 support.
	* MAINTAINERS: Add myself as RL78 port maintainer.

[gas]
	* Makefile.am (TARGET_CPU_CFILES): Add tc-rl78.c.
	(TARGET_CPU_HFILES): Add rc-rl78.h.
	(EXTRA_DIST): Add rl78-parse.c and rl78-parse.y.
	(rl78-parse.c, rl78-parse.h, rl78-parse.o, rl78-defs.h): New rules.
	* Makefile.in: Regenerate.
	* configure.in: Add rl78 case.
	* configure: Regenerate.
	* configure.tgt: Add rl78 case.
	* config/rl78-defs.h: New file.
	* config/rl78-parse.y: New file.
	* config/tc-rl78.c: New file.
	* config/tc-rl78.h: New file.
	* NEWS: Add Renesas RL78.

	* doc/Makefile.am (c-rl78.texi): New.
	* doc/Makefile.in: Likewise.
	* doc/all.texi: Enable it.
	* doc/as.texi: Add it.

[include]
	* dis-asm.h (print_insn_rl78): Declare.

[include/elf]
	* common.h (EM_RL78, EM_78K0R): New.
	* rl78.h: New.

[include/opcode]
	* rl78.h: New file.

[ld]
	* Makefile.am (ALL_EMULATION_SOURCES): Add eelf32rl78.c.
	(+eelf32rl78.c): New rule.
	* Makefile.in: Regenerate.
	* configure.tgt: Add rl78-*-* case.
	* emulparams/elf32rl78.sh: New file.
	* NEWS: Mention addition of Renesas RL78 support.

[opcodes]
	* Makefile.am (TARGET_LIBOPCODES_CFILES): Add rl78-decode.c and
	rl78-dis.c.
	(MAINTAINERCLEANFILES): Add rl78-decode.c.
	(rl78-decode.c): New rule, built from rl78-decode.opc and opc2c.
	* Makefile.in: Regenerate.
	* configure.in: Add bfd_rl78_arch case.
	* configure: Regenerate.
	* disassemble.c: Define ARCH_rl78.
	(disassembler): Add ARCH_rl78 case.
	* rl78-decode.c: New file.
	* rl78-decode.opc: New file.
	* rl78-dis.c: New file.
2011-11-02 03:09:11 +00:00
Walter Lee e8b9f50888 Fixes the TILE-Gx/TILEPro port of gas to deal with relocations of
aliases.
2011-10-28 14:43:54 +00:00
Walter Lee 69f56ae1d3 Mention Tilera support in binutils/NEWS, and fix the TILEPro
capitalization in gas/NEWs and ld/NEWS.
2011-10-28 14:37:30 +00:00
Nick Clifton 006ad0a1b5 * po/ja.po: New Japanese translation.
* configure.in (ALL_LINGUAS): Add ja.
	* configure: Regenerate.
2011-10-28 13:02:15 +00:00
Joern Rennecke 926e2094bb bfd:
* cpu-epiphany.c: Reinstate full list of Copyright years.
        * elf32-epiphany.c: Likewise.
cpu:
        * epiphany.cpu, epiphany.opc: Likewise.
gas:
        * config/tc-epiphany.c, config/tc-epiphany.h: Likewise.
        * doc/c-epiphany.texi: Likewise.
include:
        * elf/epiphany.h: Likewise.
2011-10-27 14:27:16 +00:00
Joern Rennecke 56b1318518 gas:
* doc/as.texinfo [EPIPHANY]: Include c-epiphany.texi to avoid
        duplication.
opcodes:
        * disassemble.c (ARCH_epiphany): Move into alphasorted spot.
2011-10-26 12:14:17 +00:00
Mike Frysinger 214ce7b58a Building rx's gas code atm fails:
rx-parse.c: In function ‘rx_parse’:
rx-parse.c:3774:9: error: passing argument 1 of ‘rx_error’ discards ‘const’
	qualifier from pointer target type [-Werror]
../../../gas/config/rx-defs.h:40:12: note:
	expected ‘char *’ but argument is of type ‘const char *’
cc1: all warnings being treated as errors

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-25 20:36:22 +00:00
Nick Clifton dfc4b250e3 * config/tc-ns32k.c (md_begin): Rename local variable 'stat' to 'status'. 2011-10-25 13:35:00 +00:00
Nick Clifton cfb8c0921c bfd:
* Makefile.am (ALL_MACHINES): Add cpu-epiphany.lo .
	(ALL_MACHINES_CFILES): Add cpu-epiphany.c .
	(BFD32_BACKENDS): Add elf32-epiphany.lo .
	(BFD32_BACKENDS_CFILES): Add elf32-epiphany.c .
	* Makefile.in, bfd-in2.h, configure, libbfd.h: Regenerate.
	* archures.c (bfd_arch_epiphany): Add.
	(bfd_mach_epiphany16, bfd_mach_epiphany32): Define.
	(bfd_epiphany_arch): Declare.
	(bfd_archures_list): Add &bfd_epiphany_arch.
	* config.bfd (epiphany-*-elf): New target case.
	* configure.in (bfd_elf32_epiphany_vec): New target vector case.
	* reloc.c (BFD_RELOC_EPIPHANY_SIMM8): New relocation.
	(BFD_RELOC_EPIPHANY_SIMM24, BFD_RELOC_EPIPHANY_HIGH): Likewise.
	(BFD_RELOC_EPIPHANY_LOW, BFD_RELOC_EPIPHANY_SIMM11): Likewise.
	(BFD_RELOC_EPIPHANY_IMM11, BFD_RELOC_EPIPHANY_IMM8): Likewise.
	* targets.c (bfd_elf32_epiphany_vec): Declare.
	(_bfd_target_vector): Add bfd_elf32_epiphany_vec.
	* po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
	* cpu-epiphany.c, elf32-epiphany.c: New files.
binutils:
	* readelf.c (include "elf/epiphany.h")
	(guess_is_rela, dump_relocation): Handle EM_ADAPTEVA_EPIPHANY.
	(get_machine_name, is_32bit_abs_reloc, is_32bit_pcrel_reloc): Likewise.
	(is_16bit_abs_reloc, is_none_reloc): Likewise.
	* po/binutils.pot: Regenerate.
cpu:
	* cpu/epiphany.cpu, cpu/epiphany.opc: New files.
gas:
	* NEWS: Mention addition of Adapteva Epiphany support.
	* config/tc-epiphany.c, config/tc-epiphany.h: New files.
	* Makefile.am (TARGET_CPU_CFILES): Add config/tc-epiphany.c .
	(TARGET_CPU_HFILES): Add config/tc-epiphany.h .
	* Makefile.in, configure, doc/Makefile.in, po/POTFILES.in: Regenerate.
	* configure.in: Also set using_cgen for epiphany.
	* configure.tgt: Handle epiphany.
	* doc/Makefile.am (CPU_DOCS): Add c-epiphany.texi .
	* doc/all.texi: Set EPIPHANY.
	* doc/as.texinfo: Add EPIPHANY-specific text.
	* doc/c-epiphany.texi: New file.
	* po/gas.pot: Regenerate.
gas/testsuite:
	* gas/epiphany: New directory.
include:
	* dis-asm.h (print_insn_epiphany): Declare.
	* elf/epiphany.h: New file.
	* elf/common.h (EM_ADAPTEVA_EPIPHANY): Define.
ld:
	* NEWS: Mention addition of Adapteva Epiphany support.
	* Makefile.am (ALL_EMULATION_SOURCES): Add eelf32epiphany.c .
	(eelf32epiphany.c): New rule.
	* Makefile.in: Regenerate.
	* configure.tgt: Handle epiphany-*-elf.
	* po/ld.pot: Regenerate.
	* testsuite/ld-srec/srec.exp: xfail epiphany.
	* emulparams/elf32epiphany.sh: New file.
opcodes:
	* Makefile.am (HFILES): Add epiphany-desc.h and epiphany-opc.h .
	(TARGET_LIBOPCODES_CFILES): Add  epiphany-asm.c, epiphany-desc.c,
	epiphany-dis.c, epiphany-ibld.c and epiphany-opc.c .
	(CLEANFILES): Add stamp-epiphany.
	(EPIPHANY_DEPS): Set.  Make CGEN-generated Epiphany files depend on it.
	(stamp-epiphany): New rule.
	* Makefile.in, configure, po/POTFILES.in, po/opcodes.pot: Regenerate.
	* configure.in: Handle bfd_epiphany_arch.
	* disassemble.c (ARCH_epiphany): Define.
	(disassembler): Handle bfd_arch_epiphany.
	* epiphany-asm.c, epiphany-desc.c, epiphany-desc.h: New files.
	* epiphany-dis.c, epiphany-ibld.c, epiphany-opc.c: Likewise.
	* epiphany-opc.h: Likewise.
2011-10-25 11:18:16 +00:00
Julian Brown c373271616 opcodes/
* m68k-opc.c (m68k_opcodes): Fix entries for ColdFire moveml.

    gas/testsuite/
    * gas/m68k/all.exp (movem-offset): Add test.
    * gas/m68k/movem-offset.s: New test.
    * gas/m68k/movem-offset.d: New.
2011-10-24 16:36:51 +00:00
Maciej W. Rozycki 7951ca422a * config/tc-mips.c (move_register): Fix formatting. 2011-10-24 14:25:01 +00:00
Maciej W. Rozycki 72671e6201 * config/tc-mips.c (can_swap_branch_p): Remove empty line.
(start_noreorder): Likewise.
2011-10-24 14:17:10 +00:00
Maciej W. Rozycki 8b828383a8 * config/tc-mips.c (s_option): Fix formatting.
(mips_elf_final_processing): Likewise.
2011-10-24 14:08:23 +00:00
Maciej W. Rozycki 444d75be22 * config/tc-mips.c (validate_micromips_insn): Fix formatting. 2011-10-24 14:04:42 +00:00
Alan Modra 652618321c * config/tc-mn10200.c (md_convert_frag): Add missing break. 2011-10-24 02:49:24 +00:00
Tristan Gingold f8e24652cb 2011-10-21 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (load_expression): Use symbol_mark_used accessor.
	(s_alpha_comm): Use symbol_set_frag accessor.
2011-10-21 13:24:26 +00:00
Andreas Krebbel 9cae27dcb1 2011-10-21 Jan Glauber <jang@linux.vnet.ibm.com>
* s390-opc.txt: Add CPUMF instructions.

2011-10-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gas/s390/zarch-z10.d: Add CPUMF instructions.
	* gas/s390/zarch-z10.s: Likewise.
2011-10-21 12:50:30 +00:00
Alan Modra db9b2be466 * config/tc-mips.c (micromips_add_label): Avoid gcc warning.
(md_convert_frag): Likewise.
2011-10-19 23:09:11 +00:00
Julian Brown a415b1cd63 Jie Zhang <jie@codesourcery.com>
Julian Brown  <julian@codesourcery.com>

    gas/
    * config/tc-arm.c (parse_shifter_operand): Fix handling
    of explicit rotation.
    (encode_arm_shifter_operand): Likewise.

    gas/testsuite/
    * gas/arm/adrl.d: Adjust.
    * gas/arm/immed2.d: New test.
    * gas/arm/immed2.s: New test.

    ld/testsuite/
    * ld-arm/cortex-a8-fix-b-plt.d: Adjust.
    * ld-arm/cortex-a8-fix-bcc-plt.d: Adjust.
    * ld-arm/cortex-a8-fix-bl-plt.d: Adjust.
    * ld-arm/cortex-a8-fix-bl-rel-plt.d: Adjust.
    * ld-arm/cortex-a8-fix-blx-plt.d: Adjust.
    * ld-arm/ifunc-1.dd: Adjust.
    * ld-arm/ifunc-2.dd: Adjust.
    * ld-arm/ifunc-3.dd: Adjust.
    * ld-arm/ifunc-4.dd: Adjust.
    * ld-arm/ifunc-5.dd: Adjust.
    * ld-arm/ifunc-6.dd: Adjust.
    * ld-arm/ifunc-7.dd: Adjust.
    * ld-arm/ifunc-8.dd: Adjust.
    * ld-arm/ifunc-9.dd: Adjust.
    * ld-arm/ifunc-10.dd: Adjust.
    * ld-arm/ifunc-14.dd: Adjust.
    * ld-arm/ifunc-15.dd: Adjust.
    * ld-arm/ifunc-16.dd: Adjust.

    opcodes/
    * arm-dis.c (print_insn_arm): Explicitly specify rotation
    if needed.
2011-10-18 14:41:55 +00:00
Nick Clifton 1be5fd2e2f * config/tc-arm.c (check_ldr_r15_aligned): New.
(do_ldst): Warn in upredictable cases.
	(do_t_ldst): Likewise.
	(insns): Update accordingly.

	* gas/arm/ldr-bad.s: New testcase.
	* gas/arm/ldr-bad.l: Likewise.
	* gas/arm/ldr-bad.d: Likewise.
	* gas/arm/ldr.s: Likewise.
	* gas/arm/ldr.d: Likewise.
	* gas/arm/ldr-t-bad.s: Likewise.
	* gas/arm/ldr-t-bad.l: Likewise.
	* gas/arm/ldr-t-bad.d: Likewise.
	* gas/arm/ldr-t.s: Likewise.
	* gas/arm/ldr-t.d: Likewise.
	* gas/arm/sp-pc-usage-t.s: Correct.
	* gas/arm/sp-pc-usage-t.d: Update accordingly.
2011-10-13 08:15:17 +00:00
Alan Modra 6885131b49 * as.c (main): Define .gasversion. rather than __GAS_VERSION__.
* frags.h (bss_address_frag): Delete
	(predefined_address_frag): New.
	* frags.c (frag_init): Init predefined_address_frag.  Delete ref
	to bss_addres_frag.
	* symbols.c (S_CAN_BE_REDEFINED): New function.
	* symbols.h (S_CAN_BE_REDEFINED): Declare.
	* read.c (assign_symbol): Use S_CAN_BE_REDEFINED.
2011-10-12 21:07:07 +00:00
Alan Modra 00ce9deb43 * symbols.c (local_symbol_make): Make global.
* symbols.h (local_symbol_make): Declare.
	* as.c (main): Define __GAS_VERSION__.
2011-10-12 02:57:07 +00:00
Nick Clifton d569865703 Updated Bulgarian, Spanish, Finnish, French, Russian and Ukranian translations. 2011-10-10 16:12:24 +00:00
Jan Beulich 989993d80a gas/testsuite/
2011-09-28  Jan Beulich  <jbeulich@suse.com>

	* gas/ppc/476.s: Fix lswi first operand.
	* gas/ppc/476.d: Adjust expected output.
	* gas/ppc/a2.s: Fix lswi first operand.
	* gas/ppc/a2.d: Adjust expected output.
	* gas/ppc/power6.s: Fix lfdpx first operand.
	* gas/ppc/power6.d: Adjust expected output.

opcodes/
2011-09-28  Jan Beulich  <jbeulich@suse.com>

	* ppc-opc.c (insert_nbi, insert_rbx, FRAp, FRBp, FRSp, FRTp, NBI, RAX,
	RBX): New.
	(insert_bo, insert_boe): Reject bcctr with bit 2 in bo unset.
	(powerpc_opcodes): Use RAX for second and RBXC for third operand of
	lswx. Use NBI for third operand of lswi. Use FRTp for first operand of
	lfdp and lfdpx. Use FRSp for first operand of stfdp and stfdpx, and
	mark them as invalid on POWER7. Use FRTp, FRAp, and FRBp repsectively
	on DFP quad instructions.
2011-10-06 09:22:58 +00:00
Nick Clifton d4cb0ea0ca * readelf.c (get_machine_dlags): Add support for RX's PID mode.
* ld-scripts/phdrs.exp: Expect to fail for the RX.

	* elf32-rx.c: Add support for PID mode.
	(rx_elf_relocate_section): Add checks for unsafe PID relocations.
	Include addend in R_RX_SYM relocations.

	* config/rx-defs.h (rx_pid_register): New.
	(rx_gp_register): New.
	* config/rx-parse.y (rx_lex): Add support for %gpreg and %pidreg.
	(displacement): Add PID support.
	* config/tc-rx.c (rx_pid_mode): New.
	(rx_num_int_regs): New.
	(rx_pid_register): New.
	(rx_gp_register): New.
	(options): Add -mpid and -mint-register= options.
	(md_longopts): Likewise.
	(md_parse_option): Likewise.
	(md_show_usage): Likewise.
	(rx_pid_symbol): New.
	(rx_pidreg_symbol): New.
	(rx_gpreg_symbol): New.
	(md_begin): Support PID.
	(rx_validate_fix_sub): Support PID.
	(tc_gen_reloc): Support PID.
	* doc/c-rx.texi: Document PID support.

	* rx.h (E_FLAG_RX_PID): New.
2011-10-05 14:13:31 +00:00
Kai Tietz 9af6978cc0 Another typo ... :( 2011-09-28 12:04:24 +00:00
Kai Tietz 8d7f3066f1 * gas/pe/section-exclude.d: Correct testcase. 2011-09-28 12:01:12 +00:00
Kai Tietz c348982892 2011-09-27 Kai Tietz <ktietz@redhat.com>
* config/obj-coff.c (obj_coff_section): Add 'e' as specifier
       for marking section SEC_EXCLUDE.

2011-09-27  Kai Tietz  <ktietz@redhat.com>

       * gas/pe/pe.exp: Add new testcase.
       * gas/pe/section-exclude.d: New file.
       * gas/pe/section-exclude.s: New file.
2011-09-27 18:57:22 +00:00
David S. Miller 92a7795b59 opcodes/
* sparc-opc.c (sparc_opcodes): Fix random instruction to write
	to a float instead of an integer register.

gas/testsuite/

	* gas/sparc/hpcvis3.s: Update to use float reg for random insn.
	* gas/sparc/hpcvis3.d: Likewise.
2011-09-27 04:30:32 +00:00
David S. Miller e91d10767a Add sparc integer multiply-add instructions.
opcodes/

	* sparc-opc.c (sparc_opcodes): Add integer multiply-add
	instructions.

gas/testsuite/

	* gas/sparc/ima.d: New test.
	* gas/sparc/ima.s: New test source.
	* gas/sparc/sparc.exp: Run new test.
2011-09-26 09:19:24 +00:00
Tristan Gingold a7142d9403 binutils/
2011-09-22  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.22.

gas/
2011-09-22  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.22.

ld/
2011-09-22  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.22.
2011-09-22 08:11:16 +00:00
David S. Miller 4bafe00ecf Add new sparc options to control instruction availability.
gas/

	* config/tc-sparc.c (hwcap_allowed): New.
	(struct sparc_arch): New field 'hwcap_allowed' containing a bitmask
	of F_FOO flags which are enabled by the particular arch setting.
	Add new options that provide explicit access to new instructions.
	(md_parse_option): Only bump max_architecture if the requested one
	is larger, or this is the first explicit request.
	(get_hwcap_name): New function.
	(sparc_ip): Validate that hwcaps used by an instruction have actually
	been enabled.
	* doc/c-sparc.texi: Document new sparc options.
2011-09-22 00:03:30 +00:00
David S. Miller 527563502c Fix sparc testcases when building with 64-bit default.
gas/testsuite/

	* gas/sparc/imm-plus-rreg.d: Fix address regex for 64-bit.
	* gas/sparc/save-args.d: Likewise.
	* gas/sparc/ticc-imm-reg.d: Likewise, add -32 to options.
	* gas/sparc/v8-movwr-imm.d: Likewise.
2011-09-21 22:29:55 +00:00
David S. Miller 9e8c70f96b Annotate sparc objects with cpu hardware capabilities used.
bfd/

	* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
	* elfxx-sparc.h: Declare it.
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
	* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.

binutils/

	* readelf.c (display_sparc_hwcaps): New.
	(display_sparc_gnu_attribute): New.
	(process_sparc_specific): New.
	(process_arch_specific): When EM_SPARC, EM_SPARC32PLUS,
	or EM_SPARCV9 invoke process_sparc_specific.

gas/

	* config/tc-sparc.c (hwcap_seen): New bitmask, defined when
	not TE_SOLARIS.
	(sparc_ip): When not TE_SOLARIS, accumulate hwcap bits from
	sparc_opcode->flags of instruction into hwcap_seen.
	(sparc_md_end): Create Tag_GNU_Sparc_HWCAPS attribute if
	hwcap_seen is non-zero and not TE_SOLARIS.

gas/testsuite/

	* gas/sparc/hpcvis3.s: Update for fixed fchksum16 mnemonic.
	* gas/sparc/hpcvis3.d: Likewise.

include/elf/

	* sparc.h (Tag_GNU_Sparc_HWCAPS): New object attribute.
	(ELF_SPARC_HWCAP_*): New HWCAPS bitmask values.

include/opcode/

	* sparc.h (struct sparc_opcode): Expand 'flags' to unsigned int.
	(F_MUL32, F_DIV32, F_FSMULD, F_V8PLUS, F_POPC, F_VIS, F_VIS2,
	F_ASI_BLK_INIT, F_FMAF, F_VIS3, F_HPC, F_RANDOM, F_TRANS,
	F_FJFMAU, F_IMA, F_ASI_CACHE_SPARING): New flag bits.

opcodes/

	* sparc-opc.c (sparc_opcodes): Annotate table with HWCAP flag
	bits.  Fix "fchksm16" mnemonic.
2011-09-21 20:49:16 +00:00
Tristan Gingold a06413e3ef 2011-09-19 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (insert_operand): Call as_bad_value_out_of_range
	instead of as_warn_out_of_range.
2011-09-19 08:24:23 +00:00
Andreas Schwab b2ea18299b Add PR markers 2011-09-10 08:13:45 +00:00
David S. Miller 8dbb9eb3c6 opcodes/
* sparc-opc.c (sparc_opcodes): Add entry for 'save simm13,regrs1,regrd'
	This has been reported as being accepted by the Sun assmebler.

gas/testsuite/

	* gas/sparc/save-args.[sd]: New test.
	* gas/sparc/sparc.exp: Run new test.
2011-09-08 19:03:17 +00:00
David S. Miller 9bf29d72d4 opcodes/
The changes below bring 'mov' and 'ticc' instructions into line
	with the V8 SPARC Architecture Manual.
	* sparc-opc.c (sparc_opcodes): Add entry for 'ticc imm + regrs1'.
	* sparc-opc.c (sparc_opcodes): Add alias entries for
	'mov regrs2,%asrX'; 'mov regrs2,%y'; 'mov regrs2,%prs';
	'mov regrs2,%wim' and 'mov regrs2,%tbr'.
	* sparc-opc.c (sparc_opcodes): Move/Change entries for
	'mov imm,%asrX'; 'mov imm,%y'; 'mov imm,%prs'; 'mov imm,%wim'
	and 'mov imm,%tbr'.
	* sparc-opc.c (sparc_opcodes): Add wr alias entries to match above
	mov aliases.

gas/testsuite/

	* gas/sparc/ticc-imm-reg.[sd]: New test.
	* gas/sparc/v8-movwr-imm.[sd]: New test.
	* gas/sparc/sparc.exp: Run new tests.
2011-09-08 19:01:11 +00:00
David S. Miller f124dd4f3f gas/
* config/tc-sparc.c (sparc_ip): Handle 'i' + r<0..31>
	in addition to 'i' + [goli]<0..7>.

gas/testsuite/

	* gas/sparc/imm-plus-rreg.[sd]: New test.
	* gas/sparc/sparc.exp: Run new test.
2011-09-08 16:56:10 +00:00
David S. Miller cdf492019f opcodes/
* sparc-opc.c (pdistn): Destination is integer not float register.

gas/testsuite/

	* gas/sparc/hpcvis3.s: Correct pdistn test.
	* gas/sparc/hpcvis3.d: Likewise.
2011-09-08 16:40:47 +00:00
Nick Clifton 32425e36f3 * cgen.c (gas_cgen_pcrel_r_type): New function.
(gas_cgen_tc_gen_reloc): Check for GAS_CGEN_PCREL_R_TYPE.
	* cgen.h (gas_cgen_pcrel_r_type): Declare.
2011-09-08 16:07:11 +00:00
Richard Sandiford 48b0740182 gas/
PR gas/13167
	* dwarf2dbg.c (dwarf2_flush_pending_lines): Use symbol_temp_new_now.

gas/testsuite/
	PR gas/13167
	* gas/ia64/pr13167.d, gas/ia64/pr13167.s: New test.
	* gas/ia64/ia64.exp: Run it.
2011-09-08 12:18:28 +00:00
Andreas Schwab 96e67898bc * gas/testsuite/gas/m68k/all.exp: Run "mode5" test also with -mcpu=5200.
* gas/testsuite/gas/m68k/mode5.s: Add moveml testcases.
* gas/testsuite/gas/m68k/mode5.d: Update.

* opcodes/m68k-opc.c: Use "y" in moveml pattern for mcfisa_a.
2011-09-07 20:56:09 +00:00