platform/upstream/linaro-binutils.git
9 years ago[AArch64] Enable CRC feature in GAS for cortex-a53 and cortex-a57.
Marcus Shawcroft [Fri, 14 Nov 2014 12:52:17 +0000 (12:52 +0000)]
[AArch64] Enable CRC feature in GAS for cortex-a53 and cortex-a57.

Conflicts:
gas/config/tc-aarch64.c

10 years agoFix x86 non-ELF build breakage
Alan Modra [Wed, 12 Nov 2014 04:24:23 +0000 (14:54 +1030)]
Fix x86 non-ELF build breakage

PR ld/17482
* config/tc-i386.c (output_insn): Don't test x86_elf_abi when
not ELF.

10 years agodaily update
Alan Modra [Tue, 11 Nov 2014 23:00:29 +0000 (09:30 +1030)]
daily update

10 years agoUpdate French and Ukranian translations with new one supplied by the Translation...
Nick Clifton [Tue, 11 Nov 2014 16:59:06 +0000 (16:59 +0000)]
Update French and Ukranian translations with new one supplied by the Translation Project.

* po/fr.po: Updated French translation.

* po/uk.po: Updated Ukranian translation.

10 years agold -r abort in _bfd_elf_write_section_eh_frame
Alan Modra [Tue, 11 Nov 2014 09:43:03 +0000 (20:13 +1030)]
ld -r abort in _bfd_elf_write_section_eh_frame

Turning on .eh_frame processing for ld -r resulted in systemtap
tickling a ld bug.  Triggered by the zero terminator not being added
to .eh_frame in a separate file as it usually is (crtend.o), but
instead being present in the last .eh_frame section along with CIEs
and FDEs.  The 4-byte terminator makes the section size check fail
on 64-bit targets.

* elf-eh-frame (_bfd_elf_write_section_eh_frame): Adjust section
size check to account for possible zero terminator.

10 years agodaily update
Alan Modra [Mon, 10 Nov 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agoUpdate .MIPS.abiflags to support MIPS R6
Matthew Fortune [Tue, 4 Nov 2014 23:37:28 +0000 (23:37 +0000)]
Update .MIPS.abiflags to support MIPS R6

Backport from trunk.

bfd/

* elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
and E_MIPS_ARCH_64R6 support.

ld/testsuite/

* ld-mips-elf/abiflags-strip10-ph.d: New file.
* ld-mips-elf/mips-eld.exp: Run the new test.

gas/

* config/tc-mips.c (mips_elf_final_processing): Add INSN_ISA32R6
and INSN_ISA64R6 support.

gas/testsuite/

* gas/mips/elf_arch_mips32r6.d: New file.
* gas/mips/elf_arch_mips64r6.d: New file.
* gas/mips/mips.exp: Run the new tests.

10 years agodaily update
Alan Modra [Sun, 9 Nov 2014 23:00:12 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Sat, 8 Nov 2014 23:00:12 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Fri, 7 Nov 2014 23:00:34 +0000 (09:30 +1030)]
daily update

10 years agoX32: Add REX prefix to encode R_X86_64_GOTTPOFF
H.J. Lu [Fri, 7 Nov 2014 20:22:53 +0000 (12:22 -0800)]
X32: Add REX prefix to encode R_X86_64_GOTTPOFF

Structions with R_X86_64_GOTTPOFF relocation must be encoded with REX
prefix even if it isn't required by destination register.  Otherwise
linker can't safely perform IE -> LE optimization.

bfd/

PR ld/17482
* elf64-x86-64.c (elf_x86_64_relocate_section): Update comments
for IE->LE transition.

gas/

PR ld/17482
* config/tc-i386.c (output_insn): Add a dummy REX_OPCODE prefix
for structions with R_X86_64_GOTTPOFF relocation for x32 if needed.

gas/testsuite/

PR ld/17482
* gas/i386/ilp32/x32-tls.d: New file.
* gas/i386/ilp32/x32-tls.s: Likewise.

ld/testsuite/

PR ld/17482
* ld-x86-64/tlsie4.dd: Updated.

10 years agodaily update
Alan Modra [Thu, 6 Nov 2014 23:00:32 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Wed, 5 Nov 2014 23:00:28 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Tue, 4 Nov 2014 23:00:33 +0000 (09:30 +1030)]
daily update

10 years agoSet development to false.
Tristan Gingold [Tue, 4 Nov 2014 11:06:05 +0000 (12:06 +0100)]
Set development to false.

bfd/
2014-11-04  Tristan Gingold  <gingold@adacore.com>

* development.sh: Set development to false.

10 years agodaily update
Alan Modra [Mon, 3 Nov 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agoImport updated translations provided by the Translation Project:
Nick Clifton [Mon, 3 Nov 2014 12:33:35 +0000 (12:33 +0000)]
Import updated translations provided by the Translation Project:

       bfd, binutils, gprof, opcodes:
        * po/fi.po: Updated Finnish translation.

        binutils:
        * po/sv.po: Updated Swedish translation.

        gprof:
        * po/hu.po: New Hungarian translation.

10 years agoFixes a snafu checking the size of a 20-bit immediate.
Nick Clifton [Mon, 3 Nov 2014 11:17:45 +0000 (11:17 +0000)]
Fixes a snafu checking the size of a 20-bit immediate.

* config/tc-msp430.c (msp430_srcoperand): Fix range test for
20-bit values.

10 years agodaily update
Alan Modra [Sun, 2 Nov 2014 23:00:27 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Sat, 1 Nov 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Fri, 31 Oct 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agoImport a patch from the mainline to fix a seg-fault in the BFD library:
Nick Clifton [Fri, 31 Oct 2014 10:24:58 +0000 (10:24 +0000)]
Import a patch from the mainline to fix a seg-fault in the BFD library:

PR binutils/17512
* ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
* coffgen.c (coff_get_normalized_symtab): Prevent buffer overrun.

10 years agoImport a security patch from the mainline which changes the default behaviour
Nick Clifton [Fri, 31 Oct 2014 10:21:57 +0000 (10:21 +0000)]
Import a security patch from the mainline which changes the default behaviour
of the strings program to be --all rather then --data.  This avoids using the
BFD library by default, and so avoids exposing strings to any memory bugs
present in BFD.

* strings.c: Add new command line option --data to only scan the
initialized, loadable data secions of binaries.  Choose the
default behaviour of --all or --data based upon a configure
option.
* doc/binutils.texi (strings): Update documentation.  Include
description  of why the --data option might be unsafe.
* configure.ac: Add new option --disable-default-strings-all which
restores the old behaviour of strings using --data by default.  If
the option is not used make strings use --all by default.
* NEWS: Mention the new behaviour of strings.
* configure: Regenerate.
* config.in: Regenerate.

10 years agodaily update
Alan Modra [Thu, 30 Oct 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agoRemove the artificial limit on code alignment through the use of the
Dr Philipp Tomsich [Thu, 30 Oct 2014 10:51:04 +0000 (10:51 +0000)]
Remove the artificial limit on code alignment through the use of the
fixed part of a fragment for output generation only, which required
MAX_MEM_FOR_RS_ALIGN_CODE to be large enough to hold the maximum pad.

* config/tc-aarch64.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define to 7.
* config/tc-aarch64.c (aarch64_handle_align): Rewrite to handle
large alignments with a constant fragment size of
MAX_MEM_FOR_RS_ALIGN_CODE.

10 years ago Fix error message strings so that they can be translated properly.
Nick Clifton [Thu, 30 Oct 2014 09:56:52 +0000 (09:56 +0000)]
 Fix error message strings so that they can be translated properly.

* readelf.c (CHECK_ENTSIZE_VALUES): Rewrite error message so that
there is a single string for translation.
(dynamic_section_mips_val): Likewise.

10 years agoFix a memory leak in the recent patch to detect loops in ELF section
Nick Clifton [Thu, 30 Oct 2014 09:37:45 +0000 (09:37 +0000)]
Fix a memory leak in the recent patch to detect loops in ELF section
string indicies.

* elf.c (bfd_section_from_shdr): Fix heap use after free memory
leak.

10 years agodaily update
Alan Modra [Wed, 29 Oct 2014 23:00:20 +0000 (09:30 +1030)]
daily update

10 years agoUpdated and New translations from the Translation Project.
Nick Clifton [Wed, 29 Oct 2014 16:37:32 +0000 (16:37 +0000)]
Updated and New translations from the Translation Project.

10 years agodaily update
Alan Modra [Tue, 28 Oct 2014 23:00:37 +0000 (09:30 +1030)]
daily update

10 years agoFixes another couple of memory errors reading corrupt binaries. This time
Nick Clifton [Tue, 28 Oct 2014 15:47:13 +0000 (15:47 +0000)]
Fixes another couple of memory errors reading corrupt binaries.  This time
detected by the address sanitizer.

PR binutils/17512
* elf.c (bfd_section_from_shdr): Allocate and free the recursion
detection table on a per-bfd basis.
* peXXigen.c (pe_print_edata): Handle binaries with a truncated
export table.

10 years agoMIPS Documentation fixes
Matthew Fortune [Tue, 21 Oct 2014 10:58:19 +0000 (11:58 +0100)]
MIPS Documentation fixes

Import from trunk.

gas/
* doc/as.texinfo: Update the MIPS FP ABI descriptions.
* doc/c-mips.texi: Spell check and correct throughout.

10 years agoMIPS/GAS: Correct file option settings with `.insn'
Maciej W. Rozycki [Tue, 21 Oct 2014 22:06:23 +0000 (23:06 +0100)]
MIPS/GAS: Correct file option settings with `.insn'

Import from trunk.

This makes sure `HAVE_CODE_COMPRESSION' evaluates correctly when the
`.insn' directive is used at the beginning of a source file before any
instructions have been produced and that ELF file header's MIPS16 and
microMIPS ASE flags are set correctly in the case where no instructions
have been produced other than with the said directive.

gas/
* config/tc-mips.c (s_insn): Set file options.

gas/testsuite/
* gas/mips/insn-opts.d: New test.
* gas/mips/insn-opts.s: New test source.
* gas/mips/mips.exp: Run the new test.

10 years agoFix bad @value references in MIPS documentation
Matthew Fortune [Fri, 17 Oct 2014 19:25:09 +0000 (20:25 +0100)]
Fix bad @value references in MIPS documentation

Import from trunk.

gas/

* doc/c-mips.texi: Fix bad @value references.

10 years agoShow information about unknown ASEs and extensions in .MIPS.abiflags
Matthew Fortune [Fri, 17 Oct 2014 10:07:17 +0000 (11:07 +0100)]
Show information about unknown ASEs and extensions in .MIPS.abiflags

Import from trunk.

bfd/
* elfxx-mips.c (print_mips_ases): Print unknown ASEs.
(print_mips_isa_ext): Print the value of an unknown extension.

binutils/

* readelf.c (print_mips_ases): Print unknown ASEs.
(print_mips_isa_ext): Print the value of an unknown extension.

include/

* elf/mips.h (AFL_ASE_MASK): Define.

10 years agoImport patches from the master branch which prevent seg-faults when parsing
Nick Clifton [Tue, 28 Oct 2014 10:50:17 +0000 (10:50 +0000)]
Import patches from the master branch which prevent seg-faults when parsing
corrupt binaries.

2014-10-28  Andreas Schwab  <schwab@suse.de>
    Nick Clifton  <nickc@redhat.com>
PR binutils/17510
* srec.c (srec_bad_byte): Increase size of buf to allow for
negative values.
(srec_scan): Use an unsigned char buffer to hold header bytes.

2014-10-27  Nick Clifton  <nickc@redhat.com>
PR binutils/17512
* elf.c (bfd_section_from_shdr): Detect and warn about ELF
binaries with a group of sections linked by the string table
indicies.
* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
with an invalid value for NumberOfRvaAndSizes.
(pe_print_edata): Detect out of range rvas and entry counts for
the Export Address table, Name Pointer table and Ordinal table.

PR binutils/17510
* elf.c (setup_group): Improve handling of corrupt group
sections.

10 years agoRelax ppc64_elf_tls_optimize assertion
Alan Modra [Tue, 21 Oct 2014 10:14:38 +0000 (20:44 +1030)]
Relax ppc64_elf_tls_optimize assertion

The code in ppc64_elf_tls_optimize looking at the .toc is only
interested in .toc entries that are addresses.  .toc can contain more
than just an array of addresses, so if we have items that aren't
8-byte aligned, ignore them.

* elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc
entries that aren't a multiple of 8 rather than failing assertion.

10 years agoppc: enable msgclr and msgsnd on Power8
Jan Beulich [Tue, 21 Oct 2014 07:56:38 +0000 (09:56 +0200)]
ppc: enable msgclr and msgsnd on Power8

According to my reading of the spec it was an oversight for them to
not having got enabled when Power8 support got added.

10 years agoAdd gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7
Alan Modra [Tue, 21 Oct 2014 06:36:01 +0000 (17:06 +1030)]
Add gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7

powerpc64 ld builds plt call stubs with a read barrier to provide
thread safety on lazy plt updates, necessary on multi-threaded apps
with power7 or later weakly ordered memory.  gcc-4.9 libgomp
introduced more functions that could call pthread_create, which means
we have more functions that if referenced in an executable should
cause a default of --plt-thread-safe.

bfd/
* elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
to thread_starter.
gold/
* powerpc.cc (do_relax): Add gcc-4.9 libgomp functions to
thread_starter.

10 years agoPowerPC64 ELFv1 function symbol definition vs LTO and discarded sections
Alan Modra [Sat, 18 Oct 2014 11:16:48 +0000 (21:46 +1030)]
PowerPC64 ELFv1 function symbol definition vs LTO and discarded sections

When functions are emitted in comdat groups, global symbols defined in
duplicates of the group are treated as if they were undefined.  That
prevents the symbols in the discarded sections from affecting the
linker's global symbol hash table or causing duplicate symbol errors.
Annoyingly, when gcc emits a function to a comdat group, it does not
put *all* of a function's code and data in the comdat group.
Typically, constant tables, exception handling info, and debug info
are emitted to normal sections outside of the group, which is a
perennial source of linker problems due to the special handling needed
to deal with the extra-group pieces that ought to be discarded.  In
the case of powerpc64-gcc, the OPD entry for a function is not put in
the group.  Since the function symbol is defined on the OPD entry this
means we need to handle symbols in .opd specially.

To see how this affects LTO in particular, consider the linker
testcase PR ld/12942 (1).  This testcase links an LTO object file
pr12942a.o with a normal (non-LTO) object pr12942b.o.  Both objects
contain a definition for _Z4testv in a comdat group.  On loading
pr12942a.o, the linker sees a comdat group (actually linkonce section)
for _Z4testv and a weak _Z4testv defined in the IR.  On loading
pr12942b.o, the linker sees the same comdat group, and thus discards
it.  However, _Z4testv is a weak symbol defined in .opd, not part of
the group, so this weak symbol overrides the weak IR symbol.  On
(re)loading the LTO version of pr12942a.o, the linker sees another
weak _Z4testv, but this one does not override the value we have from
pr12942b.o.  The result is a linker complaint about "`_Z4testv'
... defined in discarded section `.group' of tmpdir/pr12942b.o".

* elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
section for function symbols defined in .opd is discarded, let
the symbol appear to be undefined.
(opd_entry_value): Ensure the result section is that for the
function code section in the same object as the OPD entry.

10 years agoFix PR17493, attempted output of *GAS `reg' section* symbol
Alan Modra [Sat, 18 Oct 2014 00:40:53 +0000 (11:10 +1030)]
Fix PR17493, attempted output of *GAS `reg' section* symbol

The write.c change is to make gas report an error if reg_section
symbols should leak in future.  The tc-i386.c change is the real fix.

Note that the error isn't the most helpful, "redefined symbol cannot
be used on reloc", but I'm not inclined to improve what is really an
internal gas error.  reg_section symbols shouldn't leak..

gas/
PR 17493
* write.c (adjust_reloc_syms): Don't allow symbols in reg_section
to be reduced to reg_section section symbol.
* gas/config/tc-i386.c (i386_finalize_immediate): Reject all
reg_section immediates.
gas/testsuite/
* gas/i386/inval-equ-2.l: Adjust.

10 years agoFix 17492, ld segfault with --oformat=binary
Alan Modra [Thu, 16 Oct 2014 10:46:07 +0000 (21:16 +1030)]
Fix 17492, ld segfault with --oformat=binary

PR 17492
* elf32-arm.c (elf32_arm_add_symbol_hook): Only set has_gnu_symbols
on ELF output bfd.
* elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
* elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
* elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
* elf-s390-common.c (elf_s390_add_symbol_hook): Likewise.  Handle
STB_GNU_UNIQUE too.

10 years agoPR17488, powerpc64-linux-ld segfault
Alan Modra [Wed, 15 Oct 2014 23:08:09 +0000 (09:38 +1030)]
PR17488, powerpc64-linux-ld segfault

For binary ouput, we don't have an ELF bfd output so can't access
elf_elfheader.  The elf64-ppc.c changes are really just a tidy,
triggered by looking at all places where the abiversion bits are
accessed.

bfd/
* elf64-ppc.c (ppc64_elf_before_check_relocs): Do .opd processing
even when output is not ppc64 ELF.  Remove redundant tests on
type of input bfd.
ld/
PR 17488
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Don't attempt
to access ELF header e_flags when not ppc64 ELF output.

10 years agoMerge bfd_find_nearest_line variants
Alan Modra [Wed, 15 Oct 2014 11:22:20 +0000 (21:52 +1030)]
Merge bfd_find_nearest_line variants

When bfd_find_nearest_line_discriminator was added, not enough care
was taken to ensure all targets had a proper definition of the function.
This patch cures that by merging bfd_find_nearest_line_discriminator
and bfd_find_nearest_line target implementations.

PR 17481
* aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr"
param, group "section" and "offset" params.  Zero discriminator.
* bfd.c (bfd_find_nearest_line): Implement with new
_bfd_find_nearest_line.
(bfd_find_nearest_line_discriminator): Likewise.
* coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't
define.
* coff-rs6000.c (xcoff_find_nearest_line,
xcoff_find_nearest_line_discriminator): Delete.
(_bfd_xcoff_find_nearest_line): Don't define.
(_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line.
* coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't
define.
* coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust.
* coffgen.c (coff_find_nearest_line_with_names): Reorder params,
adjust _bfd_dwarf2_find_nearest_line call.
(coff_find_nearest_line): Add "discriminator_ptr" param, reorder
others.  Set discriminator.  Adjust call.
(coff_find_nearest_line_discriminator): Delete.
* dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params.
* dwarf2.c (find_line): Rename to..
(_bfd_dwarf2_find_nearest_line): ..this, reordering params.
Simplify setting of do_line.  Delete old function.
(_bfd_dwarf2_find_line): Delete.
* ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add
discriminator_ptr and set it.
* elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype.
(_bfd_elf_find_nearest_line_discriminator): Delete.
(_bfd_elf_find_line_discriminator): Delete.
(_bfd_generic_find_nearest_line_discriminator): Don't define.
* elf.c (elf_find_function): Reorder params.
(_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr.
Adjust calls.
(_bfd_elf_find_nearest_line_discriminator): Delete.
(_bfd_elf_find_line): Adjust call.
* elf32-arm.c (arm_elf_find_function): Reorder params.
(elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr.
Adjust calls.
* elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly.
* elfnn-aarch64.c (aarch64_elf_find_function): Reorder params.
(elfNN_aarch64_find_nearest_line): Reorder params, add
discriminator_ptr.  Adjust calls.
* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.
* elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype.
* libaout.h (NAME (aout, find_nearest_line)): Update prototype.
* libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update.
(_bfd_dwarf1_find_nearest_line): Likewise.
(_bfd_dwarf2_find_nearest_line): Likewise.
(_bfd_dwarf2_find_line): Delete.
(_bfd_generic_find_nearest_line_discriminator): Delete.
* libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete.
* libcoff-in.h (coff_find_nearest_line): Update prototype.
(coff_find_nearest_line_discriminator): Delete.
(coff_find_nearest_line_with_names): Update prototype.
* libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype.
* mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add
discriminator_ptr.  Adjust calls.
* mach-o.h (bfd_mach_o_find_nearest_line): Update prototype.
* pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add
discriminator_ptr and set.
* som.c (som_find_nearest_line): Similarly.
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for
_bfd_find_nearest_line_discriminator.
(struct bfd_target <_bfd_find_nearest_line>): Adjust prototype.
(struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete.
* vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to..
(_bfd_vms_find_nearest_line): ..this.  Reorder params, add
"discriminator" and set.
(_bfd_vms_find_nearest_line_discriminator): Delete.
(_bfd_generic_find_nearest_line_discriminator): Don't define.
(alpha_vms_find_nearest_line): Update define.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* libcoff.h: Regenerate.

10 years agoDefine bfd_find_line entry of BFD_JUMP_TABLE_SYMBOLS using NAME
Alan Modra [Wed, 15 Oct 2014 05:10:45 +0000 (15:40 +1030)]
Define bfd_find_line entry of BFD_JUMP_TABLE_SYMBOLS using NAME

In https://www.sourceware.org/ml/binutils/2005-06/msg00082.html
HJ implemented bfd_find_line for DWARF2, but cheated a little in not
using the usual NAME##_find_line, saving quite a lot of boring
editing.  However that shortcut probably contributed to
bfd_find_nearest_line_discriminator being implemented the same way,
and missing support for some targets.

* targets.c (BFD_JUMP_TABLE_SYMBOLS): Use NAME##_find_line.
* aout-adobe.c (aout_32_find_line): Define.
(aout_32_bfd_make_debug_symbol, aout_32_bfd_reloc_type_lookup,
aout_32_bfd_reloc_name_lookup): Define using _bfd_nosymbols define.
* aout-target.h (MY_find_line): Define.
* aout-tic30.c (MY_find_line): Define.
* binary.c (binary_find_line): Define.
* bout.c (aout_32_find_line): Define.
* coff-rs6000.c (_bfd_xcoff_find_line): Define.
* coff64-rs6000.c (rs6000_xcoff64_vec): Use coff_find_line.
(rs6000_xcoff64_aix_vec): Likewise.
* elf-bfd.h (_bfd_generic_find_line): Don't define.
* elfxx-target.h (bfd_elfNN_find_line): Define.
* i386msdos.c (msdos_find_line): Define.
* i386os9k.c (aout_32_find_line): Define.
* ieee.c (ieee_find_nearest_line, ieee_find_inliner_info): Delete func.
(ieee_find_nearest_line, ieee_find_line,
ieee_find_inliner_info): Define.
* ihex.c (ihex_find_line): Define.
* libbfd-in.h (_bfd_nosymbols_find_line): Define.
(_bfd_generic_find_line): Don't define.
* libbfd.c (_bfd_generic_find_line): Delete.
* libcoff-in.h (coff_find_line): Define.
* libecoff.h (_bfd_ecoff_find_line): Define.
* mach-o.h (bfd_mach_o_find_line): Define.
* mmo.c (mmo_find_line): Define.
* nlm-target.h (nlm_find_line): Define.
* oasys.c (oasys_find_nearest_line, oasys_find_inliner_info): Delete.
(oasys_find_nearest_line, oasys_find_line,
oasys_find_inliner_info): Define.
* pef.c (bfd_pef_find_line): Define.
* plugin.c (bfd_plugin_find_line): Define.
* ppcboot.c (ppcboot_find_line): Define.
* som.c (som_find_line): Define.
* srec.c (srec_find_line): Define.
* tekhex.c (tekhex_find_line): Define.
* versados.c (versados_find_line): Define.
* vms-alpha.c (alpha_vms_find_line): Define.
* xsym.c (bfd_sym_find_line): Define.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* libcoff.h: Regenerate.

10 years agoChangeLog typo fix
Alan Modra [Tue, 14 Oct 2014 23:21:53 +0000 (09:51 +1030)]
ChangeLog typo fix

10 years agoFix memory overflow issue about strncat
Chen Gang [Tue, 14 Oct 2014 23:18:47 +0000 (09:48 +1030)]
Fix memory overflow issue about strncat

If src contains n or more bytes, strncat() writes n+1 bytes to dest
(n from src plus the terminating null byte).   Therefore, the size of
dest must be at least strlen(dest)+n+1.

* config/tc-tic4x.c (md_assemble): Correct strncat size.

10 years agodaily update
Alan Modra [Mon, 27 Oct 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Sun, 26 Oct 2014 23:00:12 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Sat, 25 Oct 2014 23:00:11 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Fri, 24 Oct 2014 23:00:35 +0000 (09:30 +1030)]
daily update

10 years ago[AArch64] Cortex-A53 erratum 835769 linker workaround
Jiong Wang [Fri, 24 Oct 2014 11:23:40 +0000 (12:23 +0100)]
[AArch64] Cortex-A53 erratum 835769 linker workaround

2014-10-24  Tejas Belagod  <tejas.belagod@arm.com>

    bfd/
     * bfd-in.h (bfd_elf64_aarch64_set_options): Add a parameter.
     * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
     * elfnn-aarch64.c (aarch64_erratum_835769_stub): New.
     (elf_aarch64_stub_type): Add new type
     aarch64_stub_erratum_835769_veneer.
     (elf_aarch64_stub_hash_entry): New fields for erratum 835769.
     (aarch64_erratum_835769_fix): New data struct to record erratum
     835769.
     (elf_aarch64_link_hash_table: Global flags for 835769.
     (aarch64_build_one_stub): Add case for 835769.
     (aarch64_size_one_stub): Likewise.
     (aarch64_mem_op_p, aarch64_mlxl_p,
     aarch64_erratum_sequence,erratum_835769_scan):
     New. Decode and scan functions for erratum 835769.
     (elf_aarch64_create_or_find_stub_sec): New.
     (elfNN_aarch64_size_stubs): Look for erratum 835769 and record
     them.
     (bfd_elfNN_aarch64_set_options: Set global flag for 835769.
     (erratum_835769_branch_to_stub_data,
     make_branch_to_erratum_835769_stub):New. Connect up all the
     erratum stubs to occurances by branches.
     (elfNN_aarch64_write_section): New hook.
     (aarch64_map_one_stub): Output erratum stub symbol.
     (elfNN_aarch64_size_dynamic_sections): Init mapping symbol
     information for erratum 835769.
     (elf_backend_write_section): Define.

    ld/
     * emultempl/aarch64elf.em: Add command-line option for erratum
     835769.

    ld/testsuite/
     * ld-aarch64/aarch64-elf.exp (aarch64elftests): Drive erratum
     835769 tests.
     * ld-aarch64/erratum835769.d: New.
     * ld-aarch64/erratum835769.s: New.

10 years agodaily update
Alan Modra [Thu, 23 Oct 2014 23:00:26 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Wed, 22 Oct 2014 23:00:28 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Tue, 21 Oct 2014 23:00:12 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Mon, 20 Oct 2014 23:00:28 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Sun, 19 Oct 2014 23:00:15 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Sat, 18 Oct 2014 23:00:25 +0000 (09:30 +1030)]
daily update

10 years agodaily update
Alan Modra [Fri, 17 Oct 2014 23:00:13 +0000 (09:30 +1030)]
daily update

10 years agoBackport "Fix sysroot-tests, adding --print-sysroot" from master
Hans-Peter Nilsson [Fri, 17 Oct 2014 11:26:56 +0000 (13:26 +0200)]
Backport "Fix sysroot-tests, adding --print-sysroot" from master

10 years agoRegenerate configure (after change of version)
Tristan Gingold [Wed, 15 Oct 2014 08:15:29 +0000 (10:15 +0200)]
Regenerate configure (after change of version)

binutils/
2014-10-15  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2014-10-15  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2014-10-15  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2014-10-15  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

10 years agosrc-release.sh: configure using --target.
Tristan Gingold [Wed, 15 Oct 2014 07:48:50 +0000 (09:48 +0200)]
src-release.sh: configure using --target.

        * src-release.sh (do_proto_toplev): Configure with --target.

10 years agoBackport "="-ldscript-path-prefix changes from master.
Hans-Peter Nilsson [Wed, 15 Oct 2014 01:54:43 +0000 (03:54 +0200)]
Backport "="-ldscript-path-prefix changes from 

10 years agogprof: Regenerate configure
Andreas Schwab [Tue, 14 Oct 2014 18:23:24 +0000 (20:23 +0200)]
gprof: Regenerate configure

* configure: Regenerate.

10 years agobfd: bump version on the 2_25 branch
Tristan Gingold [Tue, 14 Oct 2014 08:18:23 +0000 (10:18 +0200)]
bfd: bump version on the 2_25 branch

bfd/
2014-10-14  Tristan Gingold  <gingold@adacore.com>

* version.m4: Bump version to 2.24.90
* configure: Regenerate.

10 years agoAdd NEWS markers for 2.25.
Tristan Gingold [Tue, 14 Oct 2014 07:49:47 +0000 (09:49 +0200)]
Add NEWS markers for 2.25.

binutils/
2014-10-14  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.25.

gas/
2014-10-14  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.25.

ld/
2014-10-14  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.25.

10 years agoAvoid undefined behaviour with signed expressions
Alan Modra [Tue, 14 Oct 2014 03:06:20 +0000 (13:36 +1030)]
Avoid undefined behaviour with signed expressions

PR 17453
bfd/
* libbfd.c (COERCE16, COERCE32, COERCE64): Use unsigned types.
(EIGHT_GAZILLION): Delete.
binutils/
* dwarf.c (read_leb128): Avoid signed overflow.
(read_debug_line_header): Likewise.
gas/
* config/tc-i386.c (fits_in_signed_long): Use unsigned param and
expression to avoid signed overflow.
(fits_in_signed_byte, fits_in_unsigned_byte, fits_in_unsigned_word,
fits_in_signed_word, fits_in_unsigned_long): Similarly.
* expr.c (operand <'-'>): Avoid signed overflow.
* read.c (s_comm_internal): Likewise.

10 years agoCorrect fscanf char field count
Alan Modra [Tue, 14 Oct 2014 03:00:57 +0000 (13:30 +1030)]
Correct fscanf char field count

%<number>s as an fscanf format does not include the trailing NULL.
PATH_MAX does include the trailing NULL.

PR 17453
* readelf.c (process_program_headers): Correct fscanf format used
for interpreter.

10 years agosparc-aout and sparc-coff breakage
Alan Modra [Mon, 13 Oct 2014 12:27:58 +0000 (22:57 +1030)]
sparc-aout and sparc-coff breakage

* config/tc-sparc.c (sparc_md_end): Fix unused variable warnings.

10 years agodaily update
Alan Modra [Mon, 13 Oct 2014 23:01:01 +0000 (09:31 +1030)]
daily update

10 years agoChange name of file name test in py-objfile.exp.
Doug Evans [Mon, 13 Oct 2014 21:50:32 +0000 (14:50 -0700)]
Change name of file name test in py-objfile.exp.

Tests should each have their own name.

gdb/testsuite/ChangeLog:

* gdb.python/py-objfile.exp: Change name of file name test.

10 years agoFix dw2-op-out-param.S CU offset values.
Doug Evans [Mon, 13 Oct 2014 21:05:34 +0000 (14:05 -0700)]
Fix dw2-op-out-param.S CU offset values.

This test will pass if the CU is the first CU in the binary.
If libc debugging info is installed it may not be, in which case
the CU offset values are wrong.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/dw2-op-out-param.S: Make DW_FORM_ref4 values be the offset
from the start of the CU.

10 years agofix file paths in previous commit
Doug Evans [Mon, 13 Oct 2014 20:33:09 +0000 (13:33 -0700)]
fix file paths in previous commit

10 years agoRemove some code duplication in py-objfile.c, py-progspace.c.
Doug Evans [Mon, 13 Oct 2014 19:24:54 +0000 (12:24 -0700)]
Remove some code duplication in py-objfile.c, py-progspace.c.

gdb/ChangeLog:

* py-objfile.c (objfpy_initialize): New function.
(objfpy_new, objfile_to_objfile_object): Call it.
* py-progspace.c (pspy_initialize): New function.
(pspy_new, pspace_to_pspace_object): Call it.

10 years agoRun eh_frame optimisation for relocatable link
Alan Modra [Mon, 13 Oct 2014 04:48:21 +0000 (15:18 +1030)]
Run eh_frame optimisation for relocatable link

The idea here is to drop .eh_frame FDEs corresponding to dropped
comdat group sections or linkonce sections, but not perform changes in
encoding.

bfd/
PR 17467
* elf-eh-frame.c (ENSURE_NO_RELOCS): Don't stop at first NONE reloc.
(_bfd_elf_parse_eh_frame): When relocatable output, don't set
flags enabling conversion of CIEs and FDEs to use relative encoding.
(find_merged_cie): Similarly.
(_bfd_elf_write_section_eh_frame): Don't edit FDEs when
relocatable, except for CIE pointer.
* elflink.c (bfd_elf_reloc_symbol_deleted_p): Return true for
relocs against symbols in dropped comdat group sections.
(bfd_elf_discard_info): Do some eh_frame optimisation when
relocatable.
ld/
* ldlang.c (lang_add_section): Set up map_head.s and map_tail.s when
relocatable.

10 years agoFix "save breakpoints" for "catch" command
Jan Kratochvil [Mon, 13 Oct 2014 11:39:48 +0000 (13:39 +0200)]
Fix "save breakpoints" for "catch" command

gdb/ChangeLog
2014-10-13  Miroslav Franc  <mfranc@redhat.com>
    Jan Kratochvil  <jan.kratochvil@redhat.com>

Fix "save breakpoints" for "catch" command.
* break-catch-sig.c (signal_catchpoint_print_recreate): Add trailing
newline.

gdb/testsuite/ChangeLog
2014-10-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
    Yao Qi  <yao@codesourcery.com>

Fix "save breakpoints" for "catch" command.
* gdb.base/catch-signal.exp: Add gdb_breakpoint "main".
Remove -nonewline.  Match also the added "main" line.

10 years agodaily update
Alan Modra [Sun, 12 Oct 2014 23:00:41 +0000 (09:30 +1030)]
daily update

10 years agoFix "save breakpoints" for "disable $bpnum" command.
Jan Kratochvil [Sun, 12 Oct 2014 19:52:39 +0000 (21:52 +0200)]
Fix "save breakpoints" for "disable $bpnum" command.

gdb/ChangeLog
2014-10-12  Miroslav Franc  <mfranc@redhat.com>

Fix "save breakpoints" for "disable $bpnum" command.
* breakpoint.c (save_breakpoints): Add $bpnum for disable.

gdb/testsuite/ChangeLog
2014-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>

Fix "save breakpoints" for "disable $bpnum" command.
* gdb.base/save-bp.c (main): Add label.
* gdb.base/save-bp.exp: Add 8th disabled breakpoint.  Match it.

10 years agoUse gdb_test_sequence in gdb.base/save-bp.exp.
Jan Kratochvil [Sun, 12 Oct 2014 19:47:13 +0000 (21:47 +0200)]
Use gdb_test_sequence in gdb.base/save-bp.exp.

But IMO it is a functionality regression as:

 * gdb_test_sequence permits arbitary number of lines of text between those
   lines being matched.  Former regex string did not allow it.
   This may make a difference if GDB regresses by printing some unexpected
   line after the breakpoint info line (like a "silent" line).

>  * \[\r\n\]+ can be used to anchor the beginning of the pattern, in the sense
>    of Perl regex ^ /m match.  At least I have found such cases in existing
>    *.exp files so I used that.  Using ^ really does not work.
>
>    But I am not aware how to do Perl regex $ /m match.  Using $ really does
>    not work.  But this means that for example the trailing
>      ( \\((host|target) evals\\))?
>    on the line
>      "\[\r\n\]+\[ \t\]+stop only if i == 1( \\((host|target) evals\\))?"
>    originally made sense there but now it can be removed as it has no longer
>    any functionality there - it will match now any trailing line garbage.

by Yao Qi:

In this test case, ( \\((host|target) evals\\))? isn't needed in the
pattern.  What we test here is to save breakpoints into file and restore
them from file.  The contents saved in file are:

break save-bp.c:31
  condition $bpnum i == 1

the information about the place where the condition is evaluated isn't
saved, so we don't need to check.  Breakpoint save and restore has
nothing to do with where the condition is evaluated (host or target).  I
am fine to leave it here now.

gdb/testsuite/ChangeLog
2014-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.base/save-bp.exp (info break): Use gdb_test_sequence.

10 years agodaily update
Alan Modra [Sat, 11 Oct 2014 23:00:42 +0000 (09:30 +1030)]
daily update

10 years agoSync libiberty with upstream GCC.
Iain Buclaw [Sat, 11 Oct 2014 09:29:10 +0000 (10:29 +0100)]
Sync libiberty with upstream GCC.

include/ChangeLog
* libiberty.h (PEX_STDOUT_APPEND): New flag.
(PEX_STDERR_APPEND): Likewise.

* demangle.h (DMGL_DLANG): New macro.
(DMGL_STYLE_MASK): Add DMGL_DLANG.
(demangling_styles): Add dlang_demangling.
(DLANG_DEMANGLING_STYLE_STRING): New macro.
(DLANG_DEMANGLING): New macro.
(dlang_demangle): New prototype.

* longlong.h: Add __udiv_w_sdiv prototype.

libiberty/ChangeLog
* cp-demangle.c (d_substitution): Handle abi tags on abbreviation.

* pex-common.h (struct pex_funcs): Add new parameter for open_write field.
* pex-unix.c (pex_unix_open_write): Add support for new parameter.
* pex-djgpp.c (pex_djgpp_open_write): Likewise.
* pex-win32.c (pex_win32_open_write): Likewise.
* pex-common.c (pex_run_in_environment): Likewise.

* Makefile.in (CFILES): Add d-demangle.c.
(REQUIRED_OFILES): Add d-demangle.o.
* cplus-dem.c (libiberty_demanglers): Add dlang_demangling case.
(cplus_demangle): Likewise.
* d-demangle.c: New file.
* testsuite/Makefile.in (really-check): Add check-d-demangle.
* testsuite/d-demangle-expected: New file.

* simple-object-elf.c (simple_object_elf_write_ehdr): Correctly
handle objects with more than SHN_LORESERVE sections.
(simple_object_elf_write_shdr): Add sh_link parameter.
(simple_object_elf_write_to_file): Correctly handle objects with
more than SHN_LORESERVE sections.

* cp-demangle.c (d_dump): Only access field from s_fixed part of
the union for DEMANGLE_COMPONENT_FIXED_TYPE.
(d_count_templates_scopes): Likewise.

* testsuite/demangler-fuzzer.c: New file.
* testsuite/Makefile.in (fuzz-demangler): New rule.
(demangler-fuzzer): Likewise.
(mostlyclean): Clean up demangler fuzzer.

10 years agoEnable qTStatus packet in case it is disabled
Yao Qi [Wed, 8 Oct 2014 03:25:31 +0000 (11:25 +0800)]
Enable qTStatus packet in case it is disabled

Nowadays, we are using command "tstatus" to send a packet to GDBserver
in order to check the connection.  However, on the target doesn't
support tracepoint, the following error is emitted before sending any
packet to GDBserver.

tstatus^M
Trace can not be run on this target.^M
(gdb) FAIL: gdb.server/server-kill.exp: tstatus

qTStatus is disabled after receiving the empty reply during connecting
to the remote target.  When the test executes command "tstatus" again,
remote_get_trace_status returns -1 at the very beginning, and no RSP
packet is sent out.

This patch is to enable qTStatus packet again.

gdb/testsuite:

2014-10-11  Yao Qi  <yao@codesourcery.com>

* gdb.server/server-kill.exp: Execute command
"set remote trace-status-packet on" before "tstatus".

10 years agoGet GDBserver pid on remote target
Yao Qi [Tue, 30 Sep 2014 13:08:15 +0000 (21:08 +0800)]
Get GDBserver pid on remote target

Hi,
We see the following fail in the real remote testing...

(gdb) Executing on target: kill -9 29808    (timeout = 300)
spawn [open ...]^M
sh: 1: kill: No such process

The test tries to kill gdbserver in this way:

set server_pid [exp_pid -i [board_info target fileid]]
remote_exec target "kill -9 $server_pid"

in native testing, we'll get the pid of spawned gdbserver, however, in
remote testing, we'll get the pid of ssh session, since we start
gdbserver on the remote target through ssh.  The pid on build doesn't
exist on target.

In this patch, we tweak server-kill.c to get the parent pid, which is
the pid of GDBserver.  GDB gets it and kill GDBserver on target.

gdb/testsuite:

2014-10-11  Yao Qi  <yao@codesourcery.com>

* gdb.server/server-kill.c: Include sys/types.h and unistd.h.
(main): Call getppid.
* gdb.server/server-kill.exp: Set breakpoint on line "i = 0;"
and continue to it.  Read variable "server_pid".

10 years agoClean up server-kill.exp
Yao Qi [Wed, 8 Oct 2014 02:04:22 +0000 (10:04 +0800)]
Clean up server-kill.exp

This patch is to remove some lines which looks unnecessary.  These
lines were added when server-kill.exp was added.  In the version 1,
https://sourceware.org/ml/gdb-patches/2013-03/msg00691.html the test
calls runto_main and delete breakpoint on main,

+if ![runto_main] {
+    return -1
+}
+
+# Otherwise the breakpoint at 'main' would not cause insert
breakpoints during
+# first step.
+delete_breakpoints

However, in the version 2
https://sourceware.org/ml/gdb-patches/2013-03/msg00854.html runto_main
is removed but delete_breakpoints is still there.  AFAICS, the line of
delete_breakpoints can be removed too.

gdb/testsuite:

2014-10-11  Yao Qi  <yao@codesourcery.com>

* gdb.server/server-kill.exp: Remove "delete_breakpoints".

10 years agoNo longer pull thread list explicitly
Yao Qi [Wed, 8 Oct 2014 14:26:27 +0000 (22:26 +0800)]
No longer pull thread list explicitly

As the result of the patch below, GDB updates thread list when a stop is
presented to user.  The tests don't have to fetch thread list explicitly.

  [PATCH 3/3] Fix non-stop regressions caused by "breakpoints always-inserted off" changes
  https://sourceware.org/ml/gdb-patches/2014-09/msg00734.html

This patch is to remove the test code updating thread list.

Run these three tests many times on arm-linux-gnueabi and x86-linux.
No regressions.

gdb/testsuite:

2014-10-11  Yao Qi  <yao@codesourcery.com>

* gdb.threads/thread-find.exp: Don't execute command
"info threads".
* gdb.threads/attach-into-signal.exp (corefunc): Likewise.
* gdb.threads/linux-dp.exp: Don't check the condition
$threads_created equals to zero.

10 years agodaily update
Alan Modra [Fri, 10 Oct 2014 23:00:49 +0000 (09:30 +1030)]
daily update

10 years agoDelete IRIX support
Pedro Alves [Fri, 10 Oct 2014 17:18:52 +0000 (18:18 +0100)]
Delete IRIX support

This does most of the mechanical removal.  IOW, the easy part.

This doesn't touch procfs.c as that'd be a harder excision,
potentially affecting Solaris.

mips-tdep.c is left alone.  E.g., I didn't delete the GDB_OSABI_IRIX
enum value, nor references to it in mips-tdep.c.  Some comments
mentioning IRIX ABIs may still be relevant and I wouldn't know what to
do with them. in That can always be done on a separate pass,
preferably by someone who can test on MIPS.

I didn't remove a reference to IRIX in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.

Built and tested on x86_64 Fedora 20, with --enable-targets=all.

Tested that building for --target=mips-sgi-irix6 on x86_64 Fedora 20
fails with:

 checking for default auto-load directory... $debugdir:$datadir/auto-load
 checking for default auto-load safe-path... $debugdir:$datadir/auto-load
 *** Configuration mips-sgi-irix6 is obsolete.
 *** Support has been REMOVED.
 make[1]: *** [configure-gdb] Error 1
 make[1]: Leaving directory `/home/pedro/gdb/mygit/build-irix'
 make: *** [all] Error 2

gdb/
2014-10-10  Pedro Alves  <palves@redhat.com>

* Makefile.in (ALL_TARGET_OBS): Remove mips-irix-tdep.o and solib-irix.o.
(ALLDEPFILES): Remove mips-irix-tdep.c and solib-irix.c.
(HFILES_NO_SRCDIR): Remove solib-irix.h.
* NEWS: Mention that support for mips-sgi-irix5* mips-sgi-irix6*
and been removed.
* config/mips/irix5.mh, config/mips/irix6.mh: Delete files.
* configure.ac: Remove references to IRIX.
* configure.host: Add *-*-irix* to the obsolete hosts section.
Remove all other references to irix.
* irix5-nat.c, mips-irix-tdep.c, solib-irix.c, solib-irix.h:
Delete files.

gdb/testsuite/
2014-10-10  Pedro Alves  <palves@redhat.com>

* gdb.base/bigcore.exp: Remove references to IRIX.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/interrupt.exp: Likewise.
* gdb.base/mips_pro.exp: Likewise.
* gdb.base/nodebug.exp: Likewise.
* gdb.base/setvar.exp: Likewise.
* lib/gdb.exp (gdb_compile_shlib): Remove mips-sgi-irix* case.

10 years agoMicroblaze: Reject invalid target descriptions
Ajit Kumar Agarwal [Fri, 10 Oct 2014 17:07:06 +0000 (18:07 +0100)]
Microblaze: Reject invalid target descriptions

We currently validate the target description, but then forget to
reject it if found invalid.

Tested that incorrect descriptions are rejected and GDB warns about
them.

Tested the Microblaze Design with and without stack-protect registers.
The gdb command "info registers" displayed the register correctly.  If
a stack protect design is not selected, only core registers are
displayed.  When the stack-protect registers are selected in the
design, the core registers along with stack-protect registers are
displayed.

gdb/
2014-10-10  Ajit Agarwal  <ajitkum@xilinx.com>

* microblaze-tdep.c (microblaze_gdbarch_init): If the description
isn't valid, release the tdesc arch data and return NULL.

10 years agoCache the vsyscall/vDSO range per-inferior
Pedro Alves [Fri, 10 Oct 2014 14:57:14 +0000 (15:57 +0100)]
Cache the vsyscall/vDSO range per-inferior

We're now doing a vsyscall/vDSO address range lookup whenever we fetch
shared libraries, either through an explicit "info shared", or when
the target reports new libraries have been loaded, in order to filter
out the vDSO from glibc's DSO list.  Before we started doing that, GDB
would only ever lookup the vsyscall's address range once in the
process's lifetime.

Looking up the vDSO address range requires an auxv lookup (which is
already cached, so no problem), but also reading the process's
mappings from /proc to find out the vDSO's mapping's size.  That
generates extra RSP traffic when remote debugging.  Particularly
annoying when the process's mappings grow linearly as more libraries
are mapped in, and we went through the trouble of making incremental
DSO list updates work against gdbserver (when the probes-based dynamic
linker interface is available).

The vsyscall/vDSO is mapped by the kernel when the process is
initially mapped in, and doesn't change throughout the process's
lifetime, so we can cache its address range.

Caching at this level brings GDB back to one and only one vsyscall
address range lookup per process.

Tested on x86_64 Fedora 20.

gdb/
2014-10-10  Pedro Alves  <palves@redhat.com>

* linux-tdep.c: Include observer.h.
(linux_inferior_data): New global.
(struct linux_info): New structure.
(invalidate_linux_cache_inf, linux_inferior_data_cleanup)
(get_linux_inferior_data): New functions.
(linux_vsyscall_range): Rename to ...
(linux_vsyscall_range_raw): ... this.
(linux_vsyscall_range): New function; handles caching.
(_initialize_linux_tdep): Register linux_inferior_data.  Install
inferior_exit and inferior_appeared observers.

10 years agoPR symtab/14466: Work around PR libc/13097 "linux-vdso.so.1"
Pedro Alves [Fri, 10 Oct 2014 14:57:13 +0000 (15:57 +0100)]
PR symtab/14466: Work around PR libc/13097 "linux-vdso.so.1"

With upstream glibc, GDB prints:

  warning: Could not load shared library symbols for linux-vdso.so.1.
  Do you need "set solib-search-path" or "set sysroot"?

A bug's been filed for glibc a few years back:

  http://sourceware.org/bugzilla/show_bug.cgi?id=13097

but it's still not resolved.  It's not clear whether there's even
consensus that this is indeed a glibc bug.  It would actually be nice
if GDB also listed the vDSO in the shared library list, but there are
some design considerations with that:

 - the vDSO is mapped by the kernel, not userspace, therefore we
   should load its symbols right from the process's start of life,
   even before glibc / the userspace loader sets up the initial DSO
   list.  The program might even be using a custom loader or no
   loader.

 - that kind of hints at that solib.c should handle retrieving shared
   library lists from more than one source, and that symfile-mem.c's
   loading of the vDSO would be converted to load and relocate the
   vDSO's bfd behind the target_so_ops interface.

 - and then, once glibc links in the vDSO to its DSO list, we'd need
   to either:

    a) somehow hand over the vDSO from one target_so_ops to the other

    b) simply keep hiding glibc's entry.

And then b) seems the simplest.

With that in mind, this patch simply discards the vDSO from glibc's
reported shared library list.

We can match the vDSO address range with the addresses found iterating
the dynamic linker list, to tell which dynamic linker entry is the
vDSO.

Tested on x86_64 Fedora 20.

gdb/
2014-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
    Pedro Alves  <palves@redhat.com>

PR symtab/14466
* solib-svr4.c (svr4_read_so_list): Rename to ...
(svr4_current_sos_1): ... this and change the function comment.
(svr4_current_sos): New function.

gdb/testsuite/
2014-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
    Pedro Alves  <palves@redhat.com>

PR symtab/14466
* gdb.base/vdso-warning.c: New file.
* gdb.base/vdso-warning.exp: New file.

10 years agoSplit vDSO range lookup to a gdbarch hook
Pedro Alves [Fri, 10 Oct 2014 14:57:13 +0000 (15:57 +0100)]
Split vDSO range lookup to a gdbarch hook

We have a case in solib-svr4.c where we could reuse symfile-mem.c's
vDSO range lookup.  Since symfile-mem.c is not present in all
configurations solib-svr4.c is, move that lookup to a gdbarch hook.

This has the minor (good) side effect that we stop even trying the
target_auxv_search lookup against targets that don't have a concept of
a vDSO, in case symfile-mem.c happens to be linked in the build
(--enable-targets=all).

Tested on x86_64 Fedora 20.

gdb/
2014-10-10  Pedro Alves  <palves@redhat.com>

* arch-utils.c (default_vsyscall_range): New function.
* arch-utils.h (default_vsyscall_range): New declaration.
* gdbarch.sh (vsyscall_range): New hook.
* gdbarch.h, gdbarch.c: Regenerate.
* linux-tdep.c (linux_vsyscall_range): New function.
(linux_init_abi): Install linux_vsyscall_range as
vsyscall_range gdbarch hook.
* memrange.c (address_in_mem_range): New function.
* memrange.h (address_in_mem_range): New declaration.
* symfile-mem.c (find_vdso_size): Delete function.
(add_vsyscall_page): Use gdbarch_vsyscall_range.

10 years agoinfrun.c:normal_stop: Fix typo in comment
Pedro Alves [Fri, 10 Oct 2014 12:50:05 +0000 (13:50 +0100)]
infrun.c:normal_stop: Fix typo in comment

gdb/
2014-10-10  Pedro Alves  <palves@redhat.com>

* infrun.c (normal_stop): Fix typo in comment.

10 years agodaily update
Alan Modra [Thu, 9 Oct 2014 23:00:36 +0000 (09:30 +1030)]
daily update

10 years agoPR tdep/9390: Fix typo on xstorxstormy16-tdep.c
Sergio Durigan Junior [Thu, 9 Oct 2014 17:45:09 +0000 (13:45 -0400)]
PR tdep/9390: Fix typo on xstorxstormy16-tdep.c

This patch fixes the bug described in PR tdep/9390, which is about a
wrong check in the following code:

    ...

    /* optional copying of args in r2-r7 to r10-r13.  */
    /* Probably only in optimized case but legal action for prologue.  */
    else if ((inst & 0xff00) == 0x4600 /* 46SD   mov rD, rS */
     && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
     && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
    ...

This condition will never trigger, and the fix proposed in the bug
(which made sense to me) was to test against 0x000a.  I tried finding
documentation about this target, but couldn't find anything.  I don't
even know if it is still used, but decided to submit the fix anyway.

Tested on my x86_64 Fedora 20 GNU/Linux.

gdb/ChangeLog:
2014-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>

PR tdep/9390
* xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
typo when using logical AND to determine instruction type.

10 years agoThis is a series of patches that add support for the SPARC M7 cpu to
Jose E. Marchesi [Thu, 9 Oct 2014 12:16:53 +0000 (13:16 +0100)]
This is a series of patches that add support for the SPARC M7 cpu to
binutils.  They were discussed and approved here:

  https://sourceware.org/ml/binutils/2014-10/msg00038.html

10 years agoRemove unused local variable
Yao Qi [Wed, 8 Oct 2014 11:25:59 +0000 (19:25 +0800)]
Remove unused local variable

As a result of commit b57bacec, local variable 'printed' is no longer
used.  This patch is to remove it.

gdb:

2014-10-09  Yao Qi  <yao@codesourcery.com>

* infrun.c (handle_signal_stop): Remove local variable 'printed'.

10 years agodaily update
Alan Modra [Wed, 8 Oct 2014 23:00:35 +0000 (09:30 +1030)]
daily update

10 years agoAdd Yao Qi as global maintainer
Stan Shebs [Wed, 8 Oct 2014 18:23:16 +0000 (11:23 -0700)]
Add Yao Qi as global maintainer

gdb/ChangeLog:

2014-10-08  Stan Shebs  <stan@codesourcery.com>

    * MAINTAINERS (GLOBAL MAINTAINERS): Add Yao Qi.

10 years agoinclude/elf/aarch64.h: Add reloc numbers from ABI release 1.0
Will Newton [Tue, 30 Sep 2014 11:17:32 +0000 (12:17 +0100)]
include/elf/aarch64.h: Add reloc numbers from ABI release 1.0

Add the relocation numbers defined in ABI release 1.0 but missing
from the current header. This will allow tools like objdump to dump
objects that use these relocations.

include/elf/ChangeLog:

2014-10-08  Will Newton  <will.newton@linaro.org>

* aarch64.h: Sync up relocations with ABI release 1.0.

10 years agoDo not include unnecessary files in fbsd-tdep.c
Gary Benson [Wed, 8 Oct 2014 08:52:38 +0000 (09:52 +0100)]
Do not include unnecessary files in fbsd-tdep.c

This commit makes fbsd-tdep.c not include string.h or gdb_assert.h
as both are already included by defs.h.

gdb/ChangeLog:

* fbsd-tdep.c: Do not include string.h or gdb_assert.h.