external/binutils.git
8 years agoFix ppc64le S-record test fail
Alan Modra [Thu, 19 May 2016 03:02:40 +0000 (12:32 +0930)]
Fix ppc64le S-record test fail

Segfaults on --defsym symbol (__stack_chk_fail in this instance).

* elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
before dereferencing.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 May 2016 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agogas/arc: Make member of arc_flags const
Andrew Burgess [Fri, 6 May 2016 12:59:03 +0000 (13:59 +0100)]
gas/arc: Make member of arc_flags const

By making the flgp field of struct arc_flags constant we can remove a
place where we cast away the const-ness of a variable.  Also, given that
the value assigned to this field almost always comes from compile-time
constant data, having the field non-constant is probably a bad thing.

gas/ChangeLog:

* config/tc-arc.c (find_opcode_match): Remove casting away of
const.
* config/tc-arc.h (struct arc_flags): Make flgp field const.

8 years agogas/arc: Use BFD_VMA_FMT for printf format specifier
Andrew Burgess [Wed, 4 May 2016 13:11:11 +0000 (14:11 +0100)]
gas/arc: Use BFD_VMA_FMT for printf format specifier

Some debug code has the wrong printf format specifier for some types
that are (ultimately) bfd_vma.  Fixed by using BFD_VMA_FMT string.  This
only becomes an issue when building the tc-arc.c file with -DDEBUG=1 to
build in the debug code.

gas/ChangeLog:

* config/tc-arc.c (md_pcrel_from_section): Use BFD_VMA_FMT where
appropriate.
(md_convert_frag): Likewise.

8 years agogas/arc: Fix array overrun when checking opcode array
Andrew Burgess [Wed, 4 May 2016 12:57:10 +0000 (13:57 +0100)]
gas/arc: Fix array overrun when checking opcode array

The opcode array iterator mechanism can, in some situations, result in
reading memory outside of the opcode array.  When using the
iterator-next mechanism to find the next possible arc_opcode, if we find
an opcode where the name field is NULL, or the name does not match, then
the cached opcode pointer is not set to NULL.  The result is that
another call to iterator-next will again increment the opcode
pointer (which might now point outside the opcode array) and attempt to
access the name field of this undefined opcode.

Fixed in this commit by clearing the cached opcode pointer.

I've added a test case, which currently shows the bug, however, this
will only expose this bug while the opcode used (dsp_fp_cmp) is the last
opcode in the table.

gas/ChangeLog:

* config/tc-arc.c (arc_opcode_hash_entry_iterator_next): Set
cached opcode to NULL when we reach a non-matching opcode.
* testsuite/gas/arc/asm-errors-2.d: New file.
* testsuite/gas/arc/asm-errors-2.err: New file.
* testsuite/gas/arc/asm-errors-2.s: New file.

8 years agogas/arc: Add guard against operand array overflow.
Andrew Burgess [Tue, 3 May 2016 12:43:44 +0000 (13:43 +0100)]
gas/arc: Add guard against operand array overflow.

Currently supplying an input file with too many operands to an
instruction will cause the assembler to overflow and array and trigger
undefined behaviour.

This change checks that we don't access outside the limits of the
operand array.

gas/ChangeLog:

* config/tc-arc.c (tokenize_arguments): Add checks for array
overflow.
* testsuite/gas/arc/asm-errors.s: Addition test line added.
* testsuite/gas/arc/asm-errors.err: Update expected results.

8 years agoFix build failure with GCC 4.1.
Tom Tromey [Wed, 18 May 2016 16:48:41 +0000 (10:48 -0600)]
Fix build failure with GCC 4.1.

2016-05-18  Tom Tromey  <tom@tromey.com>

* rust-lang.c (rust_subscript): Initialize "high".

8 years agoPrevent a run time segmentation fault when stripping a corrupt binary.
Nick Clifton [Wed, 18 May 2016 14:21:16 +0000 (15:21 +0100)]
Prevent a run time segmentation fault when stripping a corrupt binary.

PR 20096
* objcopy.c (copy_relocations_in_section): Also check for the
symbol pointed to by sym_ptr_ptr being NULL.

8 years agoAdd mi-threads-interrupt.exp test (PR 20039)
Simon Marchi [Wed, 18 May 2016 14:13:12 +0000 (10:13 -0400)]
Add mi-threads-interrupt.exp test (PR 20039)

Add a new test for PR 20039.  The test spawns new threads, then tries to
interrupt, continue, and interrupt again.  This use case was fixed by
commit 5fe966540d6b748f825774868463003700f0c878 in master, but gdb 7.11
is affected (so if you try it on the gdb-7.11-branch right now, the test
will fail).

New in v2, the test now handles mi-async on mode properly.  The failure
was specific to mi-async off, but I don't think it's bad to test the
same thing under async on mode.  I added a little hack when running in
async mode to work around bug 20045.

I also removed one continue/interrupt pair, as a single one was enough to
trigger the problem.

gdb/testsuite/ChangeLog:

* gdb.mi/mi-threads-interrupt.c: New file.
* gdb.mi/mi-threads-interrupt.exp: New file.

8 years agoFix double prompt output after run control MI commands with mi-async on (PR 20045)
Simon Marchi [Tue, 17 May 2016 21:07:20 +0000 (17:07 -0400)]
Fix double prompt output after run control MI commands with mi-async on (PR 20045)

When you use a run control command (-exec-run, -exec-continue,
-exec-next, ...) with mi-async on, an extra (gdb) prompt is displayed:

  -exec-continue
  ^running
  *running,thread-id="all"
  (gdb)
  (gdb)

It doesn't seem to be a big problem for front-ends, since this behavior
started in gdb 7.9 and we haven't heard anything about that.  However,
it caused me some trouble while writing a test for PR 20039 [1].

The problem comes from an extra (gdb) prompt that we write when running
in mi-async off mode to emulate a past buggy behavior.  When executing a
run control command synchronously, previous gdbs always printed a prompt
right away, even though they are not ready to accept new MI commands
until the target stops.  Only at this time should they display a prompt.
But to keep backwards compatibility apparently, we print it anyway.
Since commit 198297aaf, the condition that decides whether we should
print that "bogus" prompt or not has become true, even when running with
mi-async on.  Since we already print a prompt at the end of the
asynchronous command execution, it results in two prompts for one
command.

The proposed fix is to call target_can_async_p instead of
target_is_async_p, to make the condition:

  if (!target_can_async_p () || sync_execution)
    ... show prompt ...

That shows the prompt if we are emulating a synchronous command on top
of an asynchronous target (sync_execution) or if the target simply can't
run asynchronously (!target_can_async_p ()).

Note that this code is changed and this bug fixed by Pedro's separate
console series, but I think it would be nice to have it fixed in the
mean time.

I ran the gdb.mi directory of the testsuite with mi-async on and off, I
didn't see any regressions.

gdb/ChangeLog:

* mi/mi-main.c (mi_on_resume): Call target_can_async_p instead
of target_is_async_p.

[1] https://sourceware.org/ml/gdb-patches/2016-05/msg00075.html

8 years agoMIPS/opcodes: Correct mixed MIPS16 and microMIPS disassembly
Maciej W. Rozycki [Wed, 18 May 2016 10:22:30 +0000 (11:22 +0100)]
MIPS/opcodes: Correct mixed MIPS16 and microMIPS disassembly

Mixing MIPS16 and microMIPS code in a single binary isn't usually
supported but GAS happily produces such code if requested.  However it
is not correctly disassembled even if a symbol table is available and
function symbols are correctly anotated with the ISA mode.  This is
because the ELF-header global microMIPS ASE flag takes precedence over
MIPS16 function annotation, causing them to be treated as regular MIPS
code.

Correct the problem by respecting function symbol anotation regardless
of the ELF-header flag.

binutils/
* testsuite/binutils-all/mips/mixed-mips16-micromips.d: New test.
* testsuite/binutils-all/mips/mixed-mips16-micromips.s: New test
source.
* testsuite/binutils-all/mips/mips.exp: Run the new test.

opcodes/
* mips-dis.c (is_compressed_mode_p): Add `micromips_p' operand,
replacing references to `micromips_ase' throughout.
(_print_insn_mips): Don't use file-level microMIPS annotation to
determine the disassembly mode with the symbol table.

8 years agoUpdated Swedish translations for bfd and binutils
Nick Clifton [Wed, 18 May 2016 11:44:43 +0000 (12:44 +0100)]
Updated Swedish translations for bfd and binutils

8 years agorx: make field type enum
Trevor Saunders [Sat, 14 May 2016 08:33:53 +0000 (04:33 -0400)]
rx: make field type enum

gas/ChangeLog:

2016-05-18  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-rx.c (struct cpu_type): Change the type of a field from
int to enum rx_cpu_types.

8 years agochange the type of some fields to bfd_reloc_code_real_type
Trevor Saunders [Sat, 14 May 2016 06:34:23 +0000 (02:34 -0400)]
change the type of some fields to bfd_reloc_code_real_type

gas/ChangeLog:

2016-05-18  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-dlx.c (struct machine_it): change the type of a field from
int to bfd_reloc_code_real_type.
* config/tc-tic4x.c: Likewise.

8 years agocommit ChangeLog for previous commit
Trevor Saunders [Wed, 18 May 2016 10:17:33 +0000 (06:17 -0400)]
commit ChangeLog for previous commit

8 years agoChange type of v850_target_arch to enum bfd_architecture
Trevor Saunders [Mon, 16 May 2016 22:04:17 +0000 (18:04 -0400)]
Change type of v850_target_arch to enum bfd_architecture

gas/ChangeLog:

2016-05-18  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-v850.c (v850_target_arch): change type to enum
bfd_architecture.
* config/tc-v850.h (v850_target_arch): Likewise.

8 years agoFix lots of linker testsuite failures for the FT32 target.
Nick Clifton [Wed, 18 May 2016 09:11:47 +0000 (10:11 +0100)]
Fix lots of linker testsuite failures for the FT32 target.

* scripttempl/ft32.sc: Use fixed constants for memory region
lengths.  Include DWARF debug sections.
(.data .bss): Do not assign locations during relocatable links.
* testsuite/ld-elf/compressed1d.d: Skip for FT32.
* testsuite/ld-elf/sec-to-seg.exp: Likewise.
* testsuite/ld-elf/sec64k.exp: Likewise.
* testsuite/ld-elf/init-fini-array.d: XFail for FT32.
* testsuite/ld-elf/merge.d: Likewise.
* testsuite/ld-elf/orphan-region.d: Likewise.
* testsuite/ld-elf/orphan.s: Likewise.
* testsuite/ld-elf/orphan3.d: Likewise.
* testsuite/ld-elf/pr349.d: Likewise.
* testsuite/ld-elf/warn2.d: Likewise.
* testsuite/lib/ld-lib.exp (check_shared_lib_support): Note
that the FT32 does not support shared libraries.

8 years agoelf32-arm.c build breakage
Alan Modra [Wed, 18 May 2016 06:14:46 +0000 (15:44 +0930)]
elf32-arm.c build breakage

* elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
for each BFD.  Don't goto error_ret_free_local from outside loop.

8 years agoMIPS/readelf: Use the `d_val' dynamic entry member with the relevant tags
Maciej W. Rozycki [Wed, 18 May 2016 03:30:50 +0000 (04:30 +0100)]
MIPS/readelf: Use the `d_val' dynamic entry member with the relevant tags

binutils/
* readelf.c (dynamic_section_mips_val) <DT_MIPS_RLD_VERSION>
<DT_MIPS_LOCAL_GOTNO, DT_MIPS_CONFLICTNO, DT_MIPS_LIBLISTNO>
<DT_MIPS_SYMTABNO, DT_MIPS_UNREFEXTNO, DT_MIPS_HIPAGENO>
<DT_MIPS_DELTA_CLASS_NO, DT_MIPS_DELTA_INSTANCE_NO>
<DT_MIPS_DELTA_RELOC_NO, DT_MIPS_DELTA_SYM_NO>
<DT_MIPS_DELTA_CLASSSYM_NO, DT_MIPS_COMPACT_SIZE>: Use the
`d_val' rather than `d_ptr' member of the dynamic entry.

8 years agoPPC_OPERAND_SIGNOPT range.
Alan Modra [Wed, 18 May 2016 01:57:56 +0000 (11:27 +0930)]
PPC_OPERAND_SIGNOPT range.

Commit b84bf58a accidentally extended the range of allowed negative
numbers.

* config/tc-ppc.c (ppc_insert_operand): Trim PPC_OPERAND_SIGNOPT
allowed negative range.
* testsuite/gas/ppc/power9.s: Test xxspltib of -128, not -256.
* testsuite/gas/ppc/power9.d: Update.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 May 2016 00:00:18 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoFix -exec-run not running asynchronously with mi-async on (PR gdb/18077)
Simon Marchi [Tue, 17 May 2016 20:44:57 +0000 (16:44 -0400)]
Fix -exec-run not running asynchronously with mi-async on (PR gdb/18077)

When doing -exec-run on a freshly started GDB, the only target on the
target stack at the time the dummy one.  When mi_async_p is called to
know whether the run should be async, it queries whether the current
target (dummy) supports async, and the answer is no.  The fix is to make
the code query the target that will be used for the run, which is not
necessarily the current target.

No regressions in the gdb.mi directory using the unix, native-gdbserver
and native-extended-gdbserver boards.  The test doesn't pass when
forcing maint set target-async off, obviously, since it makes mi-async
have no effect.  It doesn't seem like other tests are checking for that
eventuality, so I didn't in the new test.

gdb/ChangeLog:

* mi/mi-main.c (run_one_inferior): Use run target to determine
whether to run async or not.
(mi_cmd_exec_run): Likewise.

gdb/testsuite/ChangeLog:

* gdb.mi/mi-async-run.exp: New file.
* gdb.mi/mi-async-run.c: New file.

8 years agoRename OP_F90_RANGE to OP_RANGE.
Tom Tromey [Wed, 27 Apr 2016 16:28:56 +0000 (10:28 -0600)]
Rename OP_F90_RANGE to OP_RANGE.

This renames OP_F90_RANGE to OP_RANGE, and similarly renames the
f90_range_type enum.

2016-05-17  Tom Tromey  <tom@tromey.com>

* std-operator.def (OP_RANGE): Rename from OP_F90_RANGE.
* rust-lang.c: Don't include f-lang.h.
(rust_range, rust_compute_range, rust_subscript)
(rust_evaluate_subexp): Update.
* rust-exp.y: Don't include f-lang.h.
(ast_range, convert_ast_to_expression): Update.
* parse.c (operator_length_standard): Update.
* f-lang.h (enum f90_range_type): Move to expression.h.
* f-exp.y: Use OP_RANGE.
* expression.h (enum range_type): New enum; renamed from
f90_range_type.
* expprint.c: Don't include f-lang.h.
(print_subexp_standard, dump_subexp_body_standard): Use OP_RANGE.
* eval.c (value_f90_subarray, evaluate_subexp_standard): Update.

8 years agoAdd Rust documentation
Tom Tromey [Wed, 27 Apr 2016 01:38:56 +0000 (19:38 -0600)]
Add Rust documentation

This patch adds documentation for the new Rust support in gdb.

2016-05-17  Tom Tromey  <tom@tromey.com>

* NEWS: Add Rust item.

2016-05-17  Tom Tromey  <tom@tromey.com>

* gdb.texinfo (Supported Languages): Mention Rust.  Update menu.
(Rust): New node.

8 years agoUpdate gdb test suite for Rust
Tom Tromey [Wed, 27 Apr 2016 01:38:43 +0000 (19:38 -0600)]
Update gdb test suite for Rust

This updates the gdb test suite for Rust.

2016-05-17  Tom Tromey  <tom@tromey.com>
    Manish Goregaokar <manishsmail@gmail.com>

* lib/rust-support.exp: New file.
* lib/gdb.exp (skip_rust_tests): New proc.
(build_executable_from_specs): Handle rust.
* lib/future.exp (gdb_find_rustc): New proc.
(gdb_default_target_compile): Handle rust.
* gdb.rust/expr.exp: New file.
* gdb.rust/generics.exp: New file.
* gdb.rust/generics.rs: New file.
* gdb.rust/methods.exp: New file.
* gdb.rust/methods.rs: New file.
* gdb.rust/modules.exp: New file.
* gdb.rust/modules.rs: New file.
* gdb.rust/simple.exp: New file.
* gdb.rust/simple.rs: New file.

8 years agoAdd support for the Rust language
Tom Tromey [Wed, 27 Apr 2016 01:38:08 +0000 (19:38 -0600)]
Add support for the Rust language

This patch adds support for the Rust language.

2016-05-17  Tom Tromey  <tom@tromey.com>
    Manish Goregaokar <manishsmail@gmail.com>

* symtab.c (symbol_find_demangled_name): Handle Rust.
* symfile.c (init_filename_language_table): Treat ".rs" as Rust.
* std-operator.def (STRUCTOP_ANONYMOUS, OP_RUST_ARRAY): New
constants.
* rust-lang.h: New file.
* rust-lang.c: New file.
* rust-exp.y: New file.
* dwarf2read.c (read_file_scope): Add Rust producer sniffing.
(dwarf2_compute_name, read_func_scope, read_structure_type)
(read_base_type, read_subrange_type, set_cu_language)
(new_symbol_full, determine_prefix): Handle Rust.
* defs.h (enum language) <language_rust>: New constant.
* Makefile.in (SFILES): Add rust-exp.y, rust-lang.c.
(COMMON_OBS): Add rust-exp.o, rust-lang.o.

2016-05-17  Tom Tromey  <tom@tromey.com>

* gdb.base/default.exp (set language): Add rust.

8 years agoAdd array start and end strings to generic_val_print_decorations
Tom Tromey [Tue, 26 Apr 2016 22:45:21 +0000 (16:45 -0600)]
Add array start and end strings to generic_val_print_decorations

For Rust value-printing, I wanted to use generic_val_print_array, but
I also wanted to control the starting and ending strings.

This patch adds new strings to generic_val_print_decorations, updates
generic_val_print_array to use them, and updates all the existing
instances of generic_val_print_decorations.

2016-05-17  Tom Tromey  <tom@tromey.com>

* valprint.h (struct generic_val_print_array) <array_start,
array_end>: New fields.
* valprint.c (generic_val_print_array): Add "decorations"
parameter.  Use "array_start", "array_end".
(generic_val_print) <TYPE_CODE_ARRAY>: Update.
* p-valprint.c (p_decorations): Update.
* m2-valprint.c (m2_decorations): Update.
* f-valprint.c (f_decorations): Update.
* c-valprint.c (c_decorations): Update.

8 years agoAdd self-test framework to gdb
Tom Tromey [Wed, 20 Apr 2016 16:09:53 +0000 (10:09 -0600)]
Add self-test framework to gdb

I wanted to unit test the Rust lexer, so I added a simple unit testing
command to gdb.

The intent is that self tests will only be compiled into gdb in
development mode.  In release mode they simply won't exist.  So, this
exposes $development to C code as GDB_SELF_TEST.

In development mode, test functions are registered with the self test
module.  A test function is just a function that does some checks, and
throws an exception on failure.

Then this adds a new "maint selftest" command which invokes the test
functions, and a new dejagnu test case that invokes it.

2016-05-17  Tom Tromey  <tom@tromey.com>

* NEWS: Add "maint selftest" entry.
* selftest.h: New file.
* selftest.c: New file.
* maint.c: Include selftest.h.
(maintenance_selftest): New function.
(_initialize_maint_cmds): Add "maint selftest" command.
* configure.ac (GDB_SELF_TEST): Maybe define.
* config.in, configure: Rebuild.
* Makefile.in (SFILES): Add selftest.c.
(COMMON_OBS): Add selftest.o.

2016-05-17  Tom Tromey  <tom@tromey.com>

* gdb.texinfo (Maintenance Commands): Document "maint selftest".

2016-05-17  Tom Tromey  <tom@tromey.com>

* gdb.gdb/unittest.exp: New file.

8 years agoMake gdb expression debugging handle OP_F90_RANGE
Tom Tromey [Wed, 20 Apr 2016 14:14:16 +0000 (08:14 -0600)]
Make gdb expression debugging handle OP_F90_RANGE

print_subexp_standard and dump_subexp_body_standard did not handle
OP_F90_RANGE.  Attempting to dump an expression using this opcode
would fail.

This patch adds support for this opcode to these functions.

2016-05-17  Tom Tromey  <tom@tromey.com>

* expprint.c: Include f-lang.h.
(print_subexp_standard, dump_subexp_body_standard): Handle
OP_F90_RANGE.

8 years agoFix latent yacc-related bug in gdb/Makefile.in init.c rule
Tom Tromey [Thu, 31 Mar 2016 20:16:56 +0000 (14:16 -0600)]
Fix latent yacc-related bug in gdb/Makefile.in init.c rule

gdb's Makefile.in does not currently scan .y files to add global
initializers from these files to init.c.  However, at least ada-exp.y
tries to use this feature.

This patch fixes the problem.

2016-05-17  Tom Tromey  <tom@tromey.com>

* Makefile.in (init.c): Search .y files for initialization
functions.

8 years agoAdd DW_LANG_Rust
Tom Tromey [Mon, 16 May 2016 18:21:49 +0000 (12:21 -0600)]
Add DW_LANG_Rust

include/
* dwarf2.h (enum dwarf_source_language) <DW_LANG_Rust,
DW_LANG_Rust_old>: New constants.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235643 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoCheck global CC in at_least_gcc_version
H.J. Lu [Tue, 17 May 2016 16:55:05 +0000 (09:55 -0700)]
Check global CC in at_least_gcc_version

at_least_gcc_version should check global CC.

* testsuite/lib/ld-lib.exp (at_least_gcc_version): Check
global CC.

8 years agoFix date in ChangeLog
H.J. Lu [Tue, 17 May 2016 16:53:44 +0000 (09:53 -0700)]
Fix date in ChangeLog

8 years agoMake ARMv8-M GAS tests pass on non ELF targets
Thomas Preud'homme [Tue, 17 May 2016 15:35:12 +0000 (16:35 +0100)]
Make ARMv8-M GAS tests pass on non ELF targets

2016-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
* testsuite/gas/arm/archv8m-cmse-msr-base.d: Force Thumb when
disassembling and stop skipping targets.
* testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise.
* testsuite/gas/arm/archv8m-base.d: Also allow nops after the last
instruction for targets that have stronger alignment requirement.
* testsuite/gas/arm/archv8m-cmse-base.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-main-1.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-main-2.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-1.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-2.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-3.d: Likewise.
* testsuite/gas/arm/archv8m-main.d: Likewise.
* testsuite/gas/arm/archv8m.s: Add label.
* testsuite/gas/arm/archv8m-cmse.s: Likewise.
* testsuite/gas/arm/archv8m-cmse-msr.s: Likewise.
* testsuite/gas/arm/archv8m-cmse-main.s: Likewise.

8 years agoPlace progmem data from AVR's libc before other progmem data.
Senthil Kumar Selvaraj [Tue, 17 May 2016 12:14:26 +0000 (13:14 +0100)]
Place progmem data from AVR's libc before other progmem data.

* scripttempl/avr.sc (text): Place .progmem.data from avr-libc
above .progmem*.
* scripttempl/avrtiny.sc (text): Likewise.

8 years agoLD/ELF: Unify STB_GNU_UNIQUE handling
Maciej W. Rozycki [Mon, 16 May 2016 07:51:26 +0000 (08:51 +0100)]
LD/ELF: Unify STB_GNU_UNIQUE handling

Take STB_GNU_UNIQUE handling scattered across targets and gather it in
the generic ELF linker.  Update test suite infrastructure accordingly.

bfd/
* elf-s390-common.c (elf_s390_add_symbol_hook): Remove
STB_GNU_UNIQUE handling.
* elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
* elf32-arm.c (elf32_arm_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.
* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
* elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
(elf_backend_add_symbol_hook): Remove macro.
* elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
for STB_GNU_UNIQUE symbols.

binutils/
* testsuite/lib/binutils-common.exp (supports_gnu_unique): New
procedure.
* testsuite/binutils-all/objcopy.exp: Use `supports_gnu_unique'
with the `strip-10' test.

ld/
* testsuite/ld-unique/unique.exp: Use `is_elf_format' and
`supports_gnu_unique' to qualify testing.

8 years agoUse unsuspend_all_lwps
Yao Qi [Tue, 17 May 2016 07:24:26 +0000 (08:24 +0100)]
Use unsuspend_all_lwps

This patch is to replace find_inferior (&all_threads, unsuspend_one_lwp, NULL)
with unsuspend_all_lwps (NULL), which is shorter.  They are equivalent
to each other.

gdb/gdbserver:

2016-05-17  Yao Qi  <yao.qi@linaro.org>

* linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
instead of find_inferior.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 May 2016 00:00:18 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoMatch shell_prompt # in batch-preserve-term-settings.exp
Yao Qi [Mon, 16 May 2016 16:32:43 +0000 (17:32 +0100)]
Match shell_prompt # in batch-preserve-term-settings.exp

batch-preserve-term-settings.exp fails if the shell prompt isn't $.  It
is # in our testing env.  In fact, the shell prompt can be anything.

The perfect solution would be "set_board_info shell_prompt" in the
host board file, and use board_info shell_prompt in
batch-preserve-term-settings.exp.  This is a little bit overkill to
me, and we still need to figure out the different prompts on different
shells.  I also tried to start shell with the prompt preset, but there is
not unique way to set shell prompt in different shells, so I give up.

It is reasonably simple to match either $ or # for the shell prompt, and
we can easily extend it to match other char, like >.

gdb/testsuite:

2016-05-16  Yao Qi  <yao.qi@linaro.org>

* gdb.base/batch-preserve-term-settings.exp: Remove variable
shell_prompt.  Update shell_prompt_re.

8 years agoV850/BFD: Call `_bfd_elf_copy_private_bfd_data' again
Maciej W. Rozycki [Mon, 16 May 2016 07:22:59 +0000 (08:22 +0100)]
V850/BFD: Call `_bfd_elf_copy_private_bfd_data' again

Correct a regression introduced with commit 685080f21003 ("Adds support
for generating notes in V850 binaries.") which replaced rather than
extending the call to `_bfd_elf_copy_private_bfd_data' with
`v850_elf_copy_private_bfd_data'.  Consequently ELFOSABI_GNU marking is
not propagated to output by `objcopy' from objects containing
STB_GNU_UNIQUE symbols.

bfd/
* elf32-v850.c (v850_elf_copy_notes): New function, factored out
from...
(v850_elf_copy_private_bfd_data): ... here.  Call the new
function and `_bfd_elf_copy_private_bfd_data'.

binutils/
* testsuite/binutils-all/objcopy.exp: Don't skip the `strip-10'
test for the V850.

8 years agom32r: make mach_table static and const
Trevor Saunders [Sat, 14 May 2016 20:31:45 +0000 (16:31 -0400)]
m32r: make mach_table static and const

It is only read in tc-m32r.c, so it might as well be static and const, and
that should help the compiler slightly.

gas/ChangeLog:

2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-m32r.c (mach_table): Make static and const.

8 years agotc-vax.c: make prototype of flonum_gen2vax match its definition
Trevor Saunders [Sat, 14 May 2016 06:34:02 +0000 (02:34 -0400)]
tc-vax.c: make prototype of flonum_gen2vax match its definition

gas/ChangeLog:

2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-vax.c (flonum_gen2vax): Adjust prototype to match
definition.

8 years agostop defining linkrelax in multiple places
Trevor Saunders [Sat, 14 May 2016 04:34:05 +0000 (00:34 -0400)]
stop defining linkrelax in multiple places

Defining linkrelax to have different values in as.c and tc-msp430.c /
tc-mn10300.c is at least rather tricky, and seems fragile, when we can just set
it in md_begin instead.

gas/ChangeLog:

2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-mn10300.c (md_begin): set linkrelax here instead of
defining it.
* config/tc-msp430.c (md_begin): Likewise.

8 years agom68hc11: make some vars type bfd_reloc_code_real_type
Trevor Saunders [Sat, 14 May 2016 19:27:26 +0000 (15:27 -0400)]
m68hc11: make some vars type bfd_reloc_code_real_type

These variables only hold values from the bfd_reloc_code_real_type enum, and
are passed to functions that expect the argument to be of type
bfd_reloc_code_real_type, so it seems to make sense that there type is
bfd_reloc_code_real_type rather than int.

gas/ChangeLog:

2016-05-16  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/tc-m68hc11.c (fixup8): Change variables type from int to
bfd_reloc_code_real_type where appropriate.
(fixup16): Likewise.
(fixup8_xg): Likewise.

8 years agold/testsuite/ld-elf/flags1.d: Update the xfail list
Maciej W. Rozycki [Sun, 15 May 2016 05:49:54 +0000 (06:49 +0100)]
ld/testsuite/ld-elf/flags1.d: Update the xfail list

Update to match commit 924bc11ba455 ("Update section merge test.").

ld/
* testsuite/ld-elf/flags1.d: Update the xfail list.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 May 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoSH64/GAS: Fix a -Wwrite-strings build failure
Maciej W. Rozycki [Sun, 15 May 2016 22:14:52 +0000 (23:14 +0100)]
SH64/GAS: Fix a -Wwrite-strings build failure

Fix a commit 6757cf57697d ("enable -Wwrite-strings for gas") regression.

gas/
* config/tc-sh64.c (shmedia_check_limits): Constify `msg'.

8 years agold/testsuite/ld-elf/flags1.d: Update for `*-*-nacl*' xfail removal
Maciej W. Rozycki [Sun, 15 May 2016 05:39:14 +0000 (06:39 +0100)]
ld/testsuite/ld-elf/flags1.d: Update for `*-*-nacl*' xfail removal

ld/
* testsuite/ld-elf/flags1.d: Update for `*-*-nacl*' xfail
removal.

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 May 2016 00:00:08 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoRemove redundant sizeof on EXPECTED_VIEW_LENGTH
H.J. Lu [Sat, 14 May 2016 12:51:28 +0000 (05:51 -0700)]
Remove redundant sizeof on EXPECTED_VIEW_LENGTH

PR ld/20097
* testplug2.c (onall_symbols_read): Remove redundant sizeof
on EXPECTED_VIEW_LENGTH.
* testplug4.c (onall_symbols_read): Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 May 2016 00:00:14 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoAccept valid one byte signed and unsigned values for the IMM8 operand.
Peter Bergner [Fri, 13 May 2016 20:15:00 +0000 (15:15 -0500)]
Accept valid one byte signed and unsigned values for the IMM8 operand.

opcodes/
* ppc-opc.c (IMM8): Use PPC_OPERAND_SIGNOPT.

gas/
* testsuite/gas/ppc/power9.d <xxspltib>: Add additional operand tests.
* testsuite/gas/ppc/power9.s: Likewise.

8 years agoDon't convert GOTPCREL relocation against large section
H.J. Lu [Fri, 13 May 2016 17:59:32 +0000 (10:59 -0700)]
Don't convert GOTPCREL relocation against large section

bfd/

PR ld/20093
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
GOTPCREL relocation against large section.

ld/

PR ld/20093
* testsuite/ld-x86-64/pr20093-1.d: New file.
* testsuite/ld-x86-64/pr20093-1.s: Likewise.
* testsuite/ld-x86-64/pr20093-2.d: Likewise.
* testsuite/ld-x86-64/pr20093-2.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr20093-1 and pr20093-2.

8 years agoFix build breakage
Alan Modra [Fri, 13 May 2016 06:27:10 +0000 (15:57 +0930)]
Fix build breakage

* config/obj-coff.c (weak_uniquify): Delete unused var.

8 years agoSet dynamic tag VMA and size from dynamic section when possible
Alan Modra [Fri, 13 May 2016 02:18:56 +0000 (11:48 +0930)]
Set dynamic tag VMA and size from dynamic section when possible

Rather than searching the output for a specific named section, it's
better, where possible, to use a linker created dynamic section to set
a dynamic tag's value.  That way ld doesn't depend on the output
section name, making it possibile to map dynamic sections differently.

bfd/
* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
linker dynamic sections in calculating size and address of
* dynamic tags rather than using output sections.  Remove asserts.
* elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
* elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
* elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
* elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
* elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
* elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
* elflink.c (bfd_elf_final_link): Likewise.
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
* elfxx-sparc.c (sparc_finish_dyn): Likewise.  Adjust error message.
* elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
don't set doit.  Look up dynobj section.
(elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
invocation and dynamic tag vma calculation.  Don't test
boolean var == TRUE.
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
DT_JMPREL calc.
ld/
* testsuite/ld-arm/arm-elf.exp: Adjust for arm-no-rel-plt now passing.
Use different output file name for static app without .rel.plt.
* testsuite/ld-arm/arm-no-rel-plt.ld: Align .rel.dyn and .rela.dyn.
* testsuite/ld-arm/arm-no-rel-plt.out: Delete.
* testsuite/ld-arm/arm-no-rel-plt.r: New.
* testsuite/ld-arm/arm-static-app.d: Don't check file name.
* testsuite/ld-arm/arm-static-app.r: Likewise.

8 years agold -z combreloc elf_link_sort_relocs
Alan Modra [Fri, 13 May 2016 02:04:56 +0000 (11:34 +0930)]
ld -z combreloc elf_link_sort_relocs

A linker script may put .rela.plt in with other .rela.dyn relocs.
The change to elf_reloc_type_class puts any PLT relocs last.  This
patch makes the input section layout better match the sorted relocs.

* elflink.c (elf_link_sort_relocs): Wrap overlong lines.  Fix
octets_per_byte.  Put dynamic .rela.plt last in link orders.
Assign output_offset for reloc sections rather than writing
sorted relocs from block corresponding to output_offset.

8 years agouse XNEW and related macros more
Trevor Saunders [Wed, 6 Apr 2016 20:26:46 +0000 (16:26 -0400)]
use XNEW and related macros more

Its a bit shorter and simpler than raw xmalloc.

gas/ChangeLog:

2016-05-13  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* app.c (app_push): Use XNEW and related macros.
* as.c (parse_args): Likewise.
* cgen.c (make_right_shifted_expr): Likewise.
(gas_cgen_tc_gen_reloc): Likewise.
* config/bfin-defs.h: Likewise.
* config/bfin-parse.y: Likewise.
* config/obj-coff.c (stack_init): Likewise.
(stack_push): Likewise.
(coff_obj_symbol_new_hook): Likewise.
(coff_obj_symbol_clone_hook): Likewise.
(add_lineno): Likewise.
(coff_frob_symbol): Likewise.
* config/obj-elf.c (obj_elf_section_name): Likewise.
(build_group_lists): Likewise.
* config/obj-evax.c (evax_symbol_new_hook): Likewise.
* config/obj-macho.c (obj_mach_o_indirect_symbol): Likewise.
* config/tc-aarch64.c (insert_reg_alias): Likewise.
(find_or_make_literal_pool): Likewise.
(add_to_lit_pool): Likewise.
(fill_instruction_hash_table): Likewise.
* config/tc-alpha.c (load_expression): Likewise.
(emit_jsrjmp): Likewise.
(s_alpha_ent): Likewise.
(s_alpha_end): Likewise.
(s_alpha_linkage): Likewise.
(md_begin): Likewise.
(tc_gen_reloc): Likewise.
* config/tc-arc.c (arc_insert_opcode): Likewise.
(arc_extcorereg): Likewise.
* config/tc-bfin.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-crx.c (preprocess_reglist): Likewise.
* config/tc-d10v.c: Likewise.
* config/tc-frv.c (frv_insert_vliw_insn): Likewise.
(frv_tomcat_shuffle): Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-i370.c (i370_macro): Likewise.
* config/tc-i386.c (lex_got): Likewise.
(md_parse_option): Likewise.
* config/tc-ia64.c (alloc_record): Likewise.
(set_imask): Likewise.
(save_prologue_count): Likewise.
(dot_proc): Likewise.
(dot_endp): Likewise.
(ia64_frob_label): Likewise.
(add_qp_imply): Likewise.
(add_qp_mutex): Likewise.
(mark_resource): Likewise.
(dot_alias): Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c (m68k_frob_label): Likewise.
(s_save): Likewise.
(mri_control_label): Likewise.
(push_mri_control): Likewise.
(build_mri_control_operand): Likewise.
(s_mri_else): Likewise.
(s_mri_break): Likewise.
(s_mri_next): Likewise.
(s_mri_for): Likewise.
(s_mri_endw): Likewise.
* config/tc-metag.c (create_mnemonic_htab): Likewise.
* config/tc-microblaze.c: Likewise.
* config/tc-mmix.c (s_loc): Likewise.
* config/tc-nds32.c (nds32_relax_hint): Likewise.
* config/tc-nios2.c (nios2_insn_reloc_new): Likewise.
* config/tc-rl78.c: Likewise.
* config/tc-rx.c (rx_include): Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sh64.c (shmedia_frob_section_type): Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-spu.c: Likewise.
* config/tc-tic6x.c (static tic6x_unwind_info *tic6x_get_unwind): Likewise.
(tic6x_start_unwind_section): Likewise.
* config/tc-tilegx.c: Likewise.
* config/tc-tilepro.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-visium.c: Likewise.
* config/tc-xgate.c: Likewise.
* config/tc-xtensa.c (xtensa_translate_old_userreg_ops): Likewise.
(new_resource_table): Likewise.
(resize_resource_table): Likewise.
(xtensa_create_trampoline_frag): Likewise.
(xtensa_maybe_create_literal_pool_frag): Likewise.
(cache_literal_section): Likewise.
* config/xtensa-relax.c (append_transition): Likewise.
(append_condition): Likewise.
(append_value_condition): Likewise.
(append_constant_value_condition): Likewise.
(append_literal_op): Likewise.
(append_label_op): Likewise.
(append_constant_op): Likewise.
(append_field_op): Likewise.
(append_user_fn_field_op): Likewise.
(enter_opname_n): Likewise.
(enter_opname): Likewise.
(split_string): Likewise.
(parse_insn_templ): Likewise.
(clone_req_or_option_list): Likewise.
(clone_req_option_list): Likewise.
(parse_option_cond): Likewise.
(parse_insn_pattern): Likewise.
(parse_insn_repl): Likewise.
(build_transition): Likewise.
(build_transition_table): Likewise.
* dw2gencfi.c (alloc_fde_entry): Likewise.
(alloc_cfi_insn_data): Likewise.
(cfi_add_CFA_remember_state): Likewise.
(dot_cfi_escape): Likewise.
(dot_cfi_fde_data): Likewise.
(select_cie_for_fde): Likewise.
* dwarf2dbg.c (dwarf2_directive_loc): Likewise.
* ecoff.c (ecoff_add_bytes): Likewise.
(ecoff_build_debug): Likewise.
* input-scrub.c (input_scrub_push): Likewise.
(input_scrub_begin): Likewise.
(input_scrub_next_buffer): Likewise.
* itbl-ops.c (append_insns_as_macros): Likewise.
(alloc_entry): Likewise.
(alloc_field): Likewise.
* listing.c (listing_newline): Likewise.
(listing_listing): Likewise.
* macro.c (get_any_string): Likewise.
(delete_macro): Likewise.
* stabs.c (generate_asm_file): Likewise.
(stabs_generate_asm_lineno): Likewise.
* subsegs.c (subseg_change): Likewise.
(subseg_get): Likewise.
* symbols.c (define_dollar_label): Likewise.
(symbol_relc_make_sym): Likewise.
* write.c (write_relocs): Likewise.

8 years agouse xstrdup, xmemdup0 and concat more
Trevor Saunders [Mon, 28 Mar 2016 09:49:15 +0000 (05:49 -0400)]
use xstrdup, xmemdup0 and concat more

gas/ChangeLog:

2016-05-13  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/obj-coff.c (obj_coff_def): Simplify string copying.
(weak_name2altname): Likewise.
(weak_uniquify): Likewise.
(obj_coff_section): Likewise.
(obj_coff_init_stab_section): Likewise.
* config/obj-elf.c (obj_elf_section_name): Likewise.
(obj_elf_init_stab_section): Likewise.
* config/obj-evax.c (evax_shorten_name): Likewise.
* config/obj-macho.c (obj_mach_o_make_or_get_sect): Likewise.
* config/tc-aarch64.c (create_register_alias): Likewise.
* config/tc-alpha.c (load_expression): Likewise.
(s_alpha_file): Likewise.
(s_alpha_section_name): Likewise.
(tc_gen_reloc): Likewise.
* config/tc-arc.c (md_assemble): Likewise.
* config/tc-arm.c (create_neon_reg_alias): Likewise.
(start_unwind_section): Likewise.
* config/tc-hppa.c (pa_build_unwind_subspace): Likewise.
(hppa_elf_mark_end_of_function): Likewise.
* config/tc-nios2.c (nios2_modify_arg): Likewise.
(nios2_negate_arg): Likewise.
* config/tc-rx.c (rx_section): Likewise.
* config/tc-sh64.c (sh64_consume_datalabel): Likewise.
* config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
* config/tc-tic54x.c (tic54x_include): Likewise.
(tic54x_macro_info): Likewise.
(subsym_get_arg): Likewise.
(subsym_substitute): Likewise.
(tic54x_start_line_hook): Likewise.
* config/tc-xtensa.c (xtensa_literal_prefix): Likewise.
(xg_reverse_shift_count): Likewise.
* config/xtensa-relax.c (enter_opname_n): Likewise.
(split_string): Likewise.
* dwarf2dbg.c (get_filenum): Likewise.
(process_entries): Likewise.
* expr.c (operand): Likewise.
* itbl-ops.c (alloc_entry): Likewise.
* listing.c (listing_message): Likewise.
(listing_title): Likewise.
* macro.c (check_macro): Likewise.
* stabs.c (s_xstab): Likewise.
* symbols.c (symbol_relc_make_expr): Likewise.
* write.c (compress_debug): Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 May 2016 00:00:12 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoHandle symbols defined/referenced only within IR
H.J. Lu [Thu, 12 May 2016 23:50:34 +0000 (16:50 -0700)]
Handle symbols defined/referenced only within IR

The plugin is called to claim symbols in an archive element from
plugin_object_p.  But those symbols aren't needed to create output.
They are defined and referenced only within IR.  get_symbols should
return resolution based on IR symbol kinds.

PR ld/20070
* Makefile.am (noinst_LTLIBRARIES): Add libldtestplug4.la.
(libldtestplug4_la_SOURCES): New.
(libldtestplug4_la_CFLAGS): Likewise.
(libldtestplug4_la_LDFLAGS): Likewise.
* Makefile.in: Regenerated.
* plugin.c (get_symbols): Return resolution based on IR symbol
kinds for symbols defined/referenced only within IR.
* testplug4.c: New file.
* ld/testsuite/ld-plugin/pr20070.d: Likewise.
* ld/testsuite/ld-plugin/pr20070a.c: Likewise.
* ld/testsuite/ld-plugin/pr20070b.c: Likewise.
* testsuite/ld-plugin/plugin.exp (plugin4_name): New.
(plugin4_path): Likewise.
Add a test for ld/20070.

8 years agoPR symtab/19999 gdb unable to resolve vars with fission+PIE
Doug Evans [Thu, 12 May 2016 16:20:57 +0000 (09:20 -0700)]
PR symtab/19999 gdb unable to resolve vars with fission+PIE

gdb/ChangeLog:

* dwarf2loc.c (dwarf2_find_location_expression): For DWO files still
add base_offset.

gdb/testsuite/ChangeLog:

* lib/dwarf.exp (build_executable_from_fission_assembler): Pass
$options when building executable.
* gdb.dwarf2/fission-loclists-pie.c: New file.
* gdb.dwarf2/fission-loclists-pie.exp: New file.

8 years agoUse correct regexp syntax in ARM PR20068 test
Nick Clifton [Thu, 12 May 2016 16:19:44 +0000 (17:19 +0100)]
Use correct regexp syntax in ARM PR20068 test

8 years agold -z combreloc reloc sorting
Alan Modra [Thu, 12 May 2016 14:29:26 +0000 (23:59 +0930)]
ld -z combreloc reloc sorting

PLT relocs don't appear in .rela.dyn, at least not when using
normal linker scripts.  However, if they do, then they ought to be
placed last rather than in the middle of other relocs.

* elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 May 2016 00:00:11 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoUpdate pr20068 test to allow for big endian ARM configuration
Nick Clifton [Wed, 11 May 2016 17:04:03 +0000 (18:04 +0100)]
Update pr20068 test to allow for big endian ARM configuration

8 years agoAdd MIPS32 DSPr3 support.
Matthew Fortune [Wed, 26 Nov 2014 11:15:01 +0000 (11:15 +0000)]
Add MIPS32 DSPr3 support.

bfd/

* elfxx-mips.c (print_mips_ases): Add DSPR3.

binutils/

* readelf.c (print_mips_ases): Add DSPR3.

gas/

* config/tc-mips.c (options): Add OPTION_DSPR3 and
OPTION_NO_DSPR3.
(md_longopts): Likewise.
(md_show_usage): Add help for -mdspr3 and -mno-dspr3.
(mips_ases): Define availability for DSPr3.
(mips_ase_groups): Add ASE_DSPR3 to the DSP group.
(mips_convert_ase_flags): Map ASE_DSPR3 to AFL_ASE_DSPR3.
* doc/as.texinfo: Document -mdspr3, -mno-dspr3.  Fix -mdspr2
formatting.
* doc/c-mips.texi: Document -mdspr3, -mno-dspr3, .set dspr3 and
.set nodspr3.  Fix -mdspr2 formatting.
* testsuite/gas/mips/mips32-dspr3.d: New file.
* testsuite/gas/mips/mips32-dspr3.s: Likewise.
* testsuite/gas/mips/mips.exp: Run mips32-dspr3 test.

include/

* elf/mips.h (AFL_ASE_DSPR3): New macro.
(AFL_ASE_MASK): Update to include AFL_ASE_DSPR3.
* opcode/mips.h (ASE_DSPR3): New macro.

opcodes/

* mips-dis.c (mips_arch_choices): Add ASE_DSPR3 to mips32r6 and
mips64r6.
* mips-opc.c (D34): New macro.
(mips_builtin_opcodes): Define bposge32c for DSPr3.

8 years ago[HPPA] Attach linker created dynamic sections to stub bfd
Alan Modra [Wed, 11 May 2016 13:21:14 +0000 (22:51 +0930)]
[HPPA] Attach linker created dynamic sections to stub bfd

bfd/
* elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
(elf32_hppa_check_relocs): Don't set dynobj.
(elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
(elf32_hppa_build_stubs): Likewise.
* elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
ld/
* emultempl/hppaelf.em (hppaelf_create_output_section_statements):
Call elf32_hppa_init_stub_bfd.

8 years agold --gc-sections fail with __tls_get_addr_opt
Alan Modra [Wed, 11 May 2016 12:24:05 +0000 (21:54 +0930)]
ld --gc-sections fail with __tls_get_addr_opt

When --gc-sections is active, __tls_get_addr_opt is marked as not
needed and forced local before ppc*_elf_tls_setup is run.

bfd/
PR 20060
* elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
* elf32-ppc.c (ppc_elf_tls_setup): Likewise.
ld/
PR 20060
* testsuite/ld-powerpc/powerpc.exp: Run new tests.
* testsuite/ld-powerpc/tlsdll.s: New.
* testsuite/ld-powerpc/tlsdll.ver: New.
* testsuite/ld-powerpc/tlsdll_32.s: New.
* testsuite/ld-powerpc/tlsopt5.d: New.
* testsuite/ld-powerpc/tlsopt5.s: New.
* testsuite/ld-powerpc/tlsopt5_32.d: New.
* testsuite/ld-powerpc/tlsopt5_32.s: New.

8 years agoEnsure that padding in the constant pool uses constant values.
Nick Clifton [Wed, 11 May 2016 11:51:04 +0000 (12:51 +0100)]
Ensure that padding in the constant pool uses constant values.

PR target/20068
* config/tc-arm.c (add_to_lit_pool): Ensure that the padding added
to the pool uses O_constant.
* testsuite/gas/arm/pr20068.s: New test.
* testsuite/gas/arm/pr20068.d: Test driver.

8 years ago[AArch64] Remove redundant tls relax in elfNN_aarch64_final_link_relocate
Jiong Wang [Wed, 11 May 2016 10:55:02 +0000 (11:55 +0100)]
[AArch64] Remove redundant tls relax in elfNN_aarch64_final_link_relocate

bfd/
  * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
  aarch64_tls_transition check.

8 years agooops - fix up changelog entry
Nick Clifton [Wed, 11 May 2016 08:06:58 +0000 (09:06 +0100)]
oops - fix up changelog entry

8 years agoSkip new ARM security extension tests on non-ELF based targets.
Nick Clifton [Wed, 11 May 2016 08:04:17 +0000 (09:04 +0100)]
Skip new ARM security extension tests on non-ELF based targets.

* testsuite/gas/arm/archv8m-cmse-base.d: Skip for non-ELF ARM targets.
* testsuite/gas/arm/archv8m-cmse-main-1.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-main-2.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-msr-base.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-1.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-2.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-3.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise.

8 years agofix up two issues with the removal of unused variables
Trevor Saunders [Wed, 11 May 2016 01:33:45 +0000 (21:33 -0400)]
fix up two issues with the removal of unused variables

gdb/ChangeLog:

2016-05-10  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* iq2000-tdep.c (iq2000_scan_prologue): Remove if that shouldn't guard
anything.
* linespec.c (add_sal_to_sals): Restore call to symtab_to_fullname.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 May 2016 00:00:18 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoEnable Intel RDPID instruction.
Alexander Fomin [Tue, 10 May 2016 18:35:52 +0000 (21:35 +0300)]
Enable Intel RDPID instruction.

This patch enables Intel RDPID instruction described in Intel64 and
IA-32 Architectures Software Developer's Manual, April 2016.

gas/

* config/tc-i386.c (cpu_arch): Add RDPID.
* doc/c-i386.texi: Document RDPID.

gas/testsuite/

* gas/i386/i386.exp: Run RDPID tests.
* gas/i386/prefix.d: Adjust.
* gas/i386/rdpid.s: New test.
* gas/i386/rdpid.d: Ditto.
* gas/i386/rdpid-intel.d: Ditto.
* gas/i386/x86-64-rdpid.s: Ditto.
* gas/i386/x86-64-rdpid.d: Ditto.
* gas/i386/x86-64-rdpid-intel.d: Ditto.

opcodes/

* i386-dis.c (prefix_table): Add RDPID instruction.
* i386-gen.c (cpu_flag_init): Add RDPID flag.
(cpu_flags): Add RDPID bitfield.
* i386-opc.h (enum): Add RDPID element.
(i386_cpu_flags): Add RDPID field.
* i386-opc.tbl: Add RDPID instruction.
* i386-init.h: Regenerate.
* i386-tbl.h: Regenerate.

8 years agoAllow veneers to claim veneered symbols
Thomas Preud'homme [Tue, 10 May 2016 15:20:19 +0000 (16:20 +0100)]
Allow veneers to claim veneered symbols

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
enumerator.
(arm_stub_sym_claimed): New function.
(elf32_arm_create_stub): Use veneered symbol name and section if
veneer needs to claim its symbol, and keep logic unchanged otherwise.
(arm_stub_claim_sym): New function.
(arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
veneered symbol, otherwise create local symbol as before.

8 years agoUse getters/setters to access ARM branch type
Thomas Preud'homme [Tue, 10 May 2016 15:14:23 +0000 (16:14 +0100)]
Use getters/setters to access ARM branch type

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elf32-arm.c (elf32_arm_size_stubs): Use new macros
ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
and set branch type of a symbol.
(bfd_elf32_arm_process_before_allocation): Likewise.
(elf32_arm_relocate_section): Likewise and fix identation along the
way.
(allocate_dynrelocs_for_symbol): Likewise.
(elf32_arm_finish_dynamic_symbol): Likewise.
(elf32_arm_swap_symbol_in): Likewise.
(elf32_arm_swap_symbol_out): Likewise.

gas/
* config/tc-arm.c (arm_adjust_symtab): Use ARM_SET_SYM_BRANCH_TYPE to
set branch type of a symbol.

gdb/
* arm-tdep.c (arm_elf_make_msymbol_special): Use
ARM_GET_SYM_BRANCH_TYPE to get branch type of a symbol.

include/
* arm.h (enum arm_st_branch_type): Add new ST_BRANCH_ENUM_SIZE
enumerator.
(NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS): New macro.
(ENUM_ARM_ST_BRANCH_TYPE_BITMASK): Likewise.
(ARM_SYM_BRANCH_TYPE): Replace by ...
(ARM_GET_SYM_BRANCH_TYPE): This and ...
(ARM_SET_SYM_BRANCH_TYPE): This in two versions depending on whether
BFD_ASSERT is defined or not.

ld/
* emultempl/armelf.em (gld${EMULATION_NAME}_finish): Use
ARM_GET_SYM_BRANCH_TYPE to get branch type of a symbol.

opcodes/
* arm-dis.c (get_sym_code_type): Use ARM_GET_SYM_BRANCH_TYPE to get
branch type of a symbol.
(print_insn): Likewise.

8 years agoAllow stubs without associated input section in ARM backend
Thomas Preud'homme [Tue, 10 May 2016 14:45:01 +0000 (15:45 +0100)]
Allow stubs without associated input section in ARM backend

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
* bfd-in2.h: Regenerated.
* elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
parameter to add_stub_section callback.
(elf32_arm_create_or_find_stub_sec): Get output section from link_sec
and pass it down to add_stub_section.
(elf32_arm_add_stub): Set section to stub_sec if NULL before using it
for error message.
(elf32_arm_size_stubs): Add output section parameter to
add_stub_section function pointer parameter.

ld/
* emultempl/armelf.em (elf32_arm_add_stub_section): Add output_section
parameter and rename input_section parameter to after_input_section.
Append input stub section to the output section if after_input_section
is NULL.

8 years agoFactor our stub creation in ARM backend
Thomas Preud'homme [Tue, 10 May 2016 14:42:20 +0000 (15:42 +0100)]
Factor our stub creation in ARM backend

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elf32-arm.c (elf32_arm_create_stub): New function.
(elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.

8 years agoRefactor Cortex-A8 erratum workaround in preparation
Thomas Preud'homme [Tue, 10 May 2016 14:28:10 +0000 (15:28 +0100)]
Refactor Cortex-A8 erratum workaround in preparation

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elf32-arm.c (enum elf32_arm_stub_type): Delete
arm_stub_a8_veneer_lwm enumerator.
(arm_stub_a8_veneer_lwm): New unsigned constant to replace
aforementioned enumerator.
(struct elf32_arm_stub_hash_entry): Delete target_addend
field and add source_value.
(struct a8_erratum_fix): Delete addend field and add target_offset.
(stub_hash_newfunc): Initialize source_value field amd remove
initialization for target_addend.
(arm_build_one_stub): Stop special casing Thumb relocations: promote
the else to being always executed, moving the
arm_stub_a8_veneer_b_cond specific code in it.  Remove
stub_entry->target_addend from points_to computation.
(cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
to target symbol from start of section rather than the offset from the
stub address.
(elf32_arm_size_stubs): Set stub_entry's source_value and target_value
fields from struct a8_erratum_fix's offset and target_offset
respectively.
(make_branch_to_a8_stub): Rename target variable to loc.  Compute
veneered_insn_loc and loc using stub_entry's source_value.

8 years agoAdd support for ARMv8-M Mainline with DSP extension
Thomas Preud'homme [Tue, 10 May 2016 14:15:15 +0000 (15:15 +0100)]
Add support for ARMv8-M Mainline with DSP extension

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
(elf32_arm_merge_eabi_attributes): Add merging logic for
Tag_DSP_extension.

binutils/
* readelf.c (display_arm_attribute): Add output for Tag_DSP_extension.
(arm_attr_public_tags): Define DSP_extension attribute.

gas/
* NEWS: Document ARMv8-M and ARMv8-M Security and DSP Extensions.
* config/tc-arm.c (arm_ext_dsp): New feature for Thumb DSP
instructions.
(arm_extensions): Add dsp extension for ARMv8-M Mainline.
(aeabi_set_public_attributes): Memorize the feature bits of the
architecture selected for Tag_CPU_arch.  Use it to set
Tag_DSP_extension to 1 for ARMv8-M Mainline with DSP extension.
(arm_convert_symbolic_attribute): Define Tag_DSP_extension.
* testsuite/gas/arm/arch7em-bad.d: Rename to ...
* testsuite/gas/arm/arch7em-bad-1.d: This.
* testsuite/gas/arm/arch7em-bad-2.d: New file.
* testsuite/gas/arm/arch7em-bad-3.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-1.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-2.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-3.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-5.d: Likewise.
* testsuite/gas/arm/attr-march-armv8m.main.dsp.d: Likewise.

include/
* elf/arm.h (Tag_DSP_extension): Define.

ld/
* testsuite/ld-arm/arm-elf.exp (EABI attribute merging 10 (DSP)): New
test.
* testsuite/ld-arm/attr-merge-10b-dsp.s: New file.
* testsuite/ld-arm/attr-merge-10-dsp.attr: Likewise.

8 years agoAllow extension availability to depend on several architecture bits
Thomas Preud'homme [Tue, 10 May 2016 14:06:41 +0000 (15:06 +0100)]
Allow extension availability to depend on several architecture bits

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
* config/tc-arm.c (struct arm_option_extension_value_table): Make
allowed_archs an array with 2 entries.
(ARM_EXT_OPT): Adapt to only fill the first entry of allowed_archs.
(ARM_EXT_OPT2): New macro filling the two entries of allowed_archs.
(arm_extensions): Use separate entries in allowed_archs when several
archs are allowed to use an extension and change ARCH_ANY in
ARM_ARCH_NONE in allowed_archs.
(arm_parse_extension): Check that, for each allowed_archs entry, all
bits are set in the current architecture, ignoring ARM_ANY entries.
(s_arm_arch_extension): Likewise.

include/
* arm.h (ARM_FSET_CPU_SUBSET): Define macro.

8 years agoAdd support for ARMv8-M security extensions instructions
Thomas Preud'homme [Tue, 10 May 2016 14:01:53 +0000 (15:01 +0100)]
Add support for ARMv8-M security extensions instructions

2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
* config/tc-arm.c (arm_ext_m): Add feature bit ARM_EXT2_V8M_MAIN.
(arm_ext_v8m_main): New feature set for bit ARM_EXT2_V8M_MAIN.
(arm_ext_v8m_m_only): New feature set for instructions in ARMv8-M not
shared with a non M profile architecture.
(do_rn): New function.
(known_t32_only_insn): Check opcode against arm_ext_v8m_m_only rather
than arm_ext_v8m.
(v7m_psrs): Add ARMv8-M security extensions new special registers.
(insns): Add ARMv8-M Security Extensions instructions.
(aeabi_set_public_attributes): Use arm_ext_v8m_m_only instead of
arm_ext_v8m_m to decide the profile and the Thumb ISA.
* testsuite/gas/arm/archv8m-cmse.s: New file.
* testsuite/gas/arm/archv8m-cmse-main.s: Likewise..
* testsuite/gas/arm/archv8m-cmse-msr.s: Likewise.
* testsuite/gas/arm/any-cmse.d: Likewise.
* testsuite/gas/arm/any-cmse-main.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-base.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-msr-base.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-main-1.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-main-2.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise.

include/
* opcode/arm.h (ARM_EXT2_V8M_MAIN): new feature bit.
(ARM_AEXT2_V8M_MAIN): New architecture extension feature set.
(ARM_ARCH_V8M_MAIN): Use ARM_AEXT2_V8M_MAIN instead of ARM_AEXT2_V8M
for the high core bits.

opcodes/
* arm-dis.c (coprocessor_opcodes): Add entries for VFP ARMv8-M
Mainline Security Extensions instructions.
(thumb_opcodes): Add entries for narrow ARMv8-M Security
Extensions instructions.
(thumb32_opcodes): Add entries for wide ARMv8-M Security Extensions
instructions.
(psr_name): Add new MSP_NS and PSP_NS ARMv8-M Security Extensions
special registers.

8 years agobinutils/doc: Update documentation for nm --size-sort
Andrew Burgess [Fri, 29 Apr 2016 12:22:51 +0000 (13:22 +0100)]
binutils/doc: Update documentation for nm --size-sort

The documentation for 'nm --size-sort' is out of step with the code, the
special handling for ELF is not mentioned in the documentation, and
could cause confusion to a user.

binutils/ChangeLog:

* doc/binutils.texi (nm): Update description of --size-sort.

8 years ago2016-05-10 Christophe Lyon <christophe.lyon@linaro.org>
Christophe Lyon [Tue, 10 May 2016 07:33:08 +0000 (09:33 +0200)]
2016-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

* ld/testsuite/ld-elf/flags1.d (xfail): Remove *-*-nacl*".

8 years agoPR 20059 _bfd_elf_copy_link_hash_symbol_type segfault
Pip Cet [Tue, 10 May 2016 01:31:47 +0000 (11:01 +0930)]
PR 20059 _bfd_elf_copy_link_hash_symbol_type segfault

PR ld/20059
* elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
Define as _bfd_generic_copy_link_hash_symbol_type when using
generic hash table.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 May 2016 00:00:17 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoFix for PR gold/19987.
Han Shen [Fri, 6 May 2016 22:07:13 +0000 (15:07 -0700)]
Fix for PR gold/19987.

8 years agoFix seg fault objdumping a corrupt binary with an invalid sh_link field.
Nick Clifton [Mon, 9 May 2016 16:31:07 +0000 (17:31 +0100)]
Fix seg fault objdumping a corrupt binary with an invalid sh_link field.

PR binutils/20063
* elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
field before accessing sections array.

* readelf.c (get_32bit_section_headers): Warn if an out of range
sh_link or sh_info field is encountered.
(get_64bit_section_headers): Likewise.

8 years ago[ARM/STM32L4XX] PR 20030: --fix-stm32l4xx-629360 fails to create vldm/vpop veneers...
Christophe Monat [Mon, 9 May 2016 13:10:37 +0000 (15:10 +0200)]
[ARM/STM32L4XX] PR 20030: --fix-stm32l4xx-629360 fails to create vldm/vpop veneers for double-precision registers

bfd/
PR ld/20030
* elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
(stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
to nb_words.
(create_instruction_vldmia): Add is_dp to disambiguate SP/DP
encoding.
(create_instruction_vldmdb): Likewise.
(stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
uses it to re-encode.

ld/
PR ld/20030
* testsuite/ld-arm/arm-elf.exp: Run new stm32l4xx-fix-vldm-dp
tests. Fix misnamed stm32l4xx-fix-all.
* testsuite/ld-arm/stm32l4xx-fix-vldm-dp.s: New tests for multiple
loads with DP registers.
* testsuite/ld-arm/stm32l4xx-fix-vldm-dp.d: New reference file.
* testsuite/ld-arm/stm32l4xx-fix-vldm.s: Add missing comment.
* testsuite/ld-arm/stm32l4xx-fix-all.s: Add tests for multiple
loads with DP registers.
* testsuite/ld-arm/stm32l4xx-fix-all.d: Update reference.

8 years agoRevert accidental commit.
Nick Clifton [Mon, 9 May 2016 11:07:32 +0000 (12:07 +0100)]
Revert accidental commit.

PR 19938
* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
commit.

8 years agoUpdate section merge test.
Pitchumani Sivanupandi [Mon, 9 May 2016 11:04:16 +0000 (12:04 +0100)]
Update section merge test.

* testsuite/ld-elf/flags1.d (readelf): Dump section header instead
program headers.
(xfail): Remove avr-*-*.
Update regex to check the section flags.
* testsuite/ld-elf/merge.d (xfail): Remove avr-*-*.

8 years agoopcodes,gas: sparc: fix mnemonic of faligndatai
Jose E. Marchesi [Mon, 9 May 2016 11:09:53 +0000 (04:09 -0700)]
opcodes,gas: sparc: fix mnemonic of faligndatai

opcodes/ChangeLog:

2016-05-09  Jose E. Marchesi  <jose.marchesi@oracle.com>

* sparc-opc.c (sparc_opcodes): Fix mnemonic of faligndatai.

gas/ChangeLog:

2016-05-09  Jose E. Marchesi  <jose.marchesi@oracle.com>

* testsuite/gas/sparc/sparc5vis4.s: Fix mnemonic of faligndatai.
* testsuite/gas/sparc/sparc5vis4.d: Likewise.

8 years agoRegenerate configure
Alan Modra [Mon, 9 May 2016 07:54:30 +0000 (17:24 +0930)]
Regenerate configure

8 years agoFix ealphavms.c and eelf64_ia64_vms.c deps
Alan Modra [Mon, 9 May 2016 07:40:03 +0000 (17:10 +0930)]
Fix ealphavms.c and eelf64_ia64_vms.c deps

* Makefile.am (ealphavms.c, eelf64_ia64_vms): Correct .em deps.
* Makefile.in: Regenerate.

8 years agoRedundant hash table check
Alan Modra [Mon, 9 May 2016 07:38:35 +0000 (17:08 +0930)]
Redundant hash table check

* elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.

8 years agoCorrect script input section pattern
Alan Modra [Mon, 9 May 2016 07:37:33 +0000 (17:07 +0930)]
Correct script input section pattern

We don't want this to match .rela.text or similar.

* testsuite/ld-scripts/pr14962-2.t: Match .text, not *.text.
* testsuite/ld-scripts/rgn-at5.t: Similarly, .sec not *.sec.
* testsuite/ld-scripts/section-match-1.t: Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 May 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in

8 years agoremove trivialy unused variables
Trevor Saunders [Mon, 18 Apr 2016 17:16:27 +0000 (13:16 -0400)]
remove trivialy unused variables

gdb/ChangeLog:

2016-05-07  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Remove unused
variables.
* aarch64-tdep.c (aarch64_skip_prologue): Likewise.
(aarch64_scan_prologue): Likewise.
(aarch64_prologue_prev_register): Likewise.
(aarch64_dwarf2_prev_register): Likewise.
(pass_in_v): Likewise.
(aarch64_push_dummy_call): Likewise.
(aarch64_breakpoint_from_pc): Likewise.
(aarch64_return_in_memory): Likewise.
(aarch64_return_value): Likewise.
(aarch64_displaced_step_b_cond): Likewise.
(aarch64_displaced_step_cb): Likewise.
(aarch64_displaced_step_tb): Likewise.
(aarch64_gdbarch_init): Likewise.
(aarch64_process_record): Likewise.
* alpha-mdebug-tdep.c (alpha_mdebug_init_abi): Likewise.
* alpha-tdep.c (_initialize_alpha_tdep): Likewise.
* amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
* amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): Likewise.
* amd64-tdep.c (fixup_riprel): Likewise.
* amd64-windows-tdep.c (amd64_windows_frame_decode_epilogue): Likewise.
(amd64_windows_frame_decode_insns): Likewise.
(amd64_windows_frame_cache): Likewise.
(amd64_windows_frame_prev_register): Likewise.
(amd64_windows_frame_this_id): Likewise.
(amd64_windows_init_abi): Likewise.
* arm-linux-tdep.c (arm_linux_get_syscall_number): Likewise.
(arm_linux_get_next_pcs_syscall_next_pc): Likewise.
* arm-symbian-tdep.c (arm_symbian_init_abi): Likewise.
* arm-tdep.c (arm_make_epilogue_frame_cache): Likewise.
(arm_epilogue_frame_prev_register): Likewise.
(arm_record_vdata_transfer_insn): Likewise.
(arm_record_exreg_ld_st_insn): Likewise.
* auto-load.c (execute_script_contents): Likewise.
(print_scripts): Likewise.
* avr-tdep.c (avr_frame_prev_register): Likewise.
(avr_push_dummy_call): Likewise.
* bfin-linux-tdep.c (bfin_linux_sigframe_init): Likewise.
* bfin-tdep.c (bfin_gdbarch_init): Likewise.
* blockframe.c (find_pc_partial_function_gnu_ifunc): Likewise.
* break-catch-throw.c (fetch_probe_arguments): Likewise.
* breakpoint.c (breakpoint_xfer_memory): Likewise.
(breakpoint_init_inferior): Likewise.
(breakpoint_inserted_here_p): Likewise.
(software_breakpoint_inserted_here_p): Likewise.
(hardware_breakpoint_inserted_here_p): Likewise.
(bpstat_what): Likewise.
(break_range_command): Likewise.
(save_breakpoints): Likewise.
* coffread.c (coff_symfile_read): Likewise.
* cris-tdep.c (cris_push_dummy_call): Likewise.
(cris_scan_prologue): Likewise.
(cris_register_size): Likewise.
(_initialize_cris_tdep): Likewise.
* d-exp.y: Likewise.
* dbxread.c (dbx_read_symtab): Likewise.
(process_one_symbol): Likewise.
(coffstab_build_psymtabs): Likewise.
(elfstab_build_psymtabs): Likewise.
* dicos-tdep.c (dicos_init_abi): Likewise.
* disasm.c (do_mixed_source_and_assembly): Likewise.
(gdb_disassembly): Likewise.
* dtrace-probe.c (dtrace_process_dof): Likewise.
* dwarf2read.c (error_check_comp_unit_head): Likewise.
(build_type_psymtabs_1): Likewise.
(skip_one_die): Likewise.
(process_imported_unit_die): Likewise.
(dwarf2_physname): Likewise.
(read_file_scope): Likewise.
(setup_type_unit_groups): Likewise.
(create_dwo_cu_reader): Likewise.
(create_dwo_cu): Likewise.
(create_dwo_unit_in_dwp_v1): Likewise.
(create_dwo_unit_in_dwp_v2): Likewise.
(lookup_dwo_unit_in_dwp): Likewise.
(free_dwo_file): Likewise.
(check_producer): Likewise.
(dwarf2_add_typedef): Likewise.
(dwarf2_add_member_fn): Likewise.
(read_unsigned_leb128): Likewise.
(read_signed_leb128): Likewise.
(dwarf2_const_value): Likewise.
(follow_die_sig_1): Likewise.
(dwarf_decode_macro_bytes): Likewise.
* extension.c (restore_active_ext_lang): Likewise.
* frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
* ft32-tdep.c (ft32_analyze_prologue): Likewise.
* gdbtypes.c (lookup_typename): Likewise.
(resolve_dynamic_range): Likewise.
(check_typedef): Likewise.
* h8300-tdep.c (h8300_is_argument_spill): Likewise.
(h8300_gdbarch_init): Likewise.
* hppa-tdep.c (hppa32_push_dummy_call): Likewise.
(hppa_frame_this_id): Likewise.
(_initialize_hppa_tdep): Likewise.
* hppanbsd-tdep.c (hppanbsd_sigtramp_cache_init): Likewise.
* hppaobsd-tdep.c (hppaobsd_supply_fpregset): Likewise.
* i386-dicos-tdep.c (i386_dicos_init_abi): Likewise.
* i386-tdep.c (i386_bnd_type): Likewise.
(i386_gdbarch_init): Likewise.
(i386_mpx_bd_base): Likewise.
* i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Likewise.
* i386obsd-tdep.c (i386obsd_elf_init_abi): Likewise.
* ia64-tdep.c (examine_prologue): Likewise.
(ia64_frame_cache): Likewise.
(ia64_push_dummy_call): Likewise.
* infcmd.c (finish_command_fsm_async_reply_reason): Likewise.
(default_print_one_register_info): Likewise.
* infrun.c (infrun_thread_ptid_changed): Likewise.
(thread_still_needs_step_over): Likewise.
(stop_all_threads): Likewise.
(restart_threads): Likewise.
(keep_going_stepped_thread): Likewise.
* iq2000-tdep.c (iq2000_scan_prologue): Likewise.
* language.c (language_init_primitive_type_symbols): Likewise.
* linespec.c (add_sal_to_sals): Likewise.
* linux-nat.c (status_callback): Likewise.
(kill_unfollowed_fork_children): Likewise.
(linux_nat_kill): Likewise.
* linux-tdep.c (linux_fill_prpsinfo): Likewise.
* linux-thread-db.c (thread_db_notice_clone): Likewise.
(record_thread): Likewise.
* location.c (string_to_event_location_basic): Likewise.
* m32c-tdep.c (m32c_prev_register): Likewise.
* m32r-linux-tdep.c (m32r_linux_init_abi): Likewise.
* m32r-tdep.c (decode_prologue): Likewise.
* m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
* machoread.c (macho_symtab_read): Likewise.
(macho_symfile_read): Likewise.
(macho_symfile_offsets): Likewise.
* maint.c (set_per_command_cmd): Likewise.
* mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
(mi_cmd_stack_list_variables): Likewise.
* mi/mi-main.c (mi_cmd_exec_run): Likewise.
(output_register): Likewise.
(mi_cmd_execute): Likewise.
(mi_cmd_trace_define_variable): Likewise.
(print_variable_or_computed): Likewise.
* minsyms.c (prim_record_minimal_symbol_full): Likewise.
* mn10300-tdep.c (mn10300_frame_prev_register): Likewise.
* msp430-tdep.c (msp430_pseudo_register_write): Likewise.
* mt-tdep.c (mt_registers_info): Likewise.
* nios2-tdep.c (nios2_analyze_prologue): Likewise.
(nios2_push_dummy_call): Likewise.
(nios2_frame_unwind_cache): Likewise.
(nios2_stub_frame_cache): Likewise.
(nios2_stub_frame_sniffer): Likewise.
(nios2_gdbarch_init): Likewise.
* ppc-ravenscar-thread.c: Likewise.
* ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
* python/py-evts.c (add_new_registry): Likewise.
* python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
(bpfinishpy_detect_out_scope_cb): Likewise.
* python/py-framefilter.c (py_print_value): Likewise.
* python/py-inferior.c (infpy_write_memory): Likewise.
* python/py-infevents.c (create_inferior_call_event_object): Likewise.
* python/py-infthread.c (thpy_get_ptid): Likewise.
* python/py-linetable.c (ltpy_get_pcs_for_line): Likewise.
(ltpy_get_all_source_lines): Likewise.
(ltpy_is_valid): Likewise.
(ltpy_iternext): Likewise.
* python/py-symtab.c (symtab_and_line_to_sal_object): Likewise.
* python/py-unwind.c (pyuw_object_attribute_to_pointer): Likewise.
(unwind_infopy_str): Likewise.
* python/py-varobj.c (py_varobj_get_iterator): Likewise.
* ravenscar-thread.c (ravenscar_inferior_created): Likewise.
* rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
* rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Likewise.
* s390-linux-tdep.c (s390_supply_tdb_regset): Likewise.
(s390_frame_prev_register): Likewise.
(s390_dwarf2_frame_init_reg): Likewise.
(s390_record_vr): Likewise.
(s390_process_record): Likewise.
* score-tdep.c (score_push_dummy_call): Likewise.
(score3_analyze_prologue): Likewise.
* sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
* sh64-tdep.c (sh64_analyze_prologue): Likewise.
(sh64_push_dummy_call): Likewise.
(sh64_extract_return_value): Likewise.
(sh64_do_fp_register): Likewise.
* solib-aix.c (solib_aix_get_section_offsets): Likewise.
* solib-darwin.c (darwin_read_exec_load_addr_from_dyld): Likewise.
(darwin_solib_read_all_image_info_addr): Likewise.
* solib-dsbt.c (enable_break): Likewise.
* solib-frv.c (enable_break2): Likewise.
(frv_fdpic_find_canonical_descriptor): Likewise.
* solib-svr4.c (svr4_handle_solib_event): Likewise.
* sparc-tdep.c (sparc_skip_stack_check): Likewise.
* sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): Likewise.
* sparcobsd-tdep.c (sparc32obsd_init_abi): Likewise.
* spu-tdep.c (info_spu_dma_cmdlist): Likewise.
* stack.c (read_frame_local): Likewise.
* symfile.c (symbol_file_add_separate): Likewise.
(remove_symbol_file_command): Likewise.
* symmisc.c (maintenance_print_one_line_table): Likewise.
* symtab.c (symbol_cache_flush): Likewise.
(basic_lookup_transparent_type): Likewise.
(sort_search_symbols_remove_dups): Likewise.
* target.c (target_memory_map): Likewise.
(target_detach): Likewise.
(target_resume): Likewise.
(acquire_fileio_fd): Likewise.
(target_store_registers): Likewise.
* thread.c (print_thread_info_1): Likewise.
* tic6x-tdep.c (tic6x_analyze_prologue): Likewise.
* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Likewise.
* tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
(tilegx_analyze_prologue): Likewise.
(tilegx_stack_frame_destroyed_p): Likewise.
(tilegx_frame_cache): Likewise.
* tracefile.c (trace_save): Likewise.
* tracepoint.c (encode_actions_and_make_cleanup): Likewise.
(start_tracing): Likewise.
(print_one_static_tracepoint_marker): Likewise.
* tui/tui.c (tui_enable): Likewise.
* valops.c (value_struct_elt_bitpos): Likewise.
(find_overload_match): Likewise.
(find_oload_champ): Likewise.
* value.c (value_contents_copy_raw): Likewise.
* windows-tdep.c (windows_get_tlb_type): Likewise.
* x86-linux-nat.c (x86_linux_enable_btrace): Likewise.
* xcoffread.c (record_minimal_symbol): Likewise.
(scan_xcoff_symtab): Likewise.
* xtensa-tdep.c (execute_code): Likewise.
(xtensa_gdbarch_init): Likewise.
(_initialize_xtensa_tdep): Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 May 2016 00:00:19 +0000 (00:00 +0000)]
Automatic date update in version.in