GDB Administrator [Mon, 16 May 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
Maciej W. Rozycki [Sun, 15 May 2016 22:14:52 +0000 (23:14 +0100)]
SH64/GAS: Fix a -Wwrite-strings build failure
Fix a commit
6757cf57697d ("enable -Wwrite-strings for gas") regression.
gas/
* config/tc-sh64.c (shmedia_check_limits): Constify `msg'.
Maciej W. Rozycki [Sun, 15 May 2016 05:39:14 +0000 (06:39 +0100)]
ld/testsuite/ld-elf/flags1.d: Update for `*-*-nacl*' xfail removal
ld/
* testsuite/ld-elf/flags1.d: Update for `*-*-nacl*' xfail
removal.
GDB Administrator [Sun, 15 May 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Sat, 14 May 2016 12:51:28 +0000 (05:51 -0700)]
Remove redundant sizeof on EXPECTED_VIEW_LENGTH
PR ld/20097
* testplug2.c (onall_symbols_read): Remove redundant sizeof
on EXPECTED_VIEW_LENGTH.
* testplug4.c (onall_symbols_read): Likewise.
GDB Administrator [Sat, 14 May 2016 00:00:14 +0000 (00:00 +0000)]
Automatic date update in version.in
Peter Bergner [Fri, 13 May 2016 20:15:00 +0000 (15:15 -0500)]
Accept valid one byte signed and unsigned values for the IMM8 operand.
opcodes/
* ppc-opc.c (IMM8): Use PPC_OPERAND_SIGNOPT.
gas/
* testsuite/gas/ppc/power9.d <xxspltib>: Add additional operand tests.
* testsuite/gas/ppc/power9.s: Likewise.
H.J. Lu [Fri, 13 May 2016 17:59:32 +0000 (10:59 -0700)]
Don't convert GOTPCREL relocation against large section
bfd/
PR ld/20093
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
GOTPCREL relocation against large section.
ld/
PR ld/20093
* testsuite/ld-x86-64/pr20093-1.d: New file.
* testsuite/ld-x86-64/pr20093-1.s: Likewise.
* testsuite/ld-x86-64/pr20093-2.d: Likewise.
* testsuite/ld-x86-64/pr20093-2.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr20093-1 and pr20093-2.
Alan Modra [Fri, 13 May 2016 06:27:10 +0000 (15:57 +0930)]
Fix build breakage
* config/obj-coff.c (weak_uniquify): Delete unused var.
Alan Modra [Fri, 13 May 2016 02:18:56 +0000 (11:48 +0930)]
Set dynamic tag VMA and size from dynamic section when possible
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.
Alan Modra [Fri, 13 May 2016 02:04:56 +0000 (11:34 +0930)]
ld -z combreloc elf_link_sort_relocs
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.
Trevor Saunders [Wed, 6 Apr 2016 20:26:46 +0000 (16:26 -0400)]
use XNEW and related macros more
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.
Trevor Saunders [Mon, 28 Mar 2016 09:49:15 +0000 (05:49 -0400)]
use xstrdup, xmemdup0 and concat more
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.
GDB Administrator [Fri, 13 May 2016 00:00:12 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Thu, 12 May 2016 23:50:34 +0000 (16:50 -0700)]
Handle symbols defined/referenced only within IR
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.
Doug Evans [Thu, 12 May 2016 16:20:57 +0000 (09:20 -0700)]
PR symtab/19999 gdb unable to resolve vars with fission+PIE
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.
Nick Clifton [Thu, 12 May 2016 16:19:44 +0000 (17:19 +0100)]
Use correct regexp syntax in ARM PR20068 test
Alan Modra [Thu, 12 May 2016 14:29:26 +0000 (23:59 +0930)]
ld -z combreloc reloc sorting
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.
GDB Administrator [Thu, 12 May 2016 00:00:11 +0000 (00:00 +0000)]
Automatic date update in version.in
Nick Clifton [Wed, 11 May 2016 17:04:03 +0000 (18:04 +0100)]
Update pr20068 test to allow for big endian ARM configuration
Matthew Fortune [Wed, 26 Nov 2014 11:15:01 +0000 (11:15 +0000)]
Add MIPS32 DSPr3 support.
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.
Alan Modra [Wed, 11 May 2016 13:21:14 +0000 (22:51 +0930)]
[HPPA] Attach linker created dynamic sections to stub bfd
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.
Alan Modra [Wed, 11 May 2016 12:24:05 +0000 (21:54 +0930)]
ld --gc-sections fail with __tls_get_addr_opt
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.
Nick Clifton [Wed, 11 May 2016 11:51:04 +0000 (12:51 +0100)]
Ensure that padding in the constant pool uses constant values.
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.
Jiong Wang [Wed, 11 May 2016 10:55:02 +0000 (11:55 +0100)]
[AArch64] Remove redundant tls relax in elfNN_aarch64_final_link_relocate
bfd/
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
aarch64_tls_transition check.
Nick Clifton [Wed, 11 May 2016 08:06:58 +0000 (09:06 +0100)]
oops - fix up changelog entry
Nick Clifton [Wed, 11 May 2016 08:04:17 +0000 (09:04 +0100)]
Skip new ARM security extension tests on non-ELF based targets.
* 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.
Trevor Saunders [Wed, 11 May 2016 01:33:45 +0000 (21:33 -0400)]
fix up two issues with the removal of unused variables
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.
GDB Administrator [Wed, 11 May 2016 00:00:18 +0000 (00:00 +0000)]
Automatic date update in version.in
Alexander Fomin [Tue, 10 May 2016 18:35:52 +0000 (21:35 +0300)]
Enable Intel RDPID instruction.
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.
Thomas Preud'homme [Tue, 10 May 2016 15:20:19 +0000 (16:20 +0100)]
Allow veneers to claim veneered symbols
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.
Thomas Preud'homme [Tue, 10 May 2016 15:14:23 +0000 (16:14 +0100)]
Use getters/setters to access ARM branch type
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.
Thomas Preud'homme [Tue, 10 May 2016 14:45:01 +0000 (15:45 +0100)]
Allow stubs without associated input section in ARM backend
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.
Thomas Preud'homme [Tue, 10 May 2016 14:42:20 +0000 (15:42 +0100)]
Factor our stub creation in ARM backend
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.
Thomas Preud'homme [Tue, 10 May 2016 14:28:10 +0000 (15:28 +0100)]
Refactor Cortex-A8 erratum workaround in preparation
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.
Thomas Preud'homme [Tue, 10 May 2016 14:15:15 +0000 (15:15 +0100)]
Add support for ARMv8-M Mainline with DSP extension
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.
Thomas Preud'homme [Tue, 10 May 2016 14:06:41 +0000 (15:06 +0100)]
Allow extension availability to depend on several architecture bits
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.
Thomas Preud'homme [Tue, 10 May 2016 14:01:53 +0000 (15:01 +0100)]
Add support for ARMv8-M security extensions instructions
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.
Andrew Burgess [Fri, 29 Apr 2016 12:22:51 +0000 (13:22 +0100)]
binutils/doc: Update documentation for nm --size-sort
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.
Christophe Lyon [Tue, 10 May 2016 07:33:08 +0000 (09:33 +0200)]
2016-05-10 Christophe Lyon <christophe.lyon@linaro.org>
* ld/testsuite/ld-elf/flags1.d (xfail): Remove *-*-nacl*".
Pip Cet [Tue, 10 May 2016 01:31:47 +0000 (11:01 +0930)]
PR 20059 _bfd_elf_copy_link_hash_symbol_type segfault
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.
GDB Administrator [Tue, 10 May 2016 00:00:17 +0000 (00:00 +0000)]
Automatic date update in version.in
Han Shen [Fri, 6 May 2016 22:07:13 +0000 (15:07 -0700)]
Fix for PR gold/19987.
Nick Clifton [Mon, 9 May 2016 16:31:07 +0000 (17:31 +0100)]
Fix seg fault objdumping a corrupt binary with an invalid sh_link field.
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.
Christophe Monat [Mon, 9 May 2016 13:10:37 +0000 (15:10 +0200)]
[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.
Nick Clifton [Mon, 9 May 2016 11:07:32 +0000 (12:07 +0100)]
Revert accidental commit.
PR 19938
* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
commit.
Pitchumani Sivanupandi [Mon, 9 May 2016 11:04:16 +0000 (12:04 +0100)]
Update section merge test.
* 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-*-*.
Jose E. Marchesi [Mon, 9 May 2016 11:09:53 +0000 (04:09 -0700)]
opcodes,gas: sparc: fix mnemonic of faligndatai
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.
Alan Modra [Mon, 9 May 2016 07:54:30 +0000 (17:24 +0930)]
Regenerate configure
Alan Modra [Mon, 9 May 2016 07:40:03 +0000 (17:10 +0930)]
Fix ealphavms.c and eelf64_ia64_vms.c deps
* Makefile.am (ealphavms.c, eelf64_ia64_vms): Correct .em deps.
* Makefile.in: Regenerate.
Alan Modra [Mon, 9 May 2016 07:38:35 +0000 (17:08 +0930)]
Redundant hash table check
* elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
Alan Modra [Mon, 9 May 2016 07:37:33 +0000 (17:07 +0930)]
Correct script input section pattern
We don't want this to match .rela.text or similar.
* testsuite/ld-scripts/pr14962-2.t: Match .text, not *.text.
* testsuite/ld-scripts/rgn-at5.t: Similarly, .sec not *.sec.
* testsuite/ld-scripts/section-match-1.t: Likewise.
GDB Administrator [Mon, 9 May 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Trevor Saunders [Mon, 18 Apr 2016 17:16:27 +0000 (13:16 -0400)]
remove trivialy unused variables
gdb/ChangeLog:
2016-05-07 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Remove unused
variables.
* aarch64-tdep.c (aarch64_skip_prologue): Likewise.
(aarch64_scan_prologue): Likewise.
(aarch64_prologue_prev_register): Likewise.
(aarch64_dwarf2_prev_register): Likewise.
(pass_in_v): Likewise.
(aarch64_push_dummy_call): Likewise.
(aarch64_breakpoint_from_pc): Likewise.
(aarch64_return_in_memory): Likewise.
(aarch64_return_value): Likewise.
(aarch64_displaced_step_b_cond): Likewise.
(aarch64_displaced_step_cb): Likewise.
(aarch64_displaced_step_tb): Likewise.
(aarch64_gdbarch_init): Likewise.
(aarch64_process_record): Likewise.
* alpha-mdebug-tdep.c (alpha_mdebug_init_abi): Likewise.
* alpha-tdep.c (_initialize_alpha_tdep): Likewise.
* amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
* amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): Likewise.
* amd64-tdep.c (fixup_riprel): Likewise.
* amd64-windows-tdep.c (amd64_windows_frame_decode_epilogue): Likewise.
(amd64_windows_frame_decode_insns): Likewise.
(amd64_windows_frame_cache): Likewise.
(amd64_windows_frame_prev_register): Likewise.
(amd64_windows_frame_this_id): Likewise.
(amd64_windows_init_abi): Likewise.
* arm-linux-tdep.c (arm_linux_get_syscall_number): Likewise.
(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
* arm-symbian-tdep.c (arm_symbian_init_abi): Likewise.
* arm-tdep.c (arm_make_epilogue_frame_cache): Likewise.
(arm_epilogue_frame_prev_register): Likewise.
(arm_record_vdata_transfer_insn): Likewise.
(arm_record_exreg_ld_st_insn): Likewise.
* auto-load.c (execute_script_contents): Likewise.
(print_scripts): Likewise.
* avr-tdep.c (avr_frame_prev_register): Likewise.
(avr_push_dummy_call): Likewise.
* bfin-linux-tdep.c (bfin_linux_sigframe_init): Likewise.
* bfin-tdep.c (bfin_gdbarch_init): Likewise.
* blockframe.c (find_pc_partial_function_gnu_ifunc): Likewise.
* break-catch-throw.c (fetch_probe_arguments): Likewise.
* breakpoint.c (breakpoint_xfer_memory): Likewise.
(breakpoint_init_inferior): Likewise.
(breakpoint_inserted_here_p): Likewise.
(software_breakpoint_inserted_here_p): Likewise.
(hardware_breakpoint_inserted_here_p): Likewise.
(bpstat_what): Likewise.
(break_range_command): Likewise.
(save_breakpoints): Likewise.
* coffread.c (coff_symfile_read): Likewise.
* cris-tdep.c (cris_push_dummy_call): Likewise.
(cris_scan_prologue): Likewise.
(cris_register_size): Likewise.
(_initialize_cris_tdep): Likewise.
* d-exp.y: Likewise.
* dbxread.c (dbx_read_symtab): Likewise.
(process_one_symbol): Likewise.
(coffstab_build_psymtabs): Likewise.
(elfstab_build_psymtabs): Likewise.
* dicos-tdep.c (dicos_init_abi): Likewise.
* disasm.c (do_mixed_source_and_assembly): Likewise.
(gdb_disassembly): Likewise.
* dtrace-probe.c (dtrace_process_dof): Likewise.
* dwarf2read.c (error_check_comp_unit_head): Likewise.
(build_type_psymtabs_1): Likewise.
(skip_one_die): Likewise.
(process_imported_unit_die): Likewise.
(dwarf2_physname): Likewise.
(read_file_scope): Likewise.
(setup_type_unit_groups): Likewise.
(create_dwo_cu_reader): Likewise.
(create_dwo_cu): Likewise.
(create_dwo_unit_in_dwp_v1): Likewise.
(create_dwo_unit_in_dwp_v2): Likewise.
(lookup_dwo_unit_in_dwp): Likewise.
(free_dwo_file): Likewise.
(check_producer): Likewise.
(dwarf2_add_typedef): Likewise.
(dwarf2_add_member_fn): Likewise.
(read_unsigned_leb128): Likewise.
(read_signed_leb128): Likewise.
(dwarf2_const_value): Likewise.
(follow_die_sig_1): Likewise.
(dwarf_decode_macro_bytes): Likewise.
* extension.c (restore_active_ext_lang): Likewise.
* frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
* ft32-tdep.c (ft32_analyze_prologue): Likewise.
* gdbtypes.c (lookup_typename): Likewise.
(resolve_dynamic_range): Likewise.
(check_typedef): Likewise.
* h8300-tdep.c (h8300_is_argument_spill): Likewise.
(h8300_gdbarch_init): Likewise.
* hppa-tdep.c (hppa32_push_dummy_call): Likewise.
(hppa_frame_this_id): Likewise.
(_initialize_hppa_tdep): Likewise.
* hppanbsd-tdep.c (hppanbsd_sigtramp_cache_init): Likewise.
* hppaobsd-tdep.c (hppaobsd_supply_fpregset): Likewise.
* i386-dicos-tdep.c (i386_dicos_init_abi): Likewise.
* i386-tdep.c (i386_bnd_type): Likewise.
(i386_gdbarch_init): Likewise.
(i386_mpx_bd_base): Likewise.
* i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Likewise.
* i386obsd-tdep.c (i386obsd_elf_init_abi): Likewise.
* ia64-tdep.c (examine_prologue): Likewise.
(ia64_frame_cache): Likewise.
(ia64_push_dummy_call): Likewise.
* infcmd.c (finish_command_fsm_async_reply_reason): Likewise.
(default_print_one_register_info): Likewise.
* infrun.c (infrun_thread_ptid_changed): Likewise.
(thread_still_needs_step_over): Likewise.
(stop_all_threads): Likewise.
(restart_threads): Likewise.
(keep_going_stepped_thread): Likewise.
* iq2000-tdep.c (iq2000_scan_prologue): Likewise.
* language.c (language_init_primitive_type_symbols): Likewise.
* linespec.c (add_sal_to_sals): Likewise.
* linux-nat.c (status_callback): Likewise.
(kill_unfollowed_fork_children): Likewise.
(linux_nat_kill): Likewise.
* linux-tdep.c (linux_fill_prpsinfo): Likewise.
* linux-thread-db.c (thread_db_notice_clone): Likewise.
(record_thread): Likewise.
* location.c (string_to_event_location_basic): Likewise.
* m32c-tdep.c (m32c_prev_register): Likewise.
* m32r-linux-tdep.c (m32r_linux_init_abi): Likewise.
* m32r-tdep.c (decode_prologue): Likewise.
* m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
* machoread.c (macho_symtab_read): Likewise.
(macho_symfile_read): Likewise.
(macho_symfile_offsets): Likewise.
* maint.c (set_per_command_cmd): Likewise.
* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
(mi_cmd_stack_list_variables): Likewise.
* mi/mi-main.c (mi_cmd_exec_run): Likewise.
(output_register): Likewise.
(mi_cmd_execute): Likewise.
(mi_cmd_trace_define_variable): Likewise.
(print_variable_or_computed): Likewise.
* minsyms.c (prim_record_minimal_symbol_full): Likewise.
* mn10300-tdep.c (mn10300_frame_prev_register): Likewise.
* msp430-tdep.c (msp430_pseudo_register_write): Likewise.
* mt-tdep.c (mt_registers_info): Likewise.
* nios2-tdep.c (nios2_analyze_prologue): Likewise.
(nios2_push_dummy_call): Likewise.
(nios2_frame_unwind_cache): Likewise.
(nios2_stub_frame_cache): Likewise.
(nios2_stub_frame_sniffer): Likewise.
(nios2_gdbarch_init): Likewise.
* ppc-ravenscar-thread.c: Likewise.
* ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
* python/py-evts.c (add_new_registry): Likewise.
* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
(bpfinishpy_detect_out_scope_cb): Likewise.
* python/py-framefilter.c (py_print_value): Likewise.
* python/py-inferior.c (infpy_write_memory): Likewise.
* python/py-infevents.c (create_inferior_call_event_object): Likewise.
* python/py-infthread.c (thpy_get_ptid): Likewise.
* python/py-linetable.c (ltpy_get_pcs_for_line): Likewise.
(ltpy_get_all_source_lines): Likewise.
(ltpy_is_valid): Likewise.
(ltpy_iternext): Likewise.
* python/py-symtab.c (symtab_and_line_to_sal_object): Likewise.
* python/py-unwind.c (pyuw_object_attribute_to_pointer): Likewise.
(unwind_infopy_str): Likewise.
* python/py-varobj.c (py_varobj_get_iterator): Likewise.
* ravenscar-thread.c (ravenscar_inferior_created): Likewise.
* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Likewise.
* s390-linux-tdep.c (s390_supply_tdb_regset): Likewise.
(s390_frame_prev_register): Likewise.
(s390_dwarf2_frame_init_reg): Likewise.
(s390_record_vr): Likewise.
(s390_process_record): Likewise.
* score-tdep.c (score_push_dummy_call): Likewise.
(score3_analyze_prologue): Likewise.
* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
* sh64-tdep.c (sh64_analyze_prologue): Likewise.
(sh64_push_dummy_call): Likewise.
(sh64_extract_return_value): Likewise.
(sh64_do_fp_register): Likewise.
* solib-aix.c (solib_aix_get_section_offsets): Likewise.
* solib-darwin.c (darwin_read_exec_load_addr_from_dyld): Likewise.
(darwin_solib_read_all_image_info_addr): Likewise.
* solib-dsbt.c (enable_break): Likewise.
* solib-frv.c (enable_break2): Likewise.
(frv_fdpic_find_canonical_descriptor): Likewise.
* solib-svr4.c (svr4_handle_solib_event): Likewise.
* sparc-tdep.c (sparc_skip_stack_check): Likewise.
* sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): Likewise.
* sparcobsd-tdep.c (sparc32obsd_init_abi): Likewise.
* spu-tdep.c (info_spu_dma_cmdlist): Likewise.
* stack.c (read_frame_local): Likewise.
* symfile.c (symbol_file_add_separate): Likewise.
(remove_symbol_file_command): Likewise.
* symmisc.c (maintenance_print_one_line_table): Likewise.
* symtab.c (symbol_cache_flush): Likewise.
(basic_lookup_transparent_type): Likewise.
(sort_search_symbols_remove_dups): Likewise.
* target.c (target_memory_map): Likewise.
(target_detach): Likewise.
(target_resume): Likewise.
(acquire_fileio_fd): Likewise.
(target_store_registers): Likewise.
* thread.c (print_thread_info_1): Likewise.
* tic6x-tdep.c (tic6x_analyze_prologue): Likewise.
* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Likewise.
* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
(tilegx_analyze_prologue): Likewise.
(tilegx_stack_frame_destroyed_p): Likewise.
(tilegx_frame_cache): Likewise.
* tracefile.c (trace_save): Likewise.
* tracepoint.c (encode_actions_and_make_cleanup): Likewise.
(start_tracing): Likewise.
(print_one_static_tracepoint_marker): Likewise.
* tui/tui.c (tui_enable): Likewise.
* valops.c (value_struct_elt_bitpos): Likewise.
(find_overload_match): Likewise.
(find_oload_champ): Likewise.
* value.c (value_contents_copy_raw): Likewise.
* windows-tdep.c (windows_get_tlb_type): Likewise.
* x86-linux-nat.c (x86_linux_enable_btrace): Likewise.
* xcoffread.c (record_minimal_symbol): Likewise.
(scan_xcoff_symtab): Likewise.
* xtensa-tdep.c (execute_code): Likewise.
(xtensa_gdbarch_init): Likewise.
(_initialize_xtensa_tdep): Likewise.
GDB Administrator [Sun, 8 May 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 7 May 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Fri, 6 May 2016 16:46:34 +0000 (09:46 -0700)]
Strip global symbol defined in discarded section
When a global symbol is defined in COMDAT group, we shouldn't leave an
undefined symbol in symbol table when the symbol section is discarded
unless there is a reference to the symbol outside of COMDAT group.
bfd/
PR ld/17550
* elf-bfd.h (elf_link_hash_entry): Update comments for indx,
documenting that indx == -3 if symbol is defined in a discarded
section.
* elflink.c (elf_link_add_object_symbols): Set indx to -3 if
symbol is defined in a discarded section.
(elf_link_output_extsym): Strip a global symbol defined in a
discarded section.
ld/
PR ld/17550
* testsuite/ld-elf/pr17550-1.s: New file.
* testsuite/ld-elf/pr17550-2.s: Likewise.
* testsuite/ld-elf/pr17550-3.s: Likewise.
* testsuite/ld-elf/pr17550-4.s: Likewise.
* testsuite/ld-elf/pr17550a.d: Likewise.
* testsuite/ld-elf/pr17550b.d: Likewise.
* testsuite/ld-elf/pr17550c.d: Likewise.
* testsuite/ld-elf/pr17550d.d: Likewise.
H.J. Lu [Fri, 6 May 2016 15:28:27 +0000 (08:28 -0700)]
Define elf_backend_add_symbol_hook for Intel MCU
elf_backend_add_symbol_hook is undefined for FreeBSD. Define it for
Intel MCU to support STB_GNU_UNIQUE for Intel MCU and NaCl.
* elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
MCU.
Senthil Kumar Selvaraj [Fri, 6 May 2016 15:24:01 +0000 (16:24 +0100)]
* ld/testsuite/ld-srec/srec.exp: Mark test as XFAIL for AVR.
Kyrylo Tkachov [Fri, 6 May 2016 12:36:07 +0000 (13:36 +0100)]
[ARM][gas] Fix warnings about uninitialised uses and unused const variables
* config/tc-arm.c (fpu_arch_vfp_v1): Mark with ATTRIBUTE_UNUSED.
(fpu_arch_vfp_v3): Likewise.
(fpu_arch_neon_v1): Likewise.
(arm_arch_full): Likewise.
(parse_neon_el_struct_list): Initialize fields of firsttype.
H.J. Lu [Fri, 6 May 2016 12:28:18 +0000 (05:28 -0700)]
Test load conversion with symbol versioning for x86
* testsuite/ld-i386/i386.exp: Run load7.
* testsuite/ld-i386/load7.d: New file.
* testsuite/ld-i386/load7.map: Likewise.
* testsuite/ld-i386/load7.s: Likewise.
* testsuite/ld-x86-64/load2.d: Likewise.
* testsuite/ld-x86-64/load2.map: Likewise.
* testsuite/ld-x86-64/load2.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run load2.
Nick Clifton [Fri, 6 May 2016 09:35:33 +0000 (10:35 +0100)]
Add support for FMLA (by element) to AArch64 sim.
* simulator.c (do_FMLA_by_element): New function.
(do_vec_op2): Call it.
GDB Administrator [Fri, 6 May 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
H.J. Lu [Thu, 5 May 2016 15:43:58 +0000 (08:43 -0700)]
More setting CHECK_RELOCS_AFTER_OPEN_INPUT to yes
* emulparams/elf_iamcu.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): New.
* emulparams/elf_k1om.sh (CHECK_RELOCS_AFTER_OPEN_INPUT):
Likewise.
* emulparams/elf_l1om.sh (CHECK_RELOCS_AFTER_OPEN_INPUT):
Likewise.
H.J. Lu [Sun, 1 May 2016 21:19:03 +0000 (14:19 -0700)]
Pass --no-relax to ld in ld-x86-64/pr18591.d
Pass --no-relax to ld so that GOTPCREL relocation will be kept.
* testsuite/ld-x86-64/pr18591.d: Pass --no-relax to ld.
Simon Marchi [Thu, 5 May 2016 13:46:06 +0000 (09:46 -0400)]
Fix ChangeLog entry format
H.J. Lu [Thu, 5 May 2016 11:13:47 +0000 (04:13 -0700)]
Extract convert_load_reloc from x86 convert_load
* elf32-i386.c (elf_i386_convert_load): Extract the GOT load
conversion to ...
(elf_i386_convert_load_reloc): This. New function.
* elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
conversion to ...
(elf_x86_64_convert_load_reloc): This. New function.
H.J. Lu [Thu, 5 May 2016 11:11:57 +0000 (04:11 -0700)]
Cache the section contents in x86 check_relocs
Cache the section contents in x86 check_relocs for sections without
TLS relocations.
* elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
Don't check if contents == NULL.
(elf_i386_tls_transition): Add from_relocate_section. Check
from_relocate_section instead of contents != NULL. Update
elf_i386_check_tls_transition call.
(elf_i386_check_relocs): Cache the section contents if
keep_memory is FALSE. Pass FALSE as from_relocate_section to
elf_i386_tls_transition.
(elf_i386_relocate_section): Pass TRUE as from_relocate_section
to elf_i386_tls_transition.
(elf_backend_caches_rawsize): New.
* elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
if contents == NULL.
(elf_x86_64_tls_transition): Add from_relocate_section. Check
from_relocate_section instead of contents != NULL.
(elf_x86_64_check_relocs): Cache the section contents if
keep_memory is FALSE. Pass FALSE as from_relocate_section to
elf_x86_64_tls_transition.
(elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
to elf_x86_64_tls_transition.
(elf_backend_caches_rawsize): New.
Yao Qi [Thu, 5 May 2016 08:00:56 +0000 (09:00 +0100)]
Initialize res in get_next_pcs_read_memory_unsigned_integer
This patch initialize res to zero, otherwise, it may have some garbage
bits after the *the_target->read_memory call.
gdb/gdbserver:
2016-05-05 Yao Qi <yao.qi@linaro.org>
* linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
Initialize res to zero.
Yao Qi [Thu, 5 May 2016 08:00:56 +0000 (09:00 +0100)]
Change type of cpsr in arm_sigreturn_next_pc
Variable cpsr holds the value of cpsr register, which is 32-bit. It
is better to explicitly use uint32_t.
gdb/gdbserver:
2016-05-05 Yao Qi <yao.qi@linaro.org>
* linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
to uint32_t.
H.J. Lu [Thu, 5 May 2016 02:41:34 +0000 (19:41 -0700)]
Pass %E to einfo when bfd_section == NULL
Report BFD error When bfd_section == NULL in init_os.
* ldlang.c (init_os): Pass %E to einfo when bfd_section == NULL.
GDB Administrator [Thu, 5 May 2016 00:00:24 +0000 (00:00 +0000)]
Automatic date update in version.in
Ulrich Weigand [Wed, 4 May 2016 23:42:09 +0000 (19:42 -0400)]
[spu] Fix C++ build problems
ChangeLog:
* spu-linux-nat.c (spu_bfd_iovec_pread): Add pointer cast for C++.
(spu_bfd_open): Likewise.
gdbserver/ChangeLog:
* spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
(fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
Maciej W. Rozycki [Wed, 4 May 2016 00:46:10 +0000 (01:46 +0100)]
LD/testsuite: Add STB_GNU_UNIQUE cross-linker test
Some targets are only really, or at least regularly, regression-tested
in a crossed configuration. Currently we only have native compiled test
cases for the STB_GNU_UNIQUE feature in the linker test suite. This is
nice, covering run-time semantics even, but quite often not run at all.
Consequently a regression may remain unnoticed for long.
Add a simple test case then to provide basic linker coverage with no
need for a compiler or a native toolchain.
ld/
* testsuite/ld-unique/unique.d: New test.
* testsuite/ld-unique/unique.exp: Run the new test. Adjust
messages for compiled tests.
Claudiu Zissulescu [Tue, 3 May 2016 11:44:13 +0000 (13:44 +0200)]
[ARC] Add SYNTAX_NOP and SYNTAX_1OP for extension instructions
gas/
2016-05-03 Claudiu Zissulescu <claziss@synopsys.com>
* config/tc-arc.c (syntaxclass): Add SYNTAX_NOP and SYNTAX_1OP.
(arc_extinsn): Handle new introduced syntax.
* testsuite/gas/arc/textinsn1op.d: New file.
* testsuite/gas/arc/textinsn1op.s: Likewise.
* doc/c-arc.texi: Document SYNTAX_NOP and SYNTAX_1OP.
opcodes/
2016-05-03 Claudiu Zissulescu <claziss@synopsys.com>
* arc-ext.c (dump_ARC_extmap): Handle SYNATX_NOP and SYNTAX_1OP.
(arcExtMap_genOpcode): Likewise.
* arc-opc.c (arg_32bit_rc): Define new variable.
(arg_32bit_u6): Likewise.
(arg_32bit_limm): Likewise.
include/
2016-05-03 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (ARC_SYNTAX_1OP): Declare
(ARC_SYNTAX_NOP): Likewsie.
(ARC_OP1_MUST_BE_IMM): Update defined value.
(ARC_OP1_IMM_IMPLIED): Likewise.
(arg_32bit_rc, arg_32bit_u6, arg_32bit_limm): Declare.
Yao Qi [Wed, 4 May 2016 14:04:01 +0000 (15:04 +0100)]
Throw NOT_AVAILABLE_ERROR in read_stack and read_code
Nowadays, read_memory may throw NOT_AVAILABLE_ERROR (it is done by
patch http://sourceware.org/ml/gdb-patches/2013-08/msg00625.html)
however, read_stack and read_code still throws MEMORY_ERROR only. This
causes PR 19947, that is prologue unwinder is unable unwind because
code memory isn't available, but MEMORY_ERROR is thrown, while unwinder
catches NOT_AVAILABLE_ERROR.
#0 memory_error (err=err@entry=TARGET_XFER_E_IO, memaddr=memaddr@entry=
140737349781158) at /home/yao/SourceCode/gnu/gdb/git/gdb/corefile.c:217
#1 0x000000000065f5ba in read_code (memaddr=memaddr@entry=
140737349781158, myaddr=myaddr@entry=0x7fffffffd7b0 "\340\023<\001", len=len@entry=1)
at /home/yao/SourceCode/gnu/gdb/git/gdb/corefile.c:288
#2 0x000000000065f7b5 in read_code_unsigned_integer (memaddr=memaddr@entry=
140737349781158, len=len@entry=1, byte_order=byte_order@entry=BFD_ENDIAN_LITTLE)
at /home/yao/SourceCode/gnu/gdb/git/gdb/corefile.c:363
#3 0x00000000004717e0 in amd64_analyze_prologue (gdbarch=gdbarch@entry=0x13c13e0, pc=
140737349781158, current_pc=
140737349781165, cache=cache@entry=0xda0cb0)
at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2267
#4 0x0000000000471f6d in amd64_frame_cache_1 (cache=0xda0cb0, this_frame=0xda0bf0) at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2437
#5 amd64_frame_cache (this_frame=0xda0bf0, this_cache=<optimised out>) at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2508
#6 0x000000000047214d in amd64_frame_this_id (this_frame=<optimised out>, this_cache=<optimised out>, this_id=0xda0c50)
at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2541
#7 0x00000000006b94c4 in compute_frame_id (fi=0xda0bf0) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:481
#8 get_prev_frame_if_no_cycle (this_frame=this_frame@entry=0xda0b20) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1809
#9 0x00000000006bb6c9 in get_prev_frame_always_1 (this_frame=0xda0b20) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1983
#10 get_prev_frame_always (this_frame=this_frame@entry=0xda0b20) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1999
#11 0x00000000006bbe11 in get_prev_frame (this_frame=this_frame@entry=0xda0b20) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:2241
#12 0x00000000006bc13c in unwind_to_current_frame (ui_out=<optimised out>, args=args@entry=0xda0b20) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1485
The fix is to let read_stack and read_code throw NOT_AVAILABLE_ERROR too,
in order to align with read_memory.
gdb:
2016-05-04 Yao Qi <yao.qi@linaro.org>
PR gdb/19947
* corefile.c (read_memory): Rename it to ...
(read_memory_object): ... it. Add parameter object.
(read_memory): Call read_memory_object.
(read_stack): Likewise.
(read_code): Likewise.
Simon Marchi [Wed, 4 May 2016 13:27:34 +0000 (09:27 -0400)]
Fix solib-display.exp remote check
This test currently uses [is_remote target] to check if the test is
supported. This is not quite correct, as the limitation is actually
that it requires support for "running", ruling out stub-like targets.
Therefore, it should check for use_gdb_stub.
This has no visible effect right now, but it will once we make the
native-gdbserver board non-dejagnu-remote.
gdb/testsuite/ChangeLog:
* gdb.base/solib-display.exp: Check for [use_gdb_stub] instead
of [is_remote target],
Simon Marchi [Wed, 4 May 2016 13:27:19 +0000 (09:27 -0400)]
Introduce procedure use_gdb_stub
This patch introduces the use_gdb_stub procedure, which allows getting
the right value of the use_gdb_stub variable/property in any all
situations.
When calling it before the $use_gdb_stub global variable has been set,
it will return the value of the use_gdb_stub property from the board
file. This happens when tests want to bail out early (even before gdb
has been started) when the current test setup is a stub.
Otherwise, it returns the value of the $use_gdb_stub global.
It's possible for these two to differ when a test file overrides the
value of the global.
gdb/testsuite/ChangeLog:
* lib/gdb.exp (use_gdb_stub): New procedure.
Senthil Kumar Selvaraj [Wed, 4 May 2016 12:03:52 +0000 (13:03 +0100)]
Fix some AVR test failures.
binutils* testsuite/lib/binutils-common.exp (is_elf_format): Add avr-*-*.
ld * testsuite/ld-elf/pr18735.d: Allow other symbols.
* testsuite/ld-elf/sec64k.exp: Skip 64ksec for avr.
* testsuite/ld-gc/pr14265.d: Allow other symbols.
* testsuite/ld-plugin/plugin.exp: Add PR ld/17973 to
plugin_tests only if check_shared_lib_support is true.
* testsuite/ld-selective/selective.exp: Add --section-start
flag for avr.
GDB Administrator [Wed, 4 May 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in
Doug Evans [Tue, 3 May 2016 23:30:58 +0000 (16:30 -0700)]
PR symtab/19914 fix handling of dwp + split debug
PR symtab/19914
* dwarf2read.c (open_and_init_dwp_file): Look at backlink if objfile
is separate debug file.
testsuite/
* gdb.dwarf2/dwp-sepdebug.c: New file.
* gdb.dwarf2/dwp-sepdebug.exp: New file.
Don Breazeal [Tue, 3 May 2016 22:54:45 +0000 (15:54 -0700)]
Fix typos in gdb_pipe function comment
gdb/ChangeLog:
2016-05-03 Don Breazeal <donb@codesourcery.com>
* serial.h (gdb_pipe): Fix argument names in comment.
Maciej W. Rozycki [Tue, 3 May 2016 22:47:55 +0000 (23:47 +0100)]
PR 10549: MIPS/LD: Handle OSABI setting for STB_GNU_UNIQUE
Add missing OSABI handling for MIPS/LD, complementing:
commit
f64b2e8d60f277b705c96d4b4e585f5f7c847cc4
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Apr 11 08:13:22 2011 +0000
Adjust test coverage accordingly.
bfd/
PR 10549
* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
STB_GNU_UNIQUE.
ld/
PR 10549
* testsuite/ld-unique/unique.exp: Also run for `mips*-*-*'.
Nick Clifton [Tue, 3 May 2016 12:36:22 +0000 (13:36 +0100)]
Updated Swedish translation for the binutils.
Pedro Alves [Tue, 3 May 2016 11:16:56 +0000 (12:16 +0100)]
Fix gdb/python/python.c use-after-free
Valgrind shows:
==26964== Invalid read of size 1
==26964== at 0x6E14100: __GI_strcmp (strcmp.S:180)
==26964== by 0x6DB55AA: setlocale (setlocale.c:238)
==26964== by 0x4E0455: _initialize_python() (python.c:1731)
==26964== by 0x786731: initialize_all_files() (init.c:319)
==26964== by 0x72EF0A: gdb_init(char*) (top.c:1929)
==26964== by 0x60BCAC: captured_main(void*) (main.c:863)
==26964== by 0x606AD5: catch_errors(int (*)(void*), void*, char*, return_mask) (exceptions.c:234)
==26964== by 0x60C608: gdb_main(captured_main_args*) (main.c:1165)
==26964== by 0x40CAEC: main (gdb.c:32)
==26964== Address 0x81d30a0 is 0 bytes inside a block of size 181 free'd
==26964== at 0x4C29CF0: free (vg_replace_malloc.c:530)
==26964== by 0x6DB5B65: setname (setlocale.c:201)
==26964== by 0x6DB5B65: setlocale (setlocale.c:388)
==26964== by 0x4E037F: _initialize_python() (python.c:1712)
==26964== by 0x786731: initialize_all_files() (init.c:319)
==26964== by 0x72EF0A: gdb_init(char*) (top.c:1929)
==26964== by 0x60BCAC: captured_main(void*) (main.c:863)
==26964== by 0x606AD5: catch_errors(int (*)(void*), void*, char*, return_mask) (exceptions.c:234)
==26964== by 0x60C608: gdb_main(captured_main_args*) (main.c:1165)
==26964== by 0x40CAEC: main (gdb.c:32)
The problem is doing this:
oldloc = setlocale (LC_ALL, NULL);
setlocale (LC_ALL, "");
...
setlocale (LC_ALL, oldloc);
I.e., the second setlocale call frees 'oldloc'.
From http://pubs.opengroup.org/onlinepubs/
9699919799/functions/setlocale.html :
"The returned string pointer might be invalidated or the string
content might be overwritten by a subsequent call to setlocale()."
gdb/ChangeLog:
2016-05-03 Pedro Alves <palves@redhat.com>
PR python/20037
* python/python.c (_initialize_python) [IS_PY3K]: xstrdup/xfree
oldloc.
Pedro Alves [Tue, 3 May 2016 11:16:55 +0000 (12:16 +0100)]
Remove gdb/python/python.c code that handles strlen failing with -1
This makes no sense -- strlen doesn't really ever fail with -1.
gdb/ChangeLog:
2016-05-03 Pedro Alves <palves@redhat.com>
* python/python.c (_initialize_python) [IS_PY3K]: Remove dead
code.
Jiong Wang [Tue, 3 May 2016 10:59:37 +0000 (11:59 +0100)]
[AArch64] Also puts value in place for R_AARCH64_RELATIVE
When handling absolute relocations for global symbols bind within the
shared object, AArch64 will generate one dynamic RELATIVE relocation,
but won't apply the value for this absolution relocations at static
linking stage. This is different from AArch64 gold linker and x86-64.
This is not a bug as AArch64 is RELA, there is only guarantee that
relocation addend is placed in the relocation entry. But some
system softwares originally writen for x86-64 might assume AArch64
bfd linker gets the same behavior as x86-64, then they could take
advantage of this buy skipping those RELATIVE dynamic relocations
if the load address is the same as the static linking address.
This patch makes AArch64 BFD linker applies absolution relocations at
static linking stage for scenario described above. Meanwhile old AArch64
android loader has a bug (PR19163) which relies on current linker behavior
as a workaround, so the same option --no-apply-dynamic-relocs added.
Szabolcs Nagy [Tue, 3 May 2016 10:48:56 +0000 (11:48 +0100)]
Fix generation of AArhc64 instruction table.
* aarch64-gen.c (VERIFIER): Define.
* aarch64-opc.c (VERIFIER): Define.
(verify_ldpsw): Use static linkage.
* aarch64-opc.h (verify_ldpsw): Remove.
* aarch64-tbl.h: Use VERIFIER for verifiers.
Pitchumani Sivanupandi [Tue, 3 May 2016 09:56:30 +0000 (10:56 +0100)]
Assume that the GAS testsuite for the AVR is being run without -mlink-relax specified.
* testsuite/gas/lns/lns.exp: Add avr to list of targets using
DW_LNS_fixed_advance_pc.
Senthil Kumar Selvaraj [Tue, 3 May 2016 09:44:35 +0000 (10:44 +0100)]
Skip ELF STT_COMMON linker tests if shared libraries are not supported.
* testsuite/ld-elfcomm/elfcomm.exp: Check for shared lib support
before running STT_COMMON tests.
Pedro Alves [Tue, 3 May 2016 09:30:51 +0000 (10:30 +0100)]
Fix PR gdb/16818, workaround Python's forcing of -export-dynamic
GDB's use of --dynamic-list to only export the proc-service symbols is
broken due to Python's "python-config --ldflags" saying we should link
with -export-dynamic, causing us to export _all_ extern symbols
anyway. On Fedora 23:
$ python-config --ldflags
-lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
$ python3.4-config --ldflags
-L/usr/lib64 -lpython3.4m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
Having GDB export all its symbols leads to issues such as PR gdb/16818
(GDB crashes when using name for target remote hostname:port), where a
GDB symbol unintentionally preempts a symbol in one of the NSS modules
glibc loads into the process. NSS modules should not define symbols
outside the implementation namespace or the relevant standards, but,
alas, that's a longstanding and hard to fix issue. See libc-alpha
discussion at:
[symbol name space issues with NSS modules]
https://sourceware.org/ml/libc-alpha/2016-04/msg00130.html
Python should instead be either using GCC's symbol visibility feature
or -Wl,--dynamic-list as well, to only export Python API symbols, but,
it doesn't. There are bugs open upstream for that:
[Use -Wl,--dynamic-list=x.list, not -Xlinker -export-dynamic]
http://bugs.python.org/issue10112
[Use GCC visibility attrs in PyAPI_*]
http://bugs.python.org/issue11410
But that's taking a long while to resolve.
I thought of working around this Python issue by making GDB build with
-fvisibility=hidden, as Jan suggests in Python issue 10112, as then
Python's "-Xlinker -export-dynamic" has no effect. However, that
would need to be done in the whole source tree (bfd, libiberty, etc.),
and I think that would break GCC plugins, as I believe those have
access to all of GCCs symbols, by "design". So we'd need a new
configure switch, or have the libraries in the tree detect which of
GCC or GDB is being built, but that doesn't work, because the answer
can be "both" with combined builds...
So this patch instead works around Python's bug, by simply sed'ing
away "-Xlinker -export-dynamic" from the result of python-config.py
--ldflags, making -Wl,--dynamic-list work again as it used to. It's
ugly, but so is the bug...
Note that if -Wl,--dynamic-list doesn't work, we always link with
-rdynamic, so static Python should still work.
Tested on F23 with --python=python (Python 2.7) and
--python=python3.4.
gdb/ChangeLog:y
2016-05-03 Pedro Alves <palves@redhat.com>
* configure.ac (PYTHON_LIBS): Sed away "-Xlinker -export-dynamic".
* configure: Regenerate.
Pedro Alves [Tue, 3 May 2016 09:30:51 +0000 (10:30 +0100)]
Fix "-Wl,--dynamic-list" gdb/configure test
The -Wl,--dynamic-list test is currently broken on Fedora 23, when you
configure with --with-python=python3.4. We see:
configure:13741: checking for the dynamic export flag
configure:13796: gcc -o conftest -g3 -O0 -fno-strict-aliasing -DNDEBUG -fwrapv -Wl,--dynamic-list=/home/pedro/gdb/mygit/src/gdb/proc-service.list conftest.c -ldl -lncurses -lm -ldl -lpthread -ldl -lutil -lm -lpython3.4m -Xlinker -export-dynamic >&5
conftest.c:182:30: fatal error: python3.4/Python.h: No such file or directory
compilation terminated.
configure:13796: $? = 1
The correct -I path is in PYTHON_CPPFLAGS:
PYTHON_CPPFLAGS='-I/usr/include/python3.4m -I/usr/include/python3.4m'
(Other Python-related tests in the file are already doing this.)
gdb/ChangeLog:
2016-05-03 Pedro Alves <palves@redhat.com>
* configure.ac (checking for the dynamic export flag): Add
$PYTHON_CPPFLAGS to CPPFLAGS.
* configure: Regenerate.
Kyrylo Tkachov [Tue, 3 May 2016 08:40:54 +0000 (09:40 +0100)]
[gdb] Fix -Wparentheses warnings
2016-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* symfile.c (find_pc_overlay): Add braces to avoid -Wparentheses
warning.
(find_pc_mapped_section): Likewise.
(list_overlays_command): Likewise.
GDB Administrator [Tue, 3 May 2016 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Mon, 2 May 2016 17:10:33 +0000 (13:10 -0400)]
Fix detach.exp remote check
This test seems to work with both native-gdbserver and
native-extended-gdbserver, so I removed the remote check.
When running with native-gdbserver (a stub-like target), detach makes
gdbserver stop and gdb disconnect. runto_main just spawns a brand new
gdbserver. So it tests the exact same thing twice. It doesn't hurt
though.
With native-extended-gdbserver, the test is probably a bit more useful
(and similar to native). It tests running/detaching twice using the
same gdb/gdbserver instances, since with extended-remote, you can
detach/attach/run all you want, unlike with remote.
gdb/testsuite/ChangeLog:
* gdb.base/detach.exp: Remove is_remote check.
Simon Marchi [Mon, 2 May 2016 17:04:42 +0000 (13:04 -0400)]
Fix annota-input-while-running.exp remote check
The comment says that we can't use runto_main here becore it doesn't
know how to handle annotation. Instead, the test puts a breakpoint at
main and calls run by hand. Therefore, it can't work with stub targets,
since they can't "run". The check should be then changed to check the
use_gdb_stub variable instead of [is_remote target].
But as an alternative, we can just use runto_main and enable annotations
after, since the "run to main" part is not really part of what we want
to test.
I also removed the "set test..." line that is unused.
gdb/testsuite/ChangeLog:
* gdb.base/annota-input-while-running.exp: Don't check for
[is_remote target]. Enable annotations after running to main.
Remove unused "set test..." line.
Eli Zaretskii [Mon, 2 May 2016 16:37:43 +0000 (19:37 +0300)]
Fix startup on MS-Windows when 'gdb.ini' is found in $HOME
* windows-nat.c (_initialize_check_for_gdb_ini): Fix off-by-one
error in allocation of space for "$HOME/.gdbinit" string. This
caused GDB to abort on startup whenever a '~/gdb.ini' file was
actually found, because xsnprintf would hit an assertion
violation.
GDB Administrator [Mon, 2 May 2016 00:00:18 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 1 May 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 30 Apr 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in