1. 13 May, 2016 5 commits
    • Alan Modra's avatar
      Set dynamic tag VMA and size from dynamic section when possible · 4ade44b7
      Alan Modra authored
      Rather than searching the output for a specific named section, it's
      better, where possible, to use a linker created dynamic section to set
      a dynamic tag's value.  That way ld doesn't depend on the output
      section name, making it possibile to map dynamic sections differently.
      
      bfd/
      	* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
      	linker dynamic sections in calculating size and address of
      	* dynamic tags rather than using output sections.  Remove asserts.
      	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
      	* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
      	* elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
      	* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
      	* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
      	* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
      	* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
      	* elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
      	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
      	* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
      	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
      	* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
      	* elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
      	* elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
      	* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
      	* elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
      	* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
      	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
      	* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
      	* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
      	* elflink.c (bfd_elf_final_link): Likewise.
      	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
      	* elfxx-sparc.c (sparc_finish_dyn): Likewise.  Adjust error message.
      	* elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
      	don't set doit.  Look up dynobj section.
      	(elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
      	invocation and dynamic tag vma calculation.  Don't test
      	boolean var == TRUE.
      	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
      	DT_JMPREL calc.
      ld/
      	* testsuite/ld-arm/arm-elf.exp: Adjust for arm-no-rel-plt now passing.
      	Use different output file name for static app without .rel.plt.
      	* testsuite/ld-arm/arm-no-rel-plt.ld: Align .rel.dyn and .rela.dyn.
      	* testsuite/ld-arm/arm-no-rel-plt.out: Delete.
      	* testsuite/ld-arm/arm-no-rel-plt.r: New.
      	* testsuite/ld-arm/arm-static-app.d: Don't check file name.
      	* testsuite/ld-arm/arm-static-app.r: Likewise.
      4ade44b7
    • Alan Modra's avatar
      ld -z combreloc elf_link_sort_relocs · c8e44c6d
      Alan Modra authored
      A linker script may put .rela.plt in with other .rela.dyn relocs.
      The change to elf_reloc_type_class puts any PLT relocs last.  This
      patch makes the input section layout better match the sorted relocs.
      
      	* elflink.c (elf_link_sort_relocs): Wrap overlong lines.  Fix
      	octets_per_byte.  Put dynamic .rela.plt last in link orders.
      	Assign output_offset for reloc sections rather than writing
      	sorted relocs from block corresponding to output_offset.
      c8e44c6d
    • Trevor Saunders's avatar
      use XNEW and related macros more · add39d23
      Trevor Saunders authored
      Its a bit shorter and simpler than raw xmalloc.
      
      gas/ChangeLog:
      
      2016-05-13  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
      
      	* app.c (app_push): Use XNEW and related macros.
      	* as.c (parse_args): Likewise.
      	* cgen.c (make_right_shifted_expr): Likewise.
      	(gas_cgen_tc_gen_reloc): Likewise.
      	* config/bfin-defs.h: Likewise.
      	* config/bfin-parse.y: Likewise.
      	* config/obj-coff.c (stack_init): Likewise.
      	(stack_push): Likewise.
      	(coff_obj_symbol_new_hook): Likewise.
      	(coff_obj_symbol_clone_hook): Likewise.
      	(add_lineno): Likewise.
      	(coff_frob_symbol): Likewise.
      	* config/obj-elf.c (obj_elf_section_name): Likewise.
      	(build_group_lists): Likewise.
      	* config/obj-evax.c (evax_symbol_new_hook): Likewise.
      	* config/obj-macho.c (obj_mach_o_indirect_symbol): Likewise.
      	* config/tc-aarch64.c (insert_reg_alias): Likewise.
      	(find_or_make_literal_pool): Likewise.
      	(add_to_lit_pool): Likewise.
      	(fill_instruction_hash_table): Likewise.
      	* config/tc-alpha.c (load_expression): Likewise.
      	(emit_jsrjmp): Likewise.
      	(s_alpha_ent): Likewise.
      	(s_alpha_end): Likewise.
      	(s_alpha_linkage): Likewise.
      	(md_begin): Likewise.
      	(tc_gen_reloc): Likewise.
      	* config/tc-arc.c (arc_insert_opcode): Likewise.
      	(arc_extcorereg): Likewise.
      	* config/tc-bfin.c: Likewise.
      	* config/tc-cr16.c: Likewise.
      	* config/tc-cris.c: Likewise.
      	* config/tc-crx.c (preprocess_reglist): Likewise.
      	* config/tc-d10v.c: Likewise.
      	* config/tc-frv.c (frv_insert_vliw_insn): Likewise.
      	(frv_tomcat_shuffle): Likewise.
      	* config/tc-h8300.c: Likewise.
      	* config/tc-i370.c (i370_macro): Likewise.
      	* config/tc-i386.c (lex_got): Likewise.
      	(md_parse_option): Likewise.
      	* config/tc-ia64.c (alloc_record): Likewise.
      	(set_imask): Likewise.
      	(save_prologue_count): Likewise.
      	(dot_proc): Likewise.
      	(dot_endp): Likewise.
      	(ia64_frob_label): Likewise.
      	(add_qp_imply): Likewise.
      	(add_qp_mutex): Likewise.
      	(mark_resource): Likewise.
      	(dot_alias): Likewise.
      	* config/tc-m68hc11.c: Likewise.
      	* config/tc-m68k.c (m68k_frob_label): Likewise.
      	(s_save): Likewise.
      	(mri_control_label): Likewise.
      	(push_mri_control): Likewise.
      	(build_mri_control_operand): Likewise.
      	(s_mri_else): Likewise.
      	(s_mri_break): Likewise.
      	(s_mri_next): Likewise.
      	(s_mri_for): Likewise.
      	(s_mri_endw): Likewise.
      	* config/tc-metag.c (create_mnemonic_htab): Likewise.
      	* config/tc-microblaze.c: Likewise.
      	* config/tc-mmix.c (s_loc): Likewise.
      	* config/tc-nds32.c (nds32_relax_hint): Likewise.
      	* config/tc-nios2.c (nios2_insn_reloc_new): Likewise.
      	* config/tc-rl78.c: Likewise.
      	* config/tc-rx.c (rx_include): Likewise.
      	* config/tc-sh.c: Likewise.
      	* config/tc-sh64.c (shmedia_frob_section_type): Likewise.
      	* config/tc-sparc.c: Likewise.
      	* config/tc-spu.c: Likewise.
      	* config/tc-tic6x.c (static tic6x_unwind_info *tic6x_get_unwind): Likewise.
      	(tic6x_start_unwind_section): Likewise.
      	* config/tc-tilegx.c: Likewise.
      	* config/tc-tilepro.c: Likewise.
      	* config/tc-v850.c: Likewise.
      	* config/tc-visium.c: Likewise.
      	* config/tc-xgate.c: Likewise.
      	* config/tc-xtensa.c (xtensa_translate_old_userreg_ops): Likewise.
      	(new_resource_table): Likewise.
      	(resize_resource_table): Likewise.
      	(xtensa_create_trampoline_frag): Likewise.
      	(xtensa_maybe_create_literal_pool_frag): Likewise.
      	(cache_literal_section): Likewise.
      	* config/xtensa-relax.c (append_transition): Likewise.
      	(append_condition): Likewise.
      	(append_value_condition): Likewise.
      	(append_constant_value_condition): Likewise.
      	(append_literal_op): Likewise.
      	(append_label_op): Likewise.
      	(append_constant_op): Likewise.
      	(append_field_op): Likewise.
      	(append_user_fn_field_op): Likewise.
      	(enter_opname_n): Likewise.
      	(enter_opname): Likewise.
      	(split_string): Likewise.
      	(parse_insn_templ): Likewise.
      	(clone_req_or_option_list): Likewise.
      	(clone_req_option_list): Likewise.
      	(parse_option_cond): Likewise.
      	(parse_insn_pattern): Likewise.
      	(parse_insn_repl): Likewise.
      	(build_transition): Likewise.
      	(build_transition_table): Likewise.
      	* dw2gencfi.c (alloc_fde_entry): Likewise.
      	(alloc_cfi_insn_data): Likewise.
      	(cfi_add_CFA_remember_state): Likewise.
      	(dot_cfi_escape): Likewise.
      	(dot_cfi_fde_data): Likewise.
      	(select_cie_for_fde): Likewise.
      	* dwarf2dbg.c (dwarf2_directive_loc): Likewise.
      	* ecoff.c (ecoff_add_bytes): Likewise.
      	(ecoff_build_debug): Likewise.
      	* input-scrub.c (input_scrub_push): Likewise.
      	(input_scrub_begin): Likewise.
      	(input_scrub_next_buffer): Likewise.
      	* itbl-ops.c (append_insns_as_macros): Likewise.
      	(alloc_entry): Likewise.
      	(alloc_field): Likewise.
      	* listing.c (listing_newline): Likewise.
      	(listing_listing): Likewise.
      	* macro.c (get_any_string): Likewise.
      	(delete_macro): Likewise.
      	* stabs.c (generate_asm_file): Likewise.
      	(stabs_generate_asm_lineno): Likewise.
      	* subsegs.c (subseg_change): Likewise.
      	(subseg_get): Likewise.
      	* symbols.c (define_dollar_label): Likewise.
      	(symbol_relc_make_sym): Likewise.
      	* write.c (write_relocs): Likewise.
      add39d23
    • Trevor Saunders's avatar
      use xstrdup, xmemdup0 and concat more · 29a2809e
      Trevor Saunders authored
      gas/ChangeLog:
      
      2016-05-13  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
      
      	* config/obj-coff.c (obj_coff_def): Simplify string copying.
      	(weak_name2altname): Likewise.
      	(weak_uniquify): Likewise.
      	(obj_coff_section): Likewise.
      	(obj_coff_init_stab_section): Likewise.
      	* config/obj-elf.c (obj_elf_section_name): Likewise.
      	(obj_elf_init_stab_section): Likewise.
      	* config/obj-evax.c (evax_shorten_name): Likewise.
      	* config/obj-macho.c (obj_mach_o_make_or_get_sect): Likewise.
      	* config/tc-aarch64.c (create_register_alias): Likewise.
      	* config/tc-alpha.c (load_expression): Likewise.
      	(s_alpha_file): Likewise.
      	(s_alpha_section_name): Likewise.
      	(tc_gen_reloc): Likewise.
      	* config/tc-arc.c (md_assemble): Likewise.
      	* config/tc-arm.c (create_neon_reg_alias): Likewise.
      	(start_unwind_section): Likewise.
      	* config/tc-hppa.c (pa_build_unwind_subspace): Likewise.
      	(hppa_elf_mark_end_of_function): Likewise.
      	* config/tc-nios2.c (nios2_modify_arg): Likewise.
      	(nios2_negate_arg): Likewise.
      	* config/tc-rx.c (rx_section): Likewise.
      	* config/tc-sh64.c (sh64_consume_datalabel): Likewise.
      	* config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
      	* config/tc-tic54x.c (tic54x_include): Likewise.
      	(tic54x_macro_info): Likewise.
      	(subsym_get_arg): Likewise.
      	(subsym_substitute): Likewise.
      	(tic54x_start_line_hook): Likewise.
      	* config/tc-xtensa.c (xtensa_literal_prefix): Likewise.
      	(xg_reverse_shift_count): Likewise.
      	* config/xtensa-relax.c (enter_opname_n): Likewise.
      	(split_string): Likewise.
      	* dwarf2dbg.c (get_filenum): Likewise.
      	(process_entries): Likewise.
      	* expr.c (operand): Likewise.
      	* itbl-ops.c (alloc_entry): Likewise.
      	* listing.c (listing_message): Likewise.
      	(listing_title): Likewise.
      	* macro.c (check_macro): Likewise.
      	* stabs.c (s_xstab): Likewise.
      	* symbols.c (symbol_relc_make_expr): Likewise.
      	* write.c (compress_debug): Likewise.
      29a2809e
    • GDB Administrator's avatar
      Automatic date update in version.in · 59441ccd
      GDB Administrator authored
      59441ccd
  2. 12 May, 2016 5 commits
    • H.J. Lu's avatar
      Handle symbols defined/referenced only within IR · 3355cb3b
      H.J. Lu authored
      The plugin is called to claim symbols in an archive element from
      plugin_object_p.  But those symbols aren't needed to create output.
      They are defined and referenced only within IR.  get_symbols should
      return resolution based on IR symbol kinds.
      
      	PR ld/20070
      	* Makefile.am (noinst_LTLIBRARIES): Add libldtestplug4.la.
      	(libldtestplug4_la_SOURCES): New.
      	(libldtestplug4_la_CFLAGS): Likewise.
      	(libldtestplug4_la_LDFLAGS): Likewise.
      	* Makefile.in: Regenerated.
      	* plugin.c (get_symbols): Return resolution based on IR symbol
      	kinds for symbols defined/referenced only within IR.
      	* testplug4.c: New file.
      	* ld/testsuite/ld-plugin/pr20070.d: Likewise.
      	* ld/testsuite/ld-plugin/pr20070a.c: Likewise.
      	* ld/testsuite/ld-plugin/pr20070b.c: Likewise.
      	* testsuite/ld-plugin/plugin.exp (plugin4_name): New.
      	(plugin4_path): Likewise.
      	Add a test for ld/20070.
      3355cb3b
    • Doug Evans's avatar
      PR symtab/19999 gdb unable to resolve vars with fission+PIE · 8ddd5a6c
      Doug Evans authored
      gdb/ChangeLog:
      
      	* dwarf2loc.c (dwarf2_find_location_expression): For DWO files still
      	add base_offset.
      
      gdb/testsuite/ChangeLog:
      
      	* lib/dwarf.exp (build_executable_from_fission_assembler): Pass
      	$options when building executable.
      	* gdb.dwarf2/fission-loclists-pie.c: New file.
      	* gdb.dwarf2/fission-loclists-pie.exp: New file.
      8ddd5a6c
    • Nick Clifton's avatar
      58c7f094
    • Alan Modra's avatar
      ld -z combreloc reloc sorting · 1997c994
      Alan Modra authored
      PLT relocs don't appear in .rela.dyn, at least not when using
      normal linker scripts.  However, if they do, then they ought to be
      placed last rather than in the middle of other relocs.
      
      	* elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
      1997c994
    • GDB Administrator's avatar
      Automatic date update in version.in · 001c250f
      GDB Administrator authored
      001c250f
  3. 11 May, 2016 10 commits
    • Nick Clifton's avatar
    • Matthew Fortune's avatar
      Add MIPS32 DSPr3 support. · 8f4f9071
      Matthew Fortune authored
      bfd/
      
      	* elfxx-mips.c (print_mips_ases): Add DSPR3.
      
      binutils/
      
      	* readelf.c (print_mips_ases): Add DSPR3.
      
      gas/
      
      	* config/tc-mips.c (options): Add OPTION_DSPR3 and
      	OPTION_NO_DSPR3.
      	(md_longopts): Likewise.
      	(md_show_usage): Add help for -mdspr3 and -mno-dspr3.
      	(mips_ases): Define availability for DSPr3.
      	(mips_ase_groups): Add ASE_DSPR3 to the DSP group.
      	(mips_convert_ase_flags): Map ASE_DSPR3 to AFL_ASE_DSPR3.
      	* doc/as.texinfo: Document -mdspr3, -mno-dspr3.  Fix -mdspr2
      	formatting.
      	* doc/c-mips.texi: Document -mdspr3, -mno-dspr3, .set dspr3 and
      	.set nodspr3.  Fix -mdspr2 formatting.
      	* testsuite/gas/mips/mips32-dspr3.d: New file.
      	* testsuite/gas/mips/mips32-dspr3.s: Likewise.
      	* testsuite/gas/mips/mips.exp: Run mips32-dspr3 test.
      
      include/
      
      	* elf/mips.h (AFL_ASE_DSPR3): New macro.
      	(AFL_ASE_MASK): Update to include AFL_ASE_DSPR3.
      	* opcode/mips.h (ASE_DSPR3): New macro.
      
      opcodes/
      
      	* mips-dis.c (mips_arch_choices): Add ASE_DSPR3 to mips32r6 and
      	mips64r6.
      	* mips-opc.c (D34): New macro.
      	(mips_builtin_opcodes): Define bposge32c for DSPr3.
      8f4f9071
    • Alan Modra's avatar
      [HPPA] Attach linker created dynamic sections to stub bfd · a464198b
      Alan Modra authored
      bfd/
      	* elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
      	(elf32_hppa_check_relocs): Don't set dynobj.
      	(elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
      	(elf32_hppa_build_stubs): Likewise.
      	* elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
      ld/
      	* emultempl/hppaelf.em (hppaelf_create_output_section_statements):
      	Call elf32_hppa_init_stub_bfd.
      a464198b
    • Alan Modra's avatar
      ld --gc-sections fail with __tls_get_addr_opt · 3bd43ebc
      Alan Modra authored
      When --gc-sections is active, __tls_get_addr_opt is marked as not
      needed and forced local before ppc*_elf_tls_setup is run.
      
      bfd/
      	PR 20060
      	* elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
      	* elf32-ppc.c (ppc_elf_tls_setup): Likewise.
      ld/
      	PR 20060
      	* testsuite/ld-powerpc/powerpc.exp: Run new tests.
      	* testsuite/ld-powerpc/tlsdll.s: New.
      	* testsuite/ld-powerpc/tlsdll.ver: New.
      	* testsuite/ld-powerpc/tlsdll_32.s: New.
      	* testsuite/ld-powerpc/tlsopt5.d: New.
      	* testsuite/ld-powerpc/tlsopt5.s: New.
      	* testsuite/ld-powerpc/tlsopt5_32.d: New.
      	* testsuite/ld-powerpc/tlsopt5_32.s: New.
      3bd43ebc
    • Nick Clifton's avatar
      Ensure that padding in the constant pool uses constant values. · a6684f0d
      Nick Clifton authored
      	PR target/20068
      	* config/tc-arm.c (add_to_lit_pool): Ensure that the padding added
      	to the pool uses O_constant.
      	* testsuite/gas/arm/pr20068.s: New test.
      	* testsuite/gas/arm/pr20068.d: Test driver.
      a6684f0d
    • Jiong Wang's avatar
      [AArch64] Remove redundant tls relax in elfNN_aarch64_final_link_relocate · 4e7fbb34
      Jiong Wang authored
      bfd/
        * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
        aarch64_tls_transition check.
      4e7fbb34
    • Nick Clifton's avatar
      oops - fix up changelog entry · 4179a6a2
      Nick Clifton authored
      4179a6a2
    • Nick Clifton's avatar
      Skip new ARM security extension tests on non-ELF based targets. · be5c445b
      Nick Clifton authored
      	* testsuite/gas/arm/archv8m-cmse-base.d: Skip for non-ELF ARM targets.
      	* testsuite/gas/arm/archv8m-cmse-main-1.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-main-2.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-msr-base.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-1.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-2.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-3.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise.
      be5c445b
    • Trevor Saunders's avatar
      fix up two issues with the removal of unused variables · df140a0b
      Trevor Saunders authored
      gdb/ChangeLog:
      
      2016-05-10  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
      
      	* iq2000-tdep.c (iq2000_scan_prologue): Remove if that shouldn't guard
      	anything.
      	* linespec.c (add_sal_to_sals): Restore call to symtab_to_fullname.
      df140a0b
    • GDB Administrator's avatar
      Automatic date update in version.in · aa79adb0
      GDB Administrator authored
      aa79adb0
  4. 10 May, 2016 13 commits
    • Alexander Fomin's avatar
      Enable Intel RDPID instruction. · 8bc52696
      Alexander Fomin authored
      This patch enables Intel RDPID instruction described in Intel64 and
      IA-32 Architectures Software Developer's Manual, April 2016.
      
      gas/
      
      	* config/tc-i386.c (cpu_arch): Add RDPID.
      	* doc/c-i386.texi: Document RDPID.
      
      gas/testsuite/
      
      	* gas/i386/i386.exp: Run RDPID tests.
      	* gas/i386/prefix.d: Adjust.
      	* gas/i386/rdpid.s: New test.
      	* gas/i386/rdpid.d: Ditto.
      	* gas/i386/rdpid-intel.d: Ditto.
      	* gas/i386/x86-64-rdpid.s: Ditto.
      	* gas/i386/x86-64-rdpid.d: Ditto.
      	* gas/i386/x86-64-rdpid-intel.d: Ditto.
      
      opcodes/
      
      	* i386-dis.c (prefix_table): Add RDPID instruction.
      	* i386-gen.c (cpu_flag_init): Add RDPID flag.
      	(cpu_flags): Add RDPID bitfield.
      	* i386-opc.h (enum): Add RDPID element.
      	(i386_cpu_flags): Add RDPID field.
      	* i386-opc.tbl: Add RDPID instruction.
      	* i386-init.h: Regenerate.
      	* i386-tbl.h: Regenerate.
      8bc52696
    • Thomas Preud'homme's avatar
      Allow veneers to claim veneered symbols · 4f4faa4d
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      bfd/
      	* elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
      	enumerator.
      	(arm_stub_sym_claimed): New function.
      	(elf32_arm_create_stub): Use veneered symbol name and section if
      	veneer needs to claim its symbol, and keep logic unchanged otherwise.
      	(arm_stub_claim_sym): New function.
      	(arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
      	veneered symbol, otherwise create local symbol as before.
      4f4faa4d
    • Thomas Preud'homme's avatar
      Use getters/setters to access ARM branch type · 39d911fc
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      bfd/
      	* elf32-arm.c (elf32_arm_size_stubs): Use new macros
      	ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
      	and set branch type of a symbol.
      	(bfd_elf32_arm_process_before_allocation): Likewise.
      	(elf32_arm_relocate_section): Likewise and fix identation along the
      	way.
      	(allocate_dynrelocs_for_symbol): Likewise.
      	(elf32_arm_finish_dynamic_symbol): Likewise.
      	(elf32_arm_swap_symbol_in): Likewise.
      	(elf32_arm_swap_symbol_out): Likewise.
      
      gas/
      	* config/tc-arm.c (arm_adjust_symtab): Use ARM_SET_SYM_BRANCH_TYPE to
      	set branch type of a symbol.
      
      gdb/
      	* arm-tdep.c (arm_elf_make_msymbol_special): Use
      	ARM_GET_SYM_BRANCH_TYPE to get branch type of a symbol.
      
      include/
      	* arm.h (enum arm_st_branch_type): Add new ST_BRANCH_ENUM_SIZE
      	enumerator.
      	(NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS): New macro.
      	(ENUM_ARM_ST_BRANCH_TYPE_BITMASK): Likewise.
      	(ARM_SYM_BRANCH_TYPE): Replace by ...
      	(ARM_GET_SYM_BRANCH_TYPE): This and ...
      	(ARM_SET_SYM_BRANCH_TYPE): This in two versions depending on whether
      	BFD_ASSERT is defined or not.
      
      ld/
      	* emultempl/armelf.em (gld${EMULATION_NAME}_finish): Use
      	ARM_GET_SYM_BRANCH_TYPE to get branch type of a symbol.
      
      opcodes/
      	* arm-dis.c (get_sym_code_type): Use ARM_GET_SYM_BRANCH_TYPE to get
      	branch type of a symbol.
      	(print_insn): Likewise.
      39d911fc
    • Thomas Preud'homme's avatar
      Allow stubs without associated input section in ARM backend · 6bde4c52
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      bfd/
      	* bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
      	* bfd-in2.h: Regenerated.
      	* elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
      	parameter to add_stub_section callback.
      	(elf32_arm_create_or_find_stub_sec): Get output section from link_sec
      	and pass it down to add_stub_section.
      	(elf32_arm_add_stub): Set section to stub_sec if NULL before using it
      	for error message.
      	(elf32_arm_size_stubs): Add output section parameter to
      	add_stub_section function pointer parameter.
      
      ld/
      	* emultempl/armelf.em (elf32_arm_add_stub_section): Add output_section
      	parameter and rename input_section parameter to after_input_section.
      	Append input stub section to the output section if after_input_section
      	is NULL.
      6bde4c52
    • Thomas Preud'homme's avatar
      Factor our stub creation in ARM backend · b715f643
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      bfd/
      	* elf32-arm.c (elf32_arm_create_stub): New function.
      	(elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
      b715f643
    • Thomas Preud'homme's avatar
      Refactor Cortex-A8 erratum workaround in preparation · 8d9d9490
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      bfd/
      	* elf32-arm.c (enum elf32_arm_stub_type): Delete
      	arm_stub_a8_veneer_lwm enumerator.
      	(arm_stub_a8_veneer_lwm): New unsigned constant to replace
      	aforementioned enumerator.
      	(struct elf32_arm_stub_hash_entry): Delete target_addend
      	field and add source_value.
      	(struct a8_erratum_fix): Delete addend field and add target_offset.
      	(stub_hash_newfunc): Initialize source_value field amd remove
      	initialization for target_addend.
      	(arm_build_one_stub): Stop special casing Thumb relocations: promote
      	the else to being always executed, moving the
      	arm_stub_a8_veneer_b_cond specific code in it.  Remove
      	stub_entry->target_addend from points_to computation.
      	(cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
      	to target symbol from start of section rather than the offset from the
      	stub address.
      	(elf32_arm_size_stubs): Set stub_entry's source_value and target_value
      	fields from struct a8_erratum_fix's offset and target_offset
      	respectively.
      	(make_branch_to_a8_stub): Rename target variable to loc.  Compute
      	veneered_insn_loc and loc using stub_entry's source_value.
      8d9d9490
    • Thomas Preud'homme's avatar
      Add support for ARMv8-M Mainline with DSP extension · 15afaa63
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      bfd/
      	(elf32_arm_merge_eabi_attributes): Add merging logic for
      	Tag_DSP_extension.
      
      binutils/
      	* readelf.c (display_arm_attribute): Add output for Tag_DSP_extension.
      	(arm_attr_public_tags): Define DSP_extension attribute.
      
      gas/
      	* NEWS: Document ARMv8-M and ARMv8-M Security and DSP Extensions.
      	* config/tc-arm.c (arm_ext_dsp): New feature for Thumb DSP
      	instructions.
      	(arm_extensions): Add dsp extension for ARMv8-M Mainline.
      	(aeabi_set_public_attributes): Memorize the feature bits of the
      	architecture selected for Tag_CPU_arch.  Use it to set
      	Tag_DSP_extension to 1 for ARMv8-M Mainline with DSP extension.
      	(arm_convert_symbolic_attribute): Define Tag_DSP_extension.
      	* testsuite/gas/arm/arch7em-bad.d: Rename to ...
      	* testsuite/gas/arm/arch7em-bad-1.d: This.
      	* testsuite/gas/arm/arch7em-bad-2.d: New file.
      	* testsuite/gas/arm/arch7em-bad-3.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-1.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-2.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-3.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise.
      	* testsuite/gas/arm/archv8m-main-dsp-5.d: Likewise.
      	* testsuite/gas/arm/attr-march-armv8m.main.dsp.d: Likewise.
      
      include/
      	* elf/arm.h (Tag_DSP_extension): Define.
      
      ld/
      	* testsuite/ld-arm/arm-elf.exp (EABI attribute merging 10 (DSP)): New
      	test.
      	* testsuite/ld-arm/attr-merge-10b-dsp.s: New file.
      	* testsuite/ld-arm/attr-merge-10-dsp.attr: Likewise.
      15afaa63
    • Thomas Preud'homme's avatar
      Allow extension availability to depend on several architecture bits · d942732e
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      gas/
      	* config/tc-arm.c (struct arm_option_extension_value_table): Make
      	allowed_archs an array with 2 entries.
      	(ARM_EXT_OPT): Adapt to only fill the first entry of allowed_archs.
      	(ARM_EXT_OPT2): New macro filling the two entries of allowed_archs.
      	(arm_extensions): Use separate entries in allowed_archs when several
      	archs are allowed to use an extension and change ARCH_ANY in
      	ARM_ARCH_NONE in allowed_archs.
      	(arm_parse_extension): Check that, for each allowed_archs entry, all
      	bits are set in the current architecture, ignoring ARM_ANY entries.
      	(s_arm_arch_extension): Likewise.
      
      include/
      	* arm.h (ARM_FSET_CPU_SUBSET): Define macro.
      d942732e
    • Thomas Preud'homme's avatar
      Add support for ARMv8-M security extensions instructions · 16a1fa25
      Thomas Preud'homme authored
      2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      gas/
      	* config/tc-arm.c (arm_ext_m): Add feature bit ARM_EXT2_V8M_MAIN.
      	(arm_ext_v8m_main): New feature set for bit ARM_EXT2_V8M_MAIN.
      	(arm_ext_v8m_m_only): New feature set for instructions in ARMv8-M not
      	shared with a non M profile architecture.
      	(do_rn): New function.
      	(known_t32_only_insn): Check opcode against arm_ext_v8m_m_only rather
      	than arm_ext_v8m.
      	(v7m_psrs): Add ARMv8-M security extensions new special registers.
      	(insns): Add ARMv8-M Security Extensions instructions.
      	(aeabi_set_public_attributes): Use arm_ext_v8m_m_only instead of
      	arm_ext_v8m_m to decide the profile and the Thumb ISA.
      	* testsuite/gas/arm/archv8m-cmse.s: New file.
      	* testsuite/gas/arm/archv8m-cmse-main.s: Likewise..
      	* testsuite/gas/arm/archv8m-cmse-msr.s: Likewise.
      	* testsuite/gas/arm/any-cmse.d: Likewise.
      	* testsuite/gas/arm/any-cmse-main.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-base.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-msr-base.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-main-1.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-main-2.d: Likewise.
      	* testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise.
      
      include/
      	* opcode/arm.h (ARM_EXT2_V8M_MAIN): new feature bit.
      	(ARM_AEXT2_V8M_MAIN): New architecture extension feature set.
      	(ARM_ARCH_V8M_MAIN): Use ARM_AEXT2_V8M_MAIN instead of ARM_AEXT2_V8M
      	for the high core bits.
      
      opcodes/
      	* arm-dis.c (coprocessor_opcodes): Add entries for VFP ARMv8-M
      	Mainline Security Extensions instructions.
      	(thumb_opcodes): Add entries for narrow ARMv8-M Security
      	Extensions instructions.
      	(thumb32_opcodes): Add entries for wide ARMv8-M Security Extensions
      	instructions.
      	(psr_name): Add new MSP_NS and PSP_NS ARMv8-M Security Extensions
      	special registers.
      16a1fa25
    • Andrew Burgess's avatar
      binutils/doc: Update documentation for nm --size-sort · 29f4fdc4
      Andrew Burgess authored
      The documentation for 'nm --size-sort' is out of step with the code, the
      special handling for ELF is not mentioned in the documentation, and
      could cause confusion to a user.
      
      binutils/ChangeLog:
      
      	* doc/binutils.texi (nm): Update description of --size-sort.
      29f4fdc4
    • Christophe Lyon's avatar
      2016-05-10 Christophe Lyon <christophe.lyon@linaro.org> · d63a50b7
      Christophe Lyon authored
      	* ld/testsuite/ld-elf/flags1.d (xfail): Remove *-*-nacl*".
      d63a50b7
    • Pip Cet's avatar
      PR 20059 _bfd_elf_copy_link_hash_symbol_type segfault · 66a36822
      Pip Cet authored
      	PR ld/20059
      	* elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
      	Define as _bfd_generic_copy_link_hash_symbol_type when using
      	generic hash table.
      66a36822
    • GDB Administrator's avatar
      Automatic date update in version.in · a932d108
      GDB Administrator authored
      a932d108
  5. 09 May, 2016 7 commits
    • Han Shen's avatar
      Fix for PR gold/19987. · 5c28a503
      Han Shen authored
      5c28a503
    • Nick Clifton's avatar
      Fix seg fault objdumping a corrupt binary with an invalid sh_link field. · 315350be
      Nick Clifton authored
      	PR binutils/20063
      	* elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
      	field before accessing sections array.
      
      	* readelf.c (get_32bit_section_headers): Warn if an out of range
      	sh_link or sh_info field is encountered.
      	(get_64bit_section_headers): Likewise.
      315350be
    • Christophe Monat's avatar
      [ARM/STM32L4XX] PR 20030: --fix-stm32l4xx-629360 fails to create vldm/vpop... · 9239bbd3
      Christophe Monat authored
      [ARM/STM32L4XX] PR 20030: --fix-stm32l4xx-629360 fails to create vldm/vpop veneers for double-precision registers
      
      bfd/
      	PR ld/20030
      	* elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
      	(stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
      	to nb_words.
      	(create_instruction_vldmia): Add is_dp to disambiguate SP/DP
      	encoding.
      	(create_instruction_vldmdb): Likewise.
      	(stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
      	uses it to re-encode.
      
      ld/
      	PR ld/20030
      	* testsuite/ld-arm/arm-elf.exp: Run new stm32l4xx-fix-vldm-dp
      	tests. Fix misnamed stm32l4xx-fix-all.
      	* testsuite/ld-arm/stm32l4xx-fix-vldm-dp.s: New tests for multiple
      	loads with DP registers.
      	* testsuite/ld-arm/stm32l4xx-fix-vldm-dp.d: New reference file.
      	* testsuite/ld-arm/stm32l4xx-fix-vldm.s: Add missing comment.
      	* testsuite/ld-arm/stm32l4xx-fix-all.s: Add tests for multiple
      	loads with DP registers.
      	* testsuite/ld-arm/stm32l4xx-fix-all.d: Update reference.
      9239bbd3
    • Nick Clifton's avatar
      Revert accidental commit. · 73597c18
      Nick Clifton authored
      	PR 19938
      	* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
      	commit.
      73597c18
    • Pitchumani Sivanupandi's avatar
      Update section merge test. · 924bc11b
      Pitchumani Sivanupandi authored
      	* testsuite/ld-elf/flags1.d (readelf): Dump section header instead
      	program headers.
      	(xfail): Remove avr-*-*.
      	Update regex to check the section flags.
      	* testsuite/ld-elf/merge.d (xfail): Remove avr-*-*.
      924bc11b
    • Jose E. Marchesi's avatar
      opcodes,gas: sparc: fix mnemonic of faligndatai · d751b79e
      Jose E. Marchesi authored
      opcodes/ChangeLog:
      
      2016-05-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* sparc-opc.c (sparc_opcodes): Fix mnemonic of faligndatai.
      
      gas/ChangeLog:
      
      2016-05-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
      
      	* testsuite/gas/sparc/sparc5vis4.s: Fix mnemonic of faligndatai.
      	* testsuite/gas/sparc/sparc5vis4.d: Likewise.
      d751b79e
    • Alan Modra's avatar
      Regenerate configure · 6eb7d830
      Alan Modra authored
      6eb7d830