aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-27Add fbsd_nat_add_target.John Baldwin7-26/+30
Add a wrapper for add_target in fbsd-nat.c to override target operations common to all native FreeBSD targets. gdb/ChangeLog: * fbsd-nat.c (fbsd_pid_to_exec_file): Mark static. (fbsd_find_memory_regions): Mark static. (fbsd_nat_add_target): New function. * fbsd-nat.h: Export fbsd_nat_add_target and remove prototypes for fbsd_pid_to_exec_file and fbsd_find_memory_regions. * amd64fbsd-nat.c (_initialize_amd64fbsd_nat): Use fbsd_nat_add_target. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Likewise. * ppcfbsd-nat.c (_initialize_ppcfbsd_nat): Likewise. * sparc64fbsd-nat.c (_initialize_sparc64fbsd_nat): Likewise.
2015-04-27[gold] Rename '--fix-cortex-a53' to '--fix-cortex-a53-843419'.Han Shen3-6/+14
Keep gold consistent with bfd erratum-fixing option names, so as to ease life in Makefile/scripts. gold/ * options.h (--fix-cortex-a53-843419): Rename option. * aarch64.cc (AArch64_relobj::do_count_local_symbols): Use renamed option. (AArch64_relobj::scan_sections_for_stubs): Use renamed option.
2015-04-27If a range is missing, assume the input address is mapped.Rafael Ávila de Espíndola6-6/+77
When Output_section::is_input_address_mapped is called we have entries for all dropped ranges, but not for all ranges.
2015-04-27opcodes/Peter Bergner10-152/+158
* ppc-opc.c (DCBT_EO): New define. (powerpc_opcodes) <lbarx>: Enable for POWER8 and later. <lharx>: Likewise. <stbcx.>: Likewise. <sthcx.>: Likewise. <waitrsv>: Do not enable for POWER7 and later. <waitimpl>: Likewise. <dcbt>: Default to the two operand form of the instruction for all "old" cpus. For "new" cpus, use the operand ordering that matches whether the cpu is server or embedded. <dcbtst>: Likewise. gas/testsuite/ * gas/ppc/a2.s: Fixup test case due to dcbt/dcbtst embedded operand ordering change. * gas/ppc/a2.d: Likewise. * gas/ppc/476.d: Likewise. * gas/ppc/booke.s: Remove invalid 3 operand dcbt tests. * gas/ppc/booke.d: Likewise. * gas/ppc/power7.s: Remove lbarx, lharx, stbcx., sthcx., waitrsv and waitimpl tests. * gas/ppc/power7.d: Likewise.
2015-04-27Do not manipulate "target:" filenames as local pathsGary Benson3-3/+14
This commit alters two places that manipulate object file filenames to detect "target:" filenames and to not attempt to manipulate them as paths on the local filesystem: - allocate_objfile is updated to not attempt to expand "target:" filenames with gdb_abspath. - load_auto_scripts_for_objfile is updated to not attempt to load auto-load scripts for object files with "target:" filenames. gdb/ChangeLog: * objfiles.c (allocate_objfile): Do not attempt to expand name if name is a "target:" filename. * auto-load.c (load_auto_scripts_for_objfile): Do not attempt to load auto-load scripts for objfiles with "target:" filenames.
2015-04-27sim: avr: Fix 'multiple definition of sim_{read,write}'Senthil Kumar Selvaraj2-1/+6
This patch does whatever was done in https://sourceware.org/ml/gdb-patches/2015-04/msg00437.html to fix broken gdb build for the AVR target.
2015-04-27[AArch64] Don't try to align insn in non-executale sectionRenlin Li2-12/+16
2015-04-27 Renlin Li <renlin.li@arm.com> gas/ * config/tc-aarch64.c (s_aarch64_inst): Don't align code for non-text section. (md_assemble): Likewise, move the align code outside the loop.
2015-04-27S390: Vector ABI supportAndreas Arnez3-13/+132
With the S390 vector ABI, vector registers are used for passing vector arguments and for returning a vector. Support this ABI in inferior function calls and when setting or retrieving a function's return value. gdb/ChangeLog: * s390-linux-tdep.c: Include "elf/s390.h" and "elf-bfd.h". (enum s390_vector_abi_kind): New enum. (struct gdbarch_tdep)<vector_abi>: New field. (s390_effective_inner_type): Add parameter min_size. Stop unwrapping if the inner type is smaller than min_size. (s390_function_arg_float): Adjust call to s390_effective_inner_type. (s390_function_arg_vector): New function. (s390_function_arg_integer): Adjust comment. (struct s390_arg_state)<vr>: New field. (s390_handle_arg): Add parameter 'is_unnamed'. Pass vector arguments according to vector ABI when appropriate. (s390_push_dummy_call): Initialize the argument state's field 'vr'. Adjust calls to s390_handle_arg. (s390_register_return_value): Handle vector return values. (s390_return_value): Apply the "register" return value convention to a vector when appropriate. (s390_gdbarch_init): Initialize tdep->vector_abi. * NEWS: Announce S390 vector ABI support.
2015-04-27S390: Re-arrange implementation of s390_return_valueAndreas Arnez2-85/+81
Move related logic in the implementation of s390_return_value closer together. This makes it easier to read and extend. gdb/ChangeLog: * s390-linux-tdep.c (s390_return_value_convention): Remove function. Inline its logic... (s390_return_value): ...here. Instead, move the handling of the "register" return value convention... (s390_register_return_value): ...here. New function.
2015-04-27S390: Restructure s390_push_dummy_callAndreas Arnez2-290/+220
Simplify the structure of s390_push_dummy_call and its various helper functions. This reduces the code and makes it easier to extend. The new code should be functionally equivalent to the old one, except that copies created by the caller are now always aligned on an 8-byte boundary. gdb/ChangeLog: * s390-linux-tdep.c (is_float_singleton): Remove function. Move the "singleton" part of the logic... (s390_effective_inner_type): ...here. New function. (is_float_like): Remove function. Inline its logic... (s390_function_arg_float): ...here. (is_pointer_like, is_integer_like, is_struct_like): Remove functions. Inline their logic... (s390_function_arg_integer): ...here. (s390_function_arg_pass_by_reference): Remove function. (extend_simple_arg): Remove function. (alignment_of): Remove function. (struct s390_arg_state): New structure. (s390_handle_arg): New function. (s390_push_dummy_call): Move parameter placement logic to the new function s390_handle_arg. Call it for calculating the stack area sizes first, and again for actually writing the parameters.
2015-04-27S390: For zero, let is_power_of_two() return falseAndreas Arnez2-1/+7
This fixes a minor issue with the helper function is_power_of_two(), which returned non-zero ("true") if the argument was zero. This led to a wrong decision when passing a zero-sized struct in an inferior function call. gdb/ChangeLog: * s390-linux-tdep.c (is_power_of_two): Add comment. Return false if the argument is zero.
2015-04-27[Ada] Cache all static structures and reset cache during resolutionPierre-Marie de Rodat3-18/+47
Currently, ada-lang.c:template_to_static_fixed_type (working on structure types only) caches its result into the unused TYPE_TARGET_TYPE field. This introduces inconsistencies when the input type is specialized, for instance during type resolution: the cached static fixed type is copied along with the original type, but it's no longer adapted to the copy once the copy is modified: template_to_static_fixed_type has to compute another static fixed type for it. This change first introduces a cache reset during type resolution for structure types so that this inconsistency does not happen anymore. It also makes template_to_static_fixed_type smarter with respect to types that do not need static fixed copies so that less computations is done in general. This inconsistency was spotted thanks to code reading, not because of any sort of failure and we did not manage to exhibit a failure yet, so no testcase for this. gdb/ChangeLog: * ada-lang.c (template_to_static_fixed_type): Return input type when it is already fixed. Cache the input type itself when not creating a static fixed copy. Make it explicit that we never molestate the input type. * gdbtypes.c (resolve_dynamic_struct): Reset the TYPE_TARGET_TYPE field for resolved copies.
2015-04-27[Ada] Preserve typedef layer when getting struct elementJoel Brobecker7-4/+134
Consider the following declarations: type Int_Access is access Integer; type Record_Type is record IA : Int_Access; end record; R : Record_Type; Printing the type name of "R.IA" yields: (gdb) whatis r.ia type = access integer It should be: (gdb) whatis r.ia type = bar.int_access Looking at the debugging info, field "r.ia" is defined as a typedef which has the name of the field type: .uleb128 0x3 # (DIE (0x4e) DW_TAG_typedef) .long .LASF4 # DW_AT_name: "bar__int_access" .long 0x8b # DW_AT_type ... with the typedef's target type being an anonymous pointer type: .uleb128 0x7 # (DIE (0x8b) DW_TAG_pointer_type) .byte 0x8 # DW_AT_byte_size .long 0x91 # DW_AT_type What happens here is that a couple of function in ada-lang.c always start by stripping all typedef layers when handling struct fields, with the effect of making us lose the type name in this case. We did not understand this at the time the code was written, but typedefs should be stripped only when we know we do not need them. So this patch, adjust the code to avoid the stripping while handling the fields, and adds it back in the lone place which handles the result of processing and didn't know how to handle typedefs struct fields yet. gdb/ChangeLog: * ada-lang.c (ada_is_tagged_type): Add call to ada_check_typedef. (ada_lookup_struct_elt_type): Remove calls to ada_check_typedef. (template_to_static_fixed_type): Call ada_check_typedef only when necessary. gdb/testsuite/ChangeLog: * gdb.ada/rec_comp: New testcase.
2015-04-27S/390: z13 use GNU attribute to indicate vector ABIAndreas Krebbel10-3/+180
bfd/ * elf-s390-common.c (elf_s390_merge_obj_attributes): New function. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call elf_s390_merge_obj_attributes. * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function. binutils/ * readelf.c (display_s390_gnu_attribute): New function. (process_s390_specific): New function. (process_arch_specific): Call process_s390_specific. gas/ * doc/as.texinfo: Document Tag_GNU_S390_ABI_Vector. include/elf/ * s390.h: Define Tag_GNU_S390_ABI_Vector.
2015-04-27S/390: Fixes for z13 instructions.Andreas Krebbel6-11/+25
opcodes/ * s390-opc.c: New instruction type VV0UU2. * s390-opc.txt: Fix instruction types for VFCE, VLDE, VFSQ, WFK, and WFC. gas/testsuite/ * gas/s390/zarch-z13.d: Fix tests for VFCE, VLDE, VFSQ, WFK, and WFC. * gas/s390/zarch-z13.s: Likewise.
2015-04-27S/390: Fix gotreloc_31-1 testcase.Andreas Krebbel2-3/+6
Since we changed the default arch for objdump to zarch the following testcase needs to check for the real instruction mnemonics instead of just bytes. This fixes the following testsuite fail on s390x: FAIL: GOT: symbol address load from got to larl
2015-04-27Automatic date update in version.inGDB Administrator1-1/+1
2015-04-26Clear variable "coredump_var_addr" before using it on ↵Sergio Durigan Junior2-0/+6
gdb.base/coredump-filter.exp This commit is a continuation of the fix committed on: commit 8cd8f2f8ac49276437b7da37f275706ea1c1c925 Author: Sergio Durigan Junior <sergiodj@redhat.com> Date: Mon Apr 13 02:40:08 2015 -0400 Rename variable "addr" to "coredump_var_addr" in gdb.base/coredump-filter.exp Pedro pointed out that this fix was not complete, because the testsuite could be run several times in a row (for example), which means that it is not enough to just make the variable name unique: it also needs to be cleared out if it is global. This commit does that. It is actually just a commit made to make things totally correct; this specific test does not fail if you run it several times in a row. gdb/testsuite/ChangeLog: 2015-04-26 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.base/coredump-filter.exp: Clear variable "coredump_var_addr" before using it.
2015-04-26Automatic date update in version.inGDB Administrator1-1/+1
2015-04-25Automatic date update in version.inGDB Administrator1-1/+1
2015-04-25Non-alloc sections don't belong in PT_LOAD segmentsAlan Modra6-8/+32
Taking them out showed a bug in the powerpc64 backend with .branch_lt being removed from output_bfd but not from previously set up segment section maps. Removing the bfd sections meant their sh_flags (and practically everything else) remaining zero, ie. not SHF_ALLOC, triggering complaints about "`.branch_lt' can't be allocated in segment". include/elf/ * internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and similar segments only contain alloc sections. ld/ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out. ld/testsuite/ * ld-powerpc/tocnovar.d: Revert last change.
2015-04-24[AArch64] PR18270, fix handling of GOT entry for local symbolJiong Wang2-9/+66
2015-04-24 Jiong. Wang <jiong.wang@arm.com> bfd/ PR ld/18270 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for GOT_NORMAL for both sgot/srelgot section. (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address and generate necessary runtime relocation for GOT entry.
2015-04-24Copy is_linker_input to archive memberH.J. Lu2-0/+8
We must copy is_linker_input to archive member. PR binutils/18209 * archive.c (_bfd_get_elt_at_filepos): Also copy is_linker_input.
2015-04-24gdb: Add internationalization support to a few strings.Andrew Burgess2-5/+14
Spotted a few strings that were missing internationalization support. gdb/ChangeLog: * cli/cli-dump.c (srec_dump_command): Add internationalization mark ups. (ihex_dump_command): Likewise. (tekhex_dump_command): Likewise. (binary_dump_command): Likewise. (binary_append_command): Likewise.
2015-04-24gdb: Add support for dumping to verilog hex format.Andrew Burgess7-7/+85
Extend the gdb 'dump' command to allow creating output in verilog hex format. Add some tests to cover new functionality. As bfd does not currently support reading in verilog hex formats the tests only cover the 'dump' command, not the 'restore' command. gdb/ChangeLog: * cli/cli-dump.c (verilog_cmdlist): New variable. (dump_verilog_memory): New function. (dump_verilog_value): New function. (verilog_dump_command): New function. (_initialize_cli_dump): Add new commands to support verilog dump format. * NEWS: Add entry for "dump verilog". gdb/doc/ChangeLog: * gdb.texinfo (Dump/Restore Files): Add detail about verilog dump format. gdb/testsuite/ChangeLog: * gdb.base/dump.exp: Add *.verilog files to all_files list. Add new tests for verilog output.
2015-04-24[AArch64] Improve PC-relative relocation check for shared libraryJiong Wang6-7/+68
2015-04-24 Jiong. Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject PC-relative relocation for external symbol. ld/testsuite/ * ld-aarch64/pcrel.s: New testcase. * ld-aarch64/pcrel_pic_defiend_local.d: New expect file. * ld-aarch64/pcrel_pic_undefined.d: Ditto. * ld-aarch64/aarch64-elf.exp: Run them.
2015-04-24Fix typoDJ Delorie1-1/+1
2015-04-24Change msp430 emulation to msp430elfDJ Delorie6-9/+19
* Makefile.am (msp430): Rename primary emulation to msp430elf. (emsp430.c): Rename to emsp430elf.c, update dependencies (emsp430X.c): Update dependencies. * Makefile.in: Likewise. * configure.tgt (msp430-*-*): Rename primary emulation to msp430elf. * emulparame/msp430.sh: Rename to msp430elf.sh. * emulparams/msp430X.sh: Update.
2015-04-24gas thunderx supportJim Wilson2-2/+9
gas/ * config/tc-aarch64.c (aarch64_cpus): Add CRC and CRYPTO features for thunderx.
2015-04-24* python.texi (Xmethods In Python): Fix name of method to call the xmethod.Doug Evans2-1/+6
gdb/doc/ChangeLog: * python.texi (Xmethods In Python): Fix name of method to call the xmethod.
2015-04-24Fix compile time warning messages about variables being used before they are ↵Nick Clifton5-7/+26
initialised. PR 18313 bin * ieee.c (ieee_read_cxx_class): Initialise the varargs variable. * readelf.c (uncompress_section_contents): Zero initialise the zstream structure. bfd * compress.c (decompress_contents): Zero initialse the z_stream structure.
2015-04-24[ARM]: Don't tail-pad over-aligned functions to the alignment boundary.Richard Earnshaw28-129/+116
2015-04/24 Richard Earnshaw <rearnsha@arm.com> gas/ * config/tc-arm.h (arm_min): New function. (SUB_SEGMENT_ALIGN): Define. gas/testsuite/ * gas/arm/align64.d: Delete trailing padding NOPs. ld/testsuite/ * ld-arm/armthumb-lib.d: Regenerate expected output. * ld-arm/armthumb-lib.d: Likewise. * ld-arm/armthumb-lib.sym: Likewise. * ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-b-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-b.d: Likewise. * ld-arm/cortex-a8-fix-bcc-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-bcc.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-plt.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-bl.d: Likewise. * ld-arm/cortex-a8-fix-blx-bcond.d: Likewise. * ld-arm/cortex-a8-fix-blx-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-blx-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-blx.d: Likewise. * ld-arm/cortex-a8-fix-hdr.d: Likewise. * ld-arm/farcall-mixed-app-v5.d: Likewise. * ld-arm/farcall-mixed-app.d: Likewise. * ld-arm/farcall-mixed-lib-v4t.d: Likewise. * ld-arm/farcall-mixed-lib.d: Likewise. * ld-arm/mixed-app-v5.d: Likewise. * ld-arm/mixed-app.d: Likewise. * ld-arm/mixed-lib.d: Likewise.
2015-04-24Fix typos in sim sources exposed by static analysis.Nick Clifton6-4/+23
bfin PR 18273 * bfin-sim.c (decode_dsp32alu_0): Remove spurious check for s == 1. erc32 PR 18273 * exec.c (add32): Fix typo in check for overflow. igen PR 18273 * misc.c (a2i): Fix typos checking for uppercase letters.
2015-04-24Fix typo in check for valid register number in RX sim.Nick Clifton2-1/+6
PR sim/18273 * reg.c (put_reg): Fix check for valid register number.
2015-04-24Extend test for local labels to include fake symbols and local labels with a ↵Nick Clifton2-5/+48
numeric suffix. * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler local labels to include local labels with a numeric suffix and fake symbols.
2015-04-24Fix printing for GNAT stuff for types that do not have descr. typesPierre-Marie de Rodat2-1/+12
gdb/ChangeLog: 2015-04-24 Pierre-Marie de Rodat <derodat@adacore.com> * gdbtypes.c (print_gnat_stuff): Do not recurse on the descriptive type when there is none.
2015-04-24Define SEC_MEP_VLIW in bfd/section.cH.J. Lu5-4/+17
Bits in section flags should only be defined in bfd/section.c. This patch moves SEC_MEP_VLIW to bfd/section.c. bfd/ PR binutils/18316 * section.c (SEC_MEP_VLIW): New. * bfd-in2.h: Regenerated. include/elf/ PR binutils/18316 * mep.h (SEC_MEP_VLIW): Removed.
2015-04-24A new board file remote-gdbserver-on-localhost.expYao Qi2-0/+83
This patch is to add a new board file that does real remote gdbserver testing on localhost. This board file can be used to reproduce PR 18208. gdb/testsuite 2015-04-24 Yao Qi <yao.qi@linaro.org> * boards/remote-gdbserver-on-localhost.exp: New file.
2015-04-24Skip the compressed1d test for targets which do not use the elf32.em linker ↵Nick Clifton2-0/+7
emulation file. * ld-elf/compressed1d.d: Add notarget for ELF based targets that do not use elf.em.
2015-04-24Correct ld-elf/compressed1e.d to use notarget and for cris-elf, not cris-*.Hans-Peter Nilsson2-1/+6
Don't XPASS cris-linux which *does* support -shared. And xfail is for bugs, notarget is for not-applicable.
2015-04-23Xfail cris and frv for ld-elf/compressed1e.dH.J. Lu2-0/+7
cris and frv don't support -shared. * ld-elf/compressed1e.d: Only run for Linux/gnu. Xfail cris and frv.
2015-04-24Automatic date update in version.inGDB Administrator1-1/+1
2015-04-23Delay setting up compressed debug section namesH.J. Lu6-63/+175
When we set up st_name for output section name in elf_fake_sections, we don't know if the compressed DWARF debug section will be smaller. We may end up with compressed DWARF debug sections which are bigger than the uncompressed ones. This patch delays setting up st_name for output DWARF debug section to _bfd_elf_assign_file_positions_for_non_load which will compress the output debug section. We also postpone placement of shstrtab section after DWARF debug sections have been compressed. The net effect is .shstrtab section is now placed after .symtab and .strtab sections. bfd/ PR ld/18277 * compress.c (bfd_compress_section_contents): Remove the write_compress argument. (bfd_init_section_compress_status): Updated. (bfd_compress_section): Likewise. * elf.c (_bfd_elf_set_reloc_sh_name): New. (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name to (unsigned int) -1 if delay_st_name_p is TRUE. Use _bfd_elf_set_reloc_sh_name. (elf_fake_sections): Don't rename DWARF debug section for linker output if it will be compressed. Instead, set delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr. (assign_section_numbers): Call _bfd_elf_strtab_addref only if sh_name != (unsigned int) -1. Don't finalize nor assign shstrtab section here. Delay setting output section names to _bfd_elf_write_object_contents. (_bfd_elf_compute_section_file_positions): Update comments on sh_offset for shstrtab section. (assign_file_positions_for_non_load_sections): Set sh_offset to -1 for shstrtab section. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name when compressing DWARF debug sections. Place shstrtab section after DWARF debug sections have been compressed. (_bfd_elf_write_object_contents): Setting sh_name for output sections. ld/testsuite/ PR ld/18277 * ld-elf/compressed1d.d: New. * ld-elf/compressed1e.d: Likewise.
2015-04-23Improve warning messages for la/dlaMatthew Fortune8-2/+27
gas/ * config/tc-mips.c (macro): State the recommended way of creating 32-bit or 64-bit addresses. gas/testsuite/ * gas/mips/dla-warn.l: New file. * gas/mips/dla-warn.s: New file. * gas/mips/la-warn.l: New file. * gas/mips/la-warn.s: New file. * gas/mips/mips.exp: Run new tests.
2015-04-23Add option --weak-unresolved-symbols to treat unresolved symbols as weak ref.Sriraman Tallam6-5/+69
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as weak references. This is helpful when we want the link to succeed with unresolved symbols and the dynamic loader to not complain at run-time. Option --warn-unresolved-symbols lets the link succeed but could fail at run-time with unresolved symbol warnings especially when the unresolved symbols have GOT entries and dynamic relocations against them, like when -fPIE is used.
2015-04-23Add option --weak-unresolved-symbols to treat unresolved as weak references.Sriraman Tallam1-0/+45
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as weak references. This is helpful when we want the link to succeed with unresolved symbols and the dynamic loader to not complain at run-time. Option --warn-unresolved-symbols lets the link succeed but could fail at run-time with unresolved symbol warnings especially when the unresolved symbols have GOT entries and dynamic relocations against them, like when -fPIE is used. 2015-04-23 Sriraman Tallam <tmsriram@google.com> * options.h (--weak-unresolved-symbols): New option. * symtab.cc (Symbol_table::sized_write_globals): Change symbol binding to weak with new option. * symtab.h (is_weak_undefined): Check for new option. (is_strong_undefined): Check for new option. * testsuite/Makefile.am (weak_unresolved_symbols_test): New test. * testsuite/Makefile.in: Regenerate. * testsuite/weak_unresolved_symbols_test.cc: New file.
2015-04-23Fix r6-branch-constraints test when run with n64 as default ABIMatthew Fortune2-1/+6
gas/testsuite/ * gas/mips/mips.exp: Require o32 for r6-branch-constraints.
2015-04-23Don't change compressed input debug section namesH.J. Lu15-65/+317
Change compressed input debug section name for objdump is very confusing. But we need to change it for linker so that linker will consider the input section as a debug section. This patch delays section rename to elf_fake_sections for objcopy and avoids it for objdump. bfd/ PR binutils/18209 * bfd.c (bfd): Add is_linker_input. * elf.c (convert_debug_to_zdebug): New. (convert_zdebug_to_debug): Likewise. (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME. (_bfd_elf_init_reloc_shdr): Pass a pointer to section name instead of a pointer to section. (elf_fake_sections): Rename the section name if SEC_ELF_RENAME is set. * section.c (SEC_ELF_RENAME): New. * bfd-in2.h: Regenerated. binutils/ PR binutils/18209 * objcopy.c (setup_section): Copy compress status. binutils/testsuite/ PR binutils/18209 * binutils-all/compress.exp: Replace dw2-3.W with dw2-3gabi.W on zlib-gabi output. * binutils-all/dw2-1.W: Convert section names to .zdebug_*. * binutils-all/dw2-3.W: Likewise. * binutils-all/objdump.W: Likewise. * binutils-all/dw2-3gabi.W: New file. ld/ PR binutils/18209 * ldfile.c (ldfile_try_open_bfd): Set is_linker_input to 1.
2015-04-23Fix gdb.base/interrupt.exp racy fail against gdbserverPedro Alves2-2/+17
Currently, against gdbserver, interrupt.exp occasionaly fails like this: ERROR: Process no longer exists UNRESOLVED: gdb.base/interrupt.exp: send end of file The problem is that we see gdbserver exiting before we match gdb's output: expect: does "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" (spawn_id exp8) match regular expression "end of file"? Gate "end of file"? gate=no expect: read eof expect: set expect_out(spawn_id) "exp8" expect: set expect_out(buffer) "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" Fix this by removing $inferior_spawn_id from the set of spawn ids expect is watching as soon as we see the "end of file" string out of the inferior spawn id, using an indirect spawn id list. Tested on x86-64 Fedora 20, native and gdbserver (both target remote and extended-remote). gdb/testsuite/ChangeLog: 2015-04-23 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Use an indirect spawn id list holding $inferior_spawn_id instead of $inferior_spawn_id directly. On "end of file", remove $inferior_spawn_id from the indirect list.
2015-04-23gdb.base/interrupt.exp: Rename saw_eof to saw_end_of_filePedro Alves2-7/+11
To avoid confusion between "end of file" string matching and eof matching, as in process exit. gdb/testsuite/ChangeLog: 2015-04-23 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Rename saw_eof to saw_end_of_file.