aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-09Implement Intel OSPKE instructionsH.J. Lu13-5305/+5426
This patch implements Intel OSPKE instructions documented in Intel64 and IA-32 Architectures Software Developer’s Manual Volume 2, September 2015. gas/testsuite/ * gas/i386/i386.exp: Run ospke and x86-64-ospke. * gas/i386/ospke.d: New file. * gas/i386/ospke.s: Likewise. * gas/i386/x86-64-ospke.d: Likewise. opcodes/ * i386-dis.c (MOD_0F01_REG_5): New. (RM_0F01_REG_5): Likewise. (reg_table): Use MOD_0F01_REG_5. (mod_table): Add MOD_0F01_REG_5. (rm_table): Add RM_0F01_REG_5. * i386-gen.c (cpu_flag_init): Add CPU_OSPKE_FLAGS. (cpu_flags): Add CpuOSPKE. * i386-opc.h (CpuOSPKE): New. (i386_cpu_flags): Add cpuospke. * i386-opc.tbl: Add rdpkru and wrpkru instructions. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
2015-12-09gas/ELF: slightly relax elf/file*.d expectationsJan Beulich3-0/+8
Despite the re-ordering done for the file symbols, some targets manage to put section symbols ahead of it.
2015-12-09varobj zero-padded hexadecimal formatLuis Machado9-7/+65
This set of patches add support for the zero-padded hexadecimal format for varobj's, defined as "zero-hexadecimal". We currently only support regular non-zero-padded hexadecimal. Talking with IDE developers, they would like to have this option that is already available to GDB's print/x commands, in the CLI, as 'z'. gdb/ChangeLog: 2015-12-09 Luis Machado <lgustavo@codesourcery.com> * gdb/mi/mi-cmd-var.c (mi_parse_format): Handle new "zero-hexadecimal" format. * gdb/varobj.c (varobj_format_string): Add "zero-hexadecimal" entry. (format_code): Add 'z' entry. (varobj_set_display_format): Handle FORMAT_ZHEXADECIMAL. * gdb/varobj.h (varobj_display_formats) <FORMAT_ZHEXADECIMAL>: New enum field. * NEWS: Add new note to MI changes citing the new zero-hexadecimal format for -var-set-format. gdb/doc/ChangeLog: 2015-12-09 Luis Machado <lgustavo@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Update text to mention -var-set-format's new zero-hexadecimal format. gdb/testsuite/ChangeLog: 2015-12-09 Luis Machado <lgustavo@codesourcery.com> * gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal format and change test names to make them unique.
2015-12-09sparc: support %dN and %qN syntax for FP registers.Jose E. Marchesi2-5/+16
The SPARC Refence Manual documents the %dN and %qN syntax to refer to double and quad-precision floating-point registers, respectively. See OSA2015 Appendix C, Assembly Language Syntax, C1.1 Register Names. This patch adds support for these names to GAS. This eases the porting of software from Solaris to GNU/Linux, as these register names have been supported by the Solaris linker for a long time and many assembler require that support. gas/ChangeLog: 2015-12-09 Jose E. Marchesi <jose.marchesi@oracle.com> * config/tc-sparc.c (sparc_ip): Support %dN and %qN notation for double and quad-precision floating-point registers.
2015-12-09Fix wrong output of x87 registers due to truncation to double on amd64Ruslan Kabatsayev5-5/+37
When `info float` is used on an AMD64 system, GDB prints floating-point values of x87 registers with raw contents like 0x361a867a8e0527397ce0 or 0xc4f988454a1ddd3cfdab wrongly. This happens due to truncation to double, after which the former becomes 0.0, and the latter becomes negative infinity. This is caused by failed detection of x86-64 host, which results in setting gdb_host_{float,double,long_double}_format to zeros. This commit fixes this misdetection, and adds a test to make sure future commits don't introduce a regression here. gdb/ChangeLog: 2015-12-09 Ruslan Kabatsayev <b7.10110111@gmail.com> PR gdb/18702 * configure.host: Fix detection of x86_64 host when setting floatformats. gdb/testsuite/ChangeLog: 2015-12-09 Ruslan Kabatsayev <b7.10110111@gmail.com> Pedro Alves <pedro@redhat.com> PR gdb/18702 Add checking of floatformats setup on x86_64 hosts. * gdb.arch/i386-float.S (main): Load bigval and smallval. (smallval, bigval): New labels/constants. * gdb.arch/i386-float.exp: Use with_test_prefix and test "info float" after loading bigval and smallval.
2015-12-09Fix compile time warning building RX target.Nick Clifton2-1/+5
2015-12-09[GOLD] PowerPC style fixAlan Modra2-22/+33
* powerpc.cc (Target_powerpc::Relocate::relocate): New constant d_offset. Use throughout. (Target_powerpc::relocate_relocs): Likewise.
2015-12-09[GOLD] Edit PowerPC64 ELFv2 function entry codeAlan Modra2-2/+72
In an fixed position executable, the entry code does not need to be PIC and can thus lose a dependency on r12. * powerpc.cc (Target_powerpc::Relocate::relocate): Edit ELFv2 entry code. (Target_powerpc::relocate_relocs): Edit relocs to suit.
2015-12-09[GOLD] Relocate::relocate() paramsAlan Modra16-229/+146
Some linker code editing needs to change multiple insns. In some cases multiple relocations are involved and it is not sufficient to make the changes independently as relocations are processed, because doing so might lead to a partial edit. So in order to safely edit we need all the relocations available in relocate(). Also, to emit edited relocs corresponding to the edited code sequence we need some way to pass information from relocate() to relocate_relocs(), particularly if the edit depends on insns. We can't modify input relocs in relocate() as they are mmapped PROT_READ, nor it is particularly clean to write relocs to the output at that stage. So add a Relocatable_relocs* field to relinfo to mark edited relocs. Given that relocate is passed the raw reloc pointer, it makes sense to remove the rel/rela parameter and r_type too. However, that means the mips relocate() needs to know whether SHT_REL or SHT_RELA relocs are being processed. So add a rel_type for mips, which also has the benefit of removing relocate() overloading there. This patch adds the infrastructure without making use of it. Note that relinfo->rr will be NULL if not outputting relocations. * object.h (struct Relocate_info): Add "rr". * reloc.h (Relocatable_relocs::set_strategy): New accessor. * reloc.cc (Sized_relobj_file::do_relocate_sections): Init relinfo.rr for relocate_section and relocate_relocs. * powerpc.cc (relocate): Add rel_type and preloc parameters. Delete rela and r_type params, instead recalculate these from preloc. (relocate_relocs): Delete Relocatable_relocs* param, instead use relinfo->rr. * aarch64.cc: Likewise. * arm.cc: Likewise. * i386.cc: Likewise. * mips.cc: Likewise. * s390.cc: Likewise. * sparc.cc: Likewise. * target.h: Likewise. * tilegx.cc: Likewise. * x86_64.cc: Likewise. * testsuite/testfile.cc: Likewise. * target-reloc.h (relocate_section): Adjust to suit. (apply_relocation, relocate_relocs): Likewise.
2015-12-09Automatic date update in version.inGDB Administrator1-1/+1
2015-12-08Fix static analysis warning about undefined bheaviour.Nick Clifton2-1/+7
PR binutils/19310 * dwarf.c (display_debug_frames): Recode range test to avoid undefined behaviour.
2015-12-08gas: consistently emit diagnostics for non-zero data emission to .bss/.structJan Beulich8-16/+256
2015-12-08gas: don't get confused by .asci{i,z} after .structJan Beulich2-8/+14
While not allowed, this certainly shouldn't result in confusing the programmer (by skipping lines in unexpected ways): Without returning, demand_empty_rest_of_line() (at the end of the function) will demand the _next_ line to be empty, and without the conditional we would ignore the next line.
2015-12-08ELF: don't re-order SHF_FILE symbolsJan Beulich8-21/+58
.file directives may be used to identify the scope of local symbols, the purpose of which gets subverted when re-ordering them. Only allow the first of them to be moved to the first position.
2015-12-08DOCO: Enhance the menu to select function overloads with signaturesPierre-Marie de Rodat4-7/+68
gdb/ChangeLog: * NEWS: Announce this enhancement and the corresponding new option. gdb/doc/ChangeLog: * gdb.texinfo (Ada Mode Into): Move overloading support description to its own node. (Overloading support for Ada): New node.
2015-12-08rl78: relaxation fixesDJ Delorie7-29/+161
Various fixes to linker relaxation. In general, we need to support relaxing every branch, even if we don't relax it in the assembler, so we can optionally defer relaxation to the linker. * elf32-rl78.c (rl78_offset_for_reloc): Add more relocs. (rl78_elf_relax_section): Add bc/bz/bnc/bnz/bh/bnh. Fix reloc choices. * config/rl78-parse.y: Make all branches relaxable via rl78_linkrelax_branch(). * config/tc-rl78.c (rl78_linkrelax_branch): Mark all relaxable branches with relocs. (options): Add OPTION_NORELAX. (md_longopts): Add -mnorelax. (md_parse_option): Support OPTION_NORELAX. (op_type_T): Add bh, sk, call, and br. (rl78_opcode_type): Likewise. (rl78_relax_frag): Fix not-relaxing logic. Add sk. (md_convert_frag): Fix relocation handling. (tc_gen_reloc): Strip relax relocs when not linker relaxing. (md_apply_fix): Defer overflow handling for anything that needs a PLT, to the linker. * config/tc-rl78.h (TC_FORCE_RELOCATION): Force all relocations to the linker when linker relaxing. * doc/c-rl78.texi (norelax): Add.
2015-12-08rx: Fix p_vaddr reconstruction logic.DJ Delorie2-0/+6
* elf32-rx.c (rx_elf_object_p): Ignore empty and nobits sections.
2015-12-08rl78: Enable MULU for all ISAs.DJ Delorie3-162/+165
Unlike other mul/div opcodes, MULU is available on all variants of the RL78. * rl78-decode.opc: Enable MULU for all ISAs. * rl78-decode.c: Regenerate.
2015-12-08Automatic date update in version.inGDB Administrator1-1/+1
2015-12-07ld: relax alignment requirements of compressed .debug_* section checksJan Beulich3-2/+7
This fixes a failure of the gabinormal linking test on some distros (where e.g. crt1.o has a .debug_aranges section with larger alignment).
2015-12-07Support Z0 packet in AArch64 multi-arch debuggingYao Qi8-181/+243
In commit 6085d6f6, Z0 packet is disabled in aarch64 GDBserver if the inferior is 32-bit or there may be multiple inferiors, because Z0 packet isn't supported for arm then. Recently, Z0 packet is supported in arm target, so we don't have such limitation in aarch64 GDBserver, that is to say, aarch64 GDBserver can use Z0 packet in multi-arch/multi-inferior debugging when the inferior's arch is arm. Part of this patch is to revert 6085d6f6, and the rest of the patch is to move some breakpoint related arm_* functions into linux-aarch32-low.c in order to share them between arm and aarch64. This patch is regression tested on aarch64-linux for debugging both aarch64 programs and arm programs respectively. gdb/gdbserver: 2015-12-07 Yao Qi <yao.qi@linaro.org> * configure.srv: Append arm.o to srv_tgtobj for aarch64*-*-linux* target. * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved from linux-arm-low.c. (arm_eabi_breakpoint, arm_breakpoint): Likewise. (arm_breakpoint_len, thumb_breakpoint): Likewise. (thumb_breakpoint_len, thumb2_breakpoint): Likewise. (thumb2_breakpoint_len): Likewise. (arm_is_thumb_mode, arm_breakpoint_at): Likewise. (arm_breakpoint_kinds): Likewise. (arm_breakpoint_kind_from_pc): Likewise. (arm_sw_breakpoint_from_kind): Likewise. (arm_breakpoint_kind_from_current_state): Likewise. * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare. (arm_sw_breakpoint_from_kind): Declare. (arm_breakpoint_kind_from_current_state): Declare. (arm_breakpoint_at): Declare. * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call arm_sw_breakpoint_from_kind if process is 32-bit. (aarch64_breakpoint_kind_from_pc): New function. (aarch64_breakpoint_kind_from_current_state): New function. (the_low_target): Initialize fields breakpoint_kind_from_pc and breakpoint_kind_from_current_state. * linux-arm-low.c (arm_breakpoint_kinds): Move to linux-aarch32-low.c. (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise. (arm_breakpoint, arm_breakpoint_len): Likewise. (thumb_breakpoint, thumb_breakpoint_len): Likewise. (thumb2_breakpoint, thumb2_breakpoint_len): Likewise. (arm_is_thumb_mode): Likewise. (arm_breakpoint_at): Likewise. (arm_breakpoint_kind_from_pc): Likewise. (arm_sw_breakpoint_from_kind): Likewise. (arm_breakpoint_kind_from_current_state): Likewise. Revert: 2015-08-04 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_supports_z_point_type): Return 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging. * server.c (extended_protocol): Remove "static". * server.h (extended_protocol): Declare it.
2015-12-07oops - accidentally omittde from previous delta.Nick Clifton1-0/+7
2015-12-07Fix relaxation in RX linker when --no-keep-memory is specified.Nick Clifton1-26/+16
* elf32-rx.c (elf32_rx_relax_delete_bytes): Add extra parameter - the start of the relocs for the section. Delete code to load in the relocs. (elf32_rx_relax_section): Do not free the loaded relocs.
2015-12-07Enhance the menu to select function overloads with signaturesPierre-Marie de Rodat5-23/+212
So far, trying to evaluate an expression involving a function call for which GDB could find multiple function candidates outputs a menu so that the user can select the one to run. For instance, with the two following functions: type New_Integer is new Integer; function F (I : Integer) return Boolean; function F (I : New_Integer) return Boolean; Then we get the following GDB session: (gdb) print f(1) Multiple matches for f [0] cancel [1] foo.f at foo.adb:23 [2] foo.f at foo.adb.28 > While the source location information is sufficient in order to determine which one to select, one has to look for them in source files, which is not convenient. This commit tunes this menu in order to also include the list of formal and return types (if any) in each entry. The above then becomes: (gdb) print f(1) Multiple matches for f [0] cancel [1] foo.f (integer) return boolean at foo.adb:23 [2] foo.f (foo.new_integer) return boolean at foo.adb.28 > Since this output is more verbose than previously, this change also introduces an option (set/show ada print-signatures) to get the original output. gdb/ChangeLog: * ada-lang.c (print_signatures): New. (ada_print_symbol_signature): New. (user_select_syms): Add signatures to the output of candidate symbols using ada_print_symbol_signature. (_initialize_ada_language): Add a "set/show ada print-signatures" boolean option. gdb/testsuite/ChangeLog: * gdb.ada/fun_overload_menu.exp: New testcase. * gdb.ada/fun_overload_menu/foo.adb: New testcase. Tested on x86_64-linux, no regression.
2015-12-07Add myself as a write-after-approval GDB maintainerAndreas Arnez2-0/+5
gdb/ChangeLog: * MAINTAINERS (Write After Approval): Add Andreas Arnez.
2015-12-07Add support for MSP430 F5 hardware multiply.Nick Clifton2-10/+59
* msp430-sim.c (sim_open): Check for needed memory at address 0x500 not 0x200. (get_op): Add support for F5 hardware multiply addresses. (put_op): Likewise.
2015-12-07PowerPC ifunc with local symbolsAlan Modra3-123/+131
This fixes some cases where the linker would incorrectly error on plt relocs to local ifunc symbols. I've also tidied plt and ifunc handling for ppc64, where check_relocs was allowing for the possibility of plt calls via addr14/addr24 relocs but relocate_section was not. * elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc plt call. Wrap long lines. (ppc_elf_relocate_section): Wrap long lines. * elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc plt calls. Move __tls_get_addr checks later. Don't create plt for addr14/addr24 relocs. (ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes. (ppc64_elf_relocate_section): Correct local ifunc handling for PLT64, PLT32 and PLT16 relocs.
2015-12-07PR19323 memory allocation greater than 4GAlan Modra2-1/+15
On 32-bit targets, memory requested for program/section headers on a fuzzed binary can wrap to 0. A bfd_alloc of zero bytes actually returns a one byte allocation rather than a NULL pointer. This then leads to buffer overflows. Making this check unconditional triggers an extremely annoying gcc-5 warning. PR19323 * elfcode.h (elf_object_p): Check for ridiculous e_shnum and e_phnum values.
2015-12-07[GOLD] R_PPC64_ENTRY supportAlan Modra4-0/+58
elfcpp/ * powerpc.h (R_PPC64_ENTRY): Define. gold/ * powerpc.cc (add_2_2_12, ld_2_12, lis_2): Define. (Target_powerpc::Scan::local, global): Handle R_PPC64_ENTRY. (Target_powerpc::Relocate::relocate): Edit code at R_PPC64_ENTRY.
2015-12-07R_PPC64_ENTRYAlan Modra7-4/+98
Add a new relocation that marks large-model entry code, for edit back to medium-model. include/elf/ * ppc64.h (R_PPC64_ENTRY): Define. bfd/ * reloc.c (BFD_RELOC_PPC64_ENTRY): New. * elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add entry for R_PPC64_ENTRY. (LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY. (ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY. Use new insn defines. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate.
2015-12-07tc-ppc.c md_apply_fix tidyAlan Modra2-12/+16
* config/tc-ppc.c (md_apply_fix): Localize variables. Reduce casts.
2015-12-07Reorder some power9 insnsAlan Modra2-11/+16
The idea being to put instructions that have the same encoding adjacent to each other. * opcodes/ppc-opc.c (powerpc_opcodes): Sort power9 insns by major opcode/xop.
2015-12-07bfd: Mark sh5*-*-* and sh64*-*-* targets as obsolete.Kaz Kojima2-0/+5
2015-12-07Automatic date update in version.inGDB Administrator1-1/+1
2015-12-06Replace remaining references to i386-nat with x86-nat instead.Joel Brobecker3-3/+10
i386-nat.[hc] got renamed to x86-nat.[hc] a while back, but somehow 3 references to the old file name remained past the renaming. This fixes all of them. gdb/ChangeLog (with Mike Stump <mikestump@comcast.net>): * Makefile.in (TAGS): Replace i386-nat.h by x86-nat.h. * x86-nat.c: Replace remaining references to i386-nat by reference to x86-nat instead.
2015-12-06Automatic date update in version.inGDB Administrator1-1/+1
2015-12-05Document the GDB 7.10.1 release in gdb/ChangeLogJoel Brobecker1-0/+4
gdb/ChangeLog: GDB 7.10.1 released.
2015-12-04gdbserver: set ptrace flags after creating inferiorsJosh Stone10-15/+106
Rename target_ops.arch_setup to .post_create_inferior. In the Linux hook, continue calling the low arch setup, then also set ptrace flags. This corrects the possibility of running without flags, demonstrated by a new test that would fail to catch a fork before. gdb/gdbserver/ChangeLog: 2015-12-04 Josh Stone <jistone@redhat.com> * target.h (struct target_ops) <arch_setup>: Rename to ... (struct target_ops) <post_create_inferior>: ... this. (target_arch_setup): Rename to ... (target_post_create_inferior): ... this, calling post_create_inferior. * server.c (start_inferior): Update target_arch_setup calls to target_post_create_inferior. * linux-low.c (linux_low_ptrace_options): Forward declare. (linux_arch_setup): Update its comment for general use. (linux_post_create_inferior): New, run arch_setup and setup ptrace. (struct linux_target_ops): Use linux_post_create_inferior. * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment to post_create_inferior. * nto-low.c (struct nto_target_ops): Likewise. * spu-low.c (struct spu_target_ops): Likewise. * win32-low.c (struct win32_target_ops): Likewise. gdb/testsuite/ChangeLog: 2015-12-04 Josh Stone <jistone@redhat.com> * gdb.base/catch-fork-static.exp: New.
2015-12-05Automatic date update in version.inGDB Administrator1-1/+1
2015-12-04Optimize R_386_GOT32/R_386_GOT32X only if addend is 0H.J. Lu15-13/+186
Linker can't optimize R_386_GOT32 and R_386_GOT32X relocations if addend isn't 0. It isn't valid to convert movl foo@GOT+1(%ecx), %eax to leal foo@GOTOFF+1(%ecx), %eax nor to convert movq foo@GOTPCREL+1(%rip), %rax to leaq foo(%rip), %rax for x86-64. We should check if addend is 0 before optimizing R_386_GOT32 and R_386_GOT32X relocations. Testcases are added for i386 and x86-64. bfd/ * elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0. (elf_i386_relocate_section): Skip R_386_GOT32X optimization if addend isn't 0. ld/testsuite/ * ld-i386/i386.exp: Run mov2a, mov2b and mov3. * ld-i386/mov2.s: New file. * ld-i386/mov2a.d: Likewise. * ld-i386/mov2b.d: Likewise. * ld-i386/mov3.d: Likewise. * ld-i386/mov3.s: Likewise. * ld-x86-64/mov2.s: Likewise. * ld-x86-64/mov2a.d: Likewise. * ld-x86-64/mov2b.d: Likewise. * ld-x86-64/mov2c.d: Likewise. * ld-x86-64/mov2d.d: Likewise. * ld-x86-64/x86-64.exp: Run mov2a, mov2b, mov2c and mov2d.
2015-12-04Fix GAS testsuite failures for COFF/PE based ARM targets.Nick Clifton5-3/+17
PR gas/19276 gas * config/tc-arm.h (SUB_SEGMENT_ALIGN): Do not define for COFF/PE targets. testsuite * gas/arm/align64.d: Skip for COFF/PE targets. * gas/arm/bundle-lock.d: Adjust for COFF/PE targets.
2015-12-04Remove useless loop in elf.cTristan Gingold2-5/+5
2015-12-04Fix failures in the GAS testsuite for the ARC architecture.Claudiu Zissulescu29-167/+622
gas * config/tc-arc.c (arc_option): Sets all internal gas options when parsing .cpu directive. (declare_register_set): Declare all 64 registers. (md_section_align): Refactor. (md_pcrel_from_section): Remove assert. (pseudo_operand_match): Fix pseudo operand match. (find_reloc): Use flags filed, extend matching. * config/tc-arc.h (TC_VALIDATE_FIX): Don't fixup any PLT relocation. testsuite * gas/arc/bic.d: Update test. * gas/arc/add_s-err.s: New file. * gas/arc/cpu-warn1.s: Likewise. * gas/arc/pcl-relocs.d: Likewise. * gas/arc/pcl-relocs.s: Likewise. * gas/arc/pcrel-relocs.d: Likewise. * gas/arc/pcrel-relocs.s: Likewise. * gas/arc/pic-relocs.d: Likewise. * gas/arc/pic-relocs.s: Likewise. * gas/arc/plt-relocs.d: Likewise. * gas/arc/plt-relocs.s: Likewise. * gas/arc/pseudos.d: Likewise. * gas/arc/pseudos.s: Likewise. * gas/arc/sda-relocs.d: Likewise. * gas/arc/sda-relocs.s: Likewise. * gas/arc/sda-relocs2.d: Likewise. * gas/arc/sda-relocs2.s: Likewise. * gas/arc/tls-relocs.d: Likewise. * gas/arc/tls-relocs.s: Likewise. opcode * arc.h (arc_reloc_equiv_tab): Replace flagcode with flags[32]. opcodes * arc-dis.c (special_flag_p): Match full mnemonic. * arc-opc.c (print_insn_arc): Check section size to read appropriate number of bytes. Fix printing. * arc-tbl.h: Fix instruction table. Allow clri/seti instruction without arguments.
2015-12-04Automatic date update in version.inGDB Administrator1-1/+1
2015-12-03Take addend into account when making GOT entries for local symbols.Vladimir Radosavljevic5-27/+244
gold/ * object.cc (Sized_relobj::do_for_all_local_got_entries): Use Local_got_entry_key for searching in local_got_offsets_. * object.h (class Local_got_entry_key): New class. (Relobj::local_has_got_offset): New overloaded method. (Relobj::local_got_offset): Likewise. (Relobj::set_local_got_offset): Likewise. (Relobj::do_local_has_got_offset): Add addend argument. (Relobj::do_local_got_offset): Likewise. (Relobj::do_set_local_got_offset): Likewise. (Sized_relobj::do_local_has_got_offset): Add addend argument, and use Local_got_entry_key for searching through local_got_offsets_. (Sized_relobj::do_local_got_offset): Likewise. (Sized_relobj::do_set_local_got_offset): Likewise. (Sized_relobj::Local_got_offsets): Change type of the key from unsigned int to Local_got_entry_key, and add hash and equal_to. * output.cc (Got_entry::write): Take addend into account for calculating value of the local symbol for GOT. (Output_data_got::add_local): New definition of overloaded method. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_pair_with_rel): Likewise. * output.h (Output_data_got::add_local): New declaration of overloaded method.
2015-12-03Remove duplicate arch/arm.h include in linux-arm-low.c.Antoine Tremblay2-2/+4
A duplicate include arm/arm.h was introduced, remove it. Pushed as obvious. gdb/gdbserver/ChangeLog: * linux-arm-low.c: Remove duplicate arch/arm.h include.
2015-12-03Run gdb.base/sizeof.exp with board having gdb,noinferiorioYao Qi3-39/+31
In my remote cross testing (x86_64 host and aarch64 target), the test gdb.base/sizeof.exp is skipped because gdb,noinferiorio is defined in my gdbserver board file. Tests are skipped because the test checks the expected value from the program's output, but I don't see why must do it this way. With my patch applied, we can save the result in variable in the program, and check the variable then. Then, the test doesn't rely on inferiorio. gdb/testsuite: 2015-12-03 Yao Qi <yao.qi@linaro.org> * gdb.base/sizeof.c: Don't include stdio.h and ../lib/unbuffer_output.c. (main): New variable 'size' and 'value'. Remove printf and gdb_unbuffer_output. Assign return value to size and value. * gdb.base/sizeof.exp: Remove the checking to gdb,noinferiorio at the beginning. (check_sizeof): Check the result by printing variable 'size'. (check_valueof): Check the result by printing variable 'value'.
2015-12-03Darwin: add new mach-o header flags.Tristan Gingold4-1/+16
binutils/ * od-macho.c (bfd_mach_o_header_flags_name): Add name for flags until BFD_MACH_O_MH_APP_EXTENSION_SAFE. include/mach-o/ * loader.h (bfd_mach_o_header_flags): Add BFD_MACH_O_MH_APP_EXTENSION_SAFE.
2015-12-03Automatic date update in version.inGDB Administrator1-1/+1
2015-12-02addr2line vs. inlined C functions called from C++Alan Modra3-14/+31
In this case the inlined function doesn't have DW_AT_linkage_name in .debug_info, but the language is C++ so find_nearest_line goes looking in the symbol table. Since the function is inlined the enclosing non-inline function symbol is returned from _bfd_elf_find_function, which is wrong. This patch only uses a symbol if its address matches. PR binutils/19315 * dwarf2.c (_bfd_elf_find_function): Return symbol matched. (_bfd_dwarf2_find_nearest_line): Check symbol returned above against dwarf range. * elf-bfd.h (_bfd_elf_find_function): Update prototype.