]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
8 years agoFix the generation of alignment frags in code sections for AArch64.
Nick Clifton [Fri, 5 Aug 2016 09:37:57 +0000 (10:37 +0100)] 
Fix the generation of alignment frags in code sections for AArch64.

PR gas/20364
* config/tc-aarch64.c (s_ltorg): Change the mapping state after
aligning the frag.
(aarch64_init): Treat rs_align frags in code sections as
containing code, not data.
* testsuite/gas/aarch64/pr20364.s: New test.
* testsuite/gas/aarch64/pr20364.d: New test driver.

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Aug 2016 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

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

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Aug 2016 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoRemove _S version of ARM MSR/MRS special registers
Thomas Preud'homme [Thu, 25 Aug 2016 08:44:09 +0000 (09:44 +0100)] 
Remove _S version of ARM MSR/MRS special registers

2016-08-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

Backport from mainline
2016-08-25  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/tc-arm.c (v7m_psrs): Remove msp_s, MSP_S, psp_s and PSP_S
special registers.
* testsuite/gas/arm/archv8m-cmse-msr.s: Remove test for above special
registers.
* testsuite/gas/arm/archv8m-cmse-msr-base.d: Likewise.
* testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise.
* testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Aug 2016 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years ago[gold] Implement -z stack-size option
Roland McGrath [Tue, 23 Aug 2016 23:43:33 +0000 (16:43 -0700)] 
[gold] Implement -z stack-size option

gold/
* options.h (General_options): Grok -z stack-size.
* output.h (Output_segment::set_size): New method.
* layout.cc (Layout::create_executable_stack_info): Renamed to ...
(Layout::create_stack_segment): ... this.  Always create the
segment if -z stack-size was used.
(Layout::set_segment_offsets): Don't call ->set_offset on the
PT_GNU_STACK segment.

(cherry picked from commit 1130c90ed7c8d1bc7b70c701b62cdbc23ac9fc01)

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Aug 2016 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix extraneous complaints about missing expected TLS relocation (i386).
Cary Coutant [Wed, 17 Aug 2016 17:53:31 +0000 (10:53 -0700)] 
Fix extraneous complaints about missing expected TLS relocation (i386).

Build the test objects with the in-tree assembler. Also fix some cascading
error messages caused by not resetting the skip_call_tls_get_addr_ flag
after printing the error.

gold/
* i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
error message.
* testsuite/Makefile.am (pr20216a): Add missing dependencies.
(pr20308a): Add -Bgcctestdir/ to compile rules.
* testsuite/Makefile.in: Regenerate.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Aug 2016 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Aug 2016 00:01:11 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

8 years agoPR 20472, PowerPC64 ifunc confusion
Alan Modra [Fri, 19 Aug 2016 01:36:41 +0000 (11:06 +0930)] 
PR 20472, PowerPC64 ifunc confusion

This patch fixes quite a lot of confusion in allocate_dynrelocs over
ifuncs.  Function descriptors make ELFv1 quite different to ELFv2.

PR 20472
* elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test.
(readonly_dynrelocs): Comment fix.
(global_entry_stub): New function.
(ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test.  Match
ELFv2 code deciding on dynamic relocs vs. global entry stubs to
that in size_global_entry_stubs, handling ifunc too.  Delete dead
weak sym code.
(allocate_dynrelocs): Ensure dyn_relocs field is cleared when no
dyn_relocs are needed.  Correct handling of ifunc dyn_relocs.
Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for
undefweak syms.  Expand and correct comments.
(size_global_entry_stubs): Ensure symbol is defined.
(ppc64_elf_relocate_section): Match condition under which
dyn_relocs are emitted to that in allocate_dynrelocs.

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

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

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

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Aug 2016 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Aug 2016 00:01:12 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

8 years agoPR gold/20462: Fix bogus layout on ARM with linker script using PHDRS clause
Roland McGrath [Fri, 12 Aug 2016 16:55:25 +0000 (09:55 -0700)] 
PR gold/20462: Fix bogus layout on ARM with linker script using PHDRS clause

gold/
PR gold/20462
* script-sections.cc (Script_sections::release_segments):
Reset this->segments_created_.

(cherry picked from commit 3785f51aa2454dba199db8aafa80019795d536ec)

8 years ago[gold] Implement HIDDEN syntax in linker scripts
Roland McGrath [Fri, 12 Aug 2016 16:50:49 +0000 (09:50 -0700)] 
[gold] Implement HIDDEN syntax in linker scripts

gold/
* yyscript.y (HIDDEN): New %token.
(assignment): Handle HIDDEN(string = expr) syntax.
* script.cc (script_keyword_parsecodes): Add HIDDEN.

(cherry picked from commit f300578f78f5ecddc9cfb28c02d032a0acffdf70)

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

8 years agoPowerPC64 ELFv1 undefined weak functions
Alan Modra [Thu, 11 Aug 2016 03:00:52 +0000 (12:30 +0930)] 
PowerPC64 ELFv1 undefined weak functions

Undefined weak functions, like __gmon_start__, were not being made
dynamic or emitting plt call code.  While the behaviour of undefined
weak symbols is not defined in the ELF standard, the intention on
powerpc64 was to make it possible to link without a definition of such
symbols and at run time behave the same as if a definition was found
at link time in a shared library.

* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't exit with
non_got_ref true in any case where we could have generated dynbss
copies but decide not to do so.

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

8 years agoFix extraneous complaints about missing expected TLS relocation.
Cary Coutant [Wed, 10 Aug 2016 17:57:42 +0000 (10:57 -0700)] 
Fix extraneous complaints about missing expected TLS relocation.

With some versions of gas, the call to tls_get_addr uses a GOTPCREL
relocation instead of a GOTPCRELX relocation. We should allow for that
when skip_call_tls_get_addr_ is true. We should also build the test
objects with the in-tree assembler.

This patch also fixes some cascading error messages caused by not
resetting the skip_call_tls_get_addr_ flag after printing the error.

gold/
PR gold/20216
* x86_64.cc (Target_x86_64::Relocate::relocate): Add check for
R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing
error message.
* testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/.
(pr20216_ld.o): Likewise.
* testsuite/Makefile.in: Regenerate.

8 years agoFix potential crashes when Target::make_symbol() returns NULL.
James Clarke [Wed, 10 Aug 2016 16:58:01 +0000 (09:58 -0700)] 
Fix potential crashes when Target::make_symbol() returns NULL.

2016-08-10  James Clarke  <jrtc27@jrtc27.com>

gold/
PR gold/20443
* symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols,
which will be present for STT_SPARC_REGISTER.
(Symbol_table::add_from_pluginobj): Likewise.
(Symbol_table::add_from_dynobj): Likewise.
(Symbol_table::add_from_incrobj): Removed dead code.

8 years agoFix improper handling of R_SPARC_GOTDATA_OP_LOX10 relocation.
James Clarke [Wed, 10 Aug 2016 16:47:45 +0000 (09:47 -0700)] 
Fix improper handling of R_SPARC_GOTDATA_OP_LOX10 relocation.

The fall-through in Target_sparc::Relocate::relocate for
R_SPARC_GOTDATA_OP_LOX10 is currently R_SPARC_GOT13, but should
clearly be R_SPARC_GOT10. GCC has been seen to emit a sethi/xor
rather than a sethi/or sequence to load a 32-bit immediate, but
if R_SPARC_GOT13 is used then bits 10-12 get zeroed out as both
the sethi and xor immediates contain them.

gold/
PR gold/20442
* sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10
should fall back on R_SPARC_GOT10, not R_SPARC_GOT13.

8 years agoAdd support for R_SPARC_32 relocation.
James Clarke [Wed, 10 Aug 2016 16:42:39 +0000 (09:42 -0700)] 
Add support for R_SPARC_32 relocation.

gold/
PR gold/20441
* sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on
sparc64.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Aug 2016 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoSupport -pie for arm*-eabi targets.
Roland McGrath [Tue, 9 Aug 2016 19:09:17 +0000 (12:09 -0700)] 
Support -pie for arm*-eabi targets.

ld/
* emulparams/armelf.sh (GENERATE_PIE_SCRIPT): Set to yes.

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Aug 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

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

8 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Aug 2016 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Aug 2016 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix the generation of GOT table entries for the SH in the presence of linker garbage...
Nick Clifton [Thu, 4 Aug 2016 15:00:27 +0000 (16:00 +0100)] 
Fix the generation of GOT table entries for the SH in the presence of linker garbage collection.

PR ld/17739
* emulparams/shelf.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Define with
ld valye 'yes'.
* emulparams/shelf32.sh: Likewise.
* emulparams/shelf32.sh: Likewise.
* emulparams/shelf_nto.sh: Likewise.
* emulparams/shelf_nto.sh: Likewise.
* emulparams/shelf_vxworks.sh: Likewise.
* emulparams/shelf_vxworks.sh: Likewise.
* emulparams/shlelf32_linux.sh: Likewise.
* emulparams/shlelf32_linux.sh: Likewise.
* emulparams/shlelf_linux.sh: Likewise.
* emulparams/shlelf_linux.sh: Likewise.
* emulparams/shlelf_nto.sh: Likewise.
* emulparams/shlelf_nto.sh: Likewise.

bfd * elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
(elf_backend_sweep_hook): Delete.

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Aug 2016 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoBump to 2.27.0
Tristan Gingold [Wed, 3 Aug 2016 09:51:15 +0000 (11:51 +0200)] 
Bump to 2.27.0

bfd/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

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

binutils/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

8 years agoRelease 2.27 binutils-2_27
Tristan Gingold [Wed, 3 Aug 2016 09:24:16 +0000 (11:24 +0200)] 
Release 2.27

bfd/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

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

binutils/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2016-08-03  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

8 years agoRegenerate pot files.
Tristan Gingold [Wed, 3 Aug 2016 08:24:46 +0000 (10:24 +0200)] 
Regenerate pot files.

8 years agoPowerPC64 ld segfault with code in non-executable sections
Alan Modra [Tue, 2 Aug 2016 13:58:47 +0000 (23:28 +0930)] 
PowerPC64 ld segfault with code in non-executable sections

PR ld/20428
* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.

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

8 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Aug 2016 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Aug 2016 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

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

8 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Jul 2016 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Jul 2016 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoFix seg fault in linker when performing garbage collection on COFF based targets.
Nick Clifton [Wed, 27 Jul 2016 12:18:13 +0000 (13:18 +0100)] 
Fix seg fault in linker when performing garbage collection on COFF based targets.

PR ld/20401
bfd * coffgen.c (fini_reloc_cookie_rels): Check for the extistence
of the coff_section_data before using it.

8 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 Jul 2016 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

8 years agoSupport -pie for aarch64*-elf targets.
Roland McGrath [Tue, 19 Jul 2016 17:19:06 +0000 (10:19 -0700)] 
Support -pie for aarch64*-elf targets.

ld/
* emulparams/aarch64elf.sh (GENERATE_PIE_SCRIPT): Set to yes.
* emulparams/aarch64elf32.sh: Likewise.

(cherry picked from commit 3af09e8db3084f5e03b7f09768a2ab6415418e63)

9 years agoExpect the 'objcopy without global symbols' test to fail for AArch64 and ARM targets.
Nick Clifton [Fri, 1 Jul 2016 09:35:53 +0000 (10:35 +0100)] 
Expect the 'objcopy without global symbols' test to fail for AArch64 and ARM targets.

* testsuite/binutils-all/objcopy.exp
(objcopy_test_without_global_symbol): Expect this test to fail on
the AArch64 and ARM targets, since they preserve their mapping
symbols.

9 years agoBump version to 2.26.90 (on branch 2.27)
Tristan Gingold [Fri, 1 Jul 2016 09:14:55 +0000 (11:14 +0200)] 
Bump version to 2.26.90 (on branch 2.27)

bfd/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

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

binutils/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoBump version to 2.27.51
Tristan Gingold [Fri, 1 Jul 2016 09:04:44 +0000 (11:04 +0200)] 
Bump version to 2.27.51

bfd/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

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

binutils/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoAdd marker for 2.27 branch.
Tristan Gingold [Fri, 1 Jul 2016 08:57:46 +0000 (10:57 +0200)] 
Add marker for 2.27 branch.

binutils/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.27.

gas/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.27.

ld/
2016-07-01  Tristan Gingold  <gingold@adacore.com>

* NEWS: Add marker for 2.27.

9 years agoFix mis-placement in binutils.texi
Tristan Gingold [Wed, 29 Jun 2016 10:09:06 +0000 (12:09 +0200)] 
Fix mis-placement in binutils.texi

binutils/
* doc/binutils.texi (objdump): Fix mis-placement.

9 years agox86-64/MPX: bndmk, bndldx, and bndstx don't allow RIP-relative addressing
Jan Beulich [Fri, 1 Jul 2016 07:07:15 +0000 (09:07 +0200)] 
x86-64/MPX: bndmk, bndldx, and bndstx don't allow RIP-relative addressing

Additionally warn about scaling factors other than 1 for the latter
two, as those get ignored by the hardware.

9 years agox86/MPX: fix address size handling
Jan Beulich [Fri, 1 Jul 2016 07:06:16 +0000 (09:06 +0200)] 
x86/MPX: fix address size handling

While address overrides are ignored in 64-bit mode (and hence shouldn't
really result in an error, but upon v1 converting this to a warning I
was told otherwise), trying to use 16-bit addressing is documented to
result in #UD, and hence the assembler should reject the attempt. (The
added test case at once also checks that bndc{l,n,u} won't accept
16-bit register operands.)

9 years agox86/Intel: don't accept bogus instructions
Jan Beulich [Fri, 1 Jul 2016 07:03:02 +0000 (09:03 +0200)] 
x86/Intel: don't accept bogus instructions

... due to their last byte looking like a suffix, when after its
stripping a matching instruction can be found. Since memory operand
size specifiers in Intel mode get converted into suffix representation
internally, we need to keep track of the actual mnemonic suffix which
may have got trimmed off, and check its validity while looking for a
matching template. I tripper over this quite some time again after
support for AMD's SSE5 instructions got removed, as at that point some
of the SSE5 mnemonics, other than expected, didn't fail to assemble.
But the problem affects many more instructions, namely (almost) all
MMX, SSE, and AVX ones as it looks. I don't think it makes sense to
add a testcase covering all of them, nor do I think it makes sense to
pick out some random examples for a new test case.

9 years agox86: allow suffix-less movzw and 64-bit movzb
Jan Beulich [Fri, 1 Jul 2016 07:01:41 +0000 (09:01 +0200)] 
x86: allow suffix-less movzw and 64-bit movzb

... just like is already the case for 16- and 32-bit movzb: I can't see
why omitting suffixes on this (and movs{b,w,l}) is not allowed, when it
is allowed for all other instructions where the suffix is redundant
with (one of) the operands.

9 years agox86: remove stray instruction attributes
Jan Beulich [Fri, 1 Jul 2016 06:57:21 +0000 (08:57 +0200)] 
x86: remove stray instruction attributes

- with Cpu64 Disp16 makes no sense for memory operands
- with CpuNo64 Disp32S makes no sense
- non-64-bit lgdt doesn't allow 10-byte operands

9 years agox86/Intel: fix operand checking for MOVSD
Jan Beulich [Fri, 1 Jul 2016 06:56:13 +0000 (08:56 +0200)] 
x86/Intel: fix operand checking for MOVSD

The dual purpose mnemonic (string move vs scalar double move) breaks
the assumption that the isstring flag would be set on both the first
and last entry in the current set of templates, which results in bogus
or missing diagnostics for the string move variant of the mnemonic.
Short of mostly rewriting i386_index_check() and its interaction with
the rest of the code, simply shrink the template set to just string
instructions when encountering the second memory operand, and run
i386_index_check() a second time for the first memory operand after
that reduction.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Jul 2016 00:00:22 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoMIPS/GAS: Fix a comment typo in `get_append_method'
Maciej W. Rozycki [Thu, 30 Jun 2016 20:49:54 +0000 (21:49 +0100)] 
MIPS/GAS: Fix a comment typo in `get_append_method'

gas/
* config/tc-mips.c (get_append_method): Fix a comment typo.

9 years agoChangeLog entry for the --with-cpu patch for ARC configuration.
Andrew Burgess [Thu, 30 Jun 2016 15:53:20 +0000 (16:53 +0100)] 
ChangeLog entry for the --with-cpu patch for ARC configuration.

9 years agoFix typo in comment
Yao Qi [Thu, 30 Jun 2016 15:03:07 +0000 (16:03 +0100)] 
Fix typo in comment

This patch fixes the typo "uf" in the comment.  I'll push it in as the
change is obvious.

2016-06-30  Yao Qi  <yao.qi@linaro.org>

* arm-dis.c (print_insn): Fix typo in comment.

9 years agoMIPS16/GAS: Fix delay slot filling across frags
Matthew Fortune [Thu, 30 Jun 2016 14:02:20 +0000 (15:02 +0100)] 
MIPS16/GAS: Fix delay slot filling across frags

Fix an assertion failure like:

test.s: Assembler messages:
test.s:3: Internal error!
Assertion failure in append_insn at .../gas/config/tc-mips.c:7523.
Please report this bug.

triggered by assembling MIPS16 code like:

hello:
addiu $4, $4, 4
jr $31

with the generation of a listing file enabled, e.g.:

$ as -mips16 -O2 -aln=test.lst

The cause of the problem is the lack of support for moving instructions
across frags in MIPS16 jump swapping, which triggers more easily with
listing enabled as in that case every instruction gets placed in its own
frag.  It would trigger even with listing disabled though if the
instruction to swap a MIPS16 jump with was unfortunately enough placed
as last in a frag that became full.

This scenario is already handled correctly with branch swapping in
regular MIPS and microMIPS code, so reuse it for MIPS16 code as well,
and now that all MIPS16 handling has become the same as the regular MIPS
and microMIPS cases remove MIPS16 special casing altogether.

This effectively complements:

commit 464ab0e55ade01d2bb0b4fa45c429af7a2f85a26
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Mon Aug 6 20:33:00 2012 +0000

<https://sourceware.org/ml/binutils/2012-08/msg00043.html>, ("MIPS/GAS:
Correct microMIPS branch swapping assertion") for the MIPS16 case.

The assertion itself was introduced with:

commit 1e91584932efd70020c8c98037d0cb93a0552a20
Author: Richard Sandiford <rdsandiford@googlemail.com>
Date:   Wed Mar 9 09:17:02 2005 +0000

<https://sourceware.org/ml/binutils/2005-03/msg00217.html>, ("Rework
MIPS nop-insertion code, add -mfix-vr4130 [5/11]"), but its introduction
merely noted our existing lack of support for MIPS16 jump swapping
across frags.

gas/
* config/tc-mips.c (append_insn) <APPEND_SWAP>: Do not special
case MIPS16 handling.
* testsuite/gas/mips/branch-swap-3.d: New test.
* testsuite/gas/mips/branch-swap-4.d: New test.
* testsuite/gas/mips/mips16@branch-swap-3.d: New test.
* testsuite/gas/mips/mips16@branch-swap-4.d: New test.
* testsuite/gas/mips/micromips@branch-swap-3.d: New test.
* testsuite/gas/mips/micromips@branch-swap-4.d: New test.
* testsuite/gas/mips/branch-swap-3.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.

9 years agoMIPS/GAS: Simplify non-MIPS16 branch swapping sequence
Maciej W. Rozycki [Thu, 30 Jun 2016 11:46:47 +0000 (12:46 +0100)] 
MIPS/GAS: Simplify non-MIPS16 branch swapping sequence

Simplify non-MIPS16 branch swapping by copying the MIPS16 variant, which
sets the new position for the current instruction first and reduces the
calculation of the new position of the previous instruction.  Also refer
to previous instruction's frag and position via `delay' for consistency.

Reintroduce an explanatory comment, updated, previously removed with:

commit 1e91584932efd70020c8c98037d0cb93a0552a20
Author: Richard Sandiford <rdsandiford@googlemail.com>
Date:   Wed Mar 9 09:17:02 2005 +0000

<https://sourceware.org/ml/binutils/2005-03/msg00217.html>, ("Rework
MIPS nop-insertion code, add -mfix-vr4130 [5/11]").

gas/
* config/tc-mips.c (append_insn): Simplify non-MIPS16 branch
swapping sequence.

9 years agoPR gas/20312: Do not pad sections to alignment on failed assembly
Maciej W. Rozycki [Wed, 29 Jun 2016 00:38:50 +0000 (01:38 +0100)] 
PR gas/20312: Do not pad sections to alignment on failed assembly

Correct a regression from commit 85024cd8bcb9 ("Run write_object_file
after errors") causing unsuccessful assembly, which may be due to any
reason, such as supplying a valid source like this:

.text
.byte 0
.err

to terminate with an assertion failure like:

test.s: Assembler messages:
test.s:3: Error: .err encountered
../as-new: BFD (GNU Binutils) 2.24.51.20140628 internal error, aborting at .../gas/write.c line 608 in size_seg
../as-new: Please report this bug.

on targets whose default text section alignment is above 0, typically
RISC machines.

This is due to an attempt to set last text section's frag alignment to
0, requested from `subsegs_finish_section' where `frag_align_code
(alignment, 0)' is called with `alignment' set to 0 rather than the
section alignment if `had_errors' has returned true.  The call to
`subsegs_finish_section' is made from `subsegs_finish' from
`write_object_file' at unsuccessful completion, which previously wasn't
made.

Always set last section's frag alignment from the section alignment
then, forcing no section padding instead if completing unsuccessfully,
so that in that case alignment padding is still suppressed from any
listing generated, fixing assertion failures for these targets:

alpha-linuxecoff  -FAIL: all pr20312
arm-aout  -FAIL: all pr20312
mips-freebsd  -FAIL: all pr20312
mips-img-linux  -FAIL: all pr20312
mips-linux  -FAIL: all pr20312
mips-mti-linux  -FAIL: all pr20312
mips-netbsd  -FAIL: all pr20312
mips-sgi-irix5  -FAIL: all pr20312
mips-sgi-irix6  -FAIL: all pr20312
mips-vxworks  -FAIL: all pr20312
mips64-freebsd  -FAIL: all pr20312
mips64-img-linux  -FAIL: all pr20312
mips64-linux  -FAIL: all pr20312
mips64-mti-linux  -FAIL: all pr20312
mips64-openbsd  -FAIL: all pr20312
mips64el-freebsd  -FAIL: all pr20312
mips64el-img-linux  -FAIL: all pr20312
mips64el-linux  -FAIL: all pr20312
mips64el-mti-linux  -FAIL: all pr20312
mips64el-openbsd  -FAIL: all pr20312
mipsel-freebsd  -FAIL: all pr20312
mipsel-img-linux  -FAIL: all pr20312
mipsel-linux  -FAIL: all pr20312
mipsel-mti-linux  -FAIL: all pr20312
mipsel-netbsd  -FAIL: all pr20312
mipsel-vxworks  -FAIL: all pr20312
mipsisa32-linux  -FAIL: all pr20312
mipsisa32el-linux  -FAIL: all pr20312
mipsisa64-linux  -FAIL: all pr20312
mipsisa64el-linux  -FAIL: all pr20312
sh-pe  -FAIL: all pr20312
sparc-aout  -FAIL: all pr20312

gas/
PR gas/20312
* write.c (subsegs_finish_section): Force no section padding to
alignment on failed assembly, always set last frag's alignment
from section.
* testsuite/gas/all/pr20312.l: New list test.
* testsuite/gas/all/pr20312.s: New test source.
* testsuite/gas/all/gas.exp: Run the new test

9 years agoFix gdbserver/MI testing regression
Pedro Alves [Thu, 30 Jun 2016 10:55:22 +0000 (11:55 +0100)] 
Fix gdbserver/MI testing regression

Commit 51f77c3704a6 ("Add testing infrastruture bits for running with
MI on a separate UI") broke MI testing with native-gdbserver:

 $ make check RUNTESTFLAGS="--target_board=native-gdbserver mi-var-child.exp"
 ...
 Running .../src/binutils-gdb/gdb/testsuite/gdb.mi/mi-var-child.exp ...
 can't unset "inferior_spawn_id": no such variable
     while executing
 "unset inferior_spawn_id"
     (procedure "close_gdbserver" line 20)
     invoked from within
 "close_gdbserver"
 ...

When testing with gdbserver, gdb_exit is overridden with a special
version that calls close_gdbserver, which clears inferior_spawn_id.
The problem is that the commit mentioned above made
gdb_exit/mi_gdb_exit clear inferior_spawn_id too, and clearing a
non-existing variable is a tcl error.

Since gdb_exit/mi_gdb_exit always clears inferior_spawn_id now, the
fix is simply to stop clearing it in close_gdbserver.

gdb/testsuite/
2016-06-30  Pedro Alves  <palves@redhat.com>

* lib/gdbserver-support.exp (close_gdbserver, gdb_exit): Don't
unset inferior_spawn_id.

9 years agoMake testing gdb with FORCE_SEPARATE_MI_TTY=1 actually work
Pedro Alves [Thu, 30 Jun 2016 10:55:21 +0000 (11:55 +0100)] 
Make testing gdb with FORCE_SEPARATE_MI_TTY=1 actually work

Runing the whole gdb testsuite with MI on a separate tty, with:

  make check RUNTESTFLAGS="FORCE_SEPARATE_MI_TTY=1"

Doesn't actually work because commit 51f77c3704a6 ("Add testing
infrastruture bits for running with MI on a separate UI") included a
last-minute rename typo, now fixed with this commit.

gdb/testsuite/ChangeLog:
2016-06-30  Pedro Alves  <palves@redhat.com>

* lib/mi-support.exp (default_mi_gdb_start): Declare global
FORCE_SEPARATE_MI_TTY, not SEPARATE_MI_TTY.

9 years agoAllow ARC target to be configured with --with-cpu=<cpu-name>.
Andrew Burgess [Thu, 30 Jun 2016 10:14:41 +0000 (11:14 +0100)] 
Allow ARC target to be configured with --with-cpu=<cpu-name>.

gas * config.in (TARGET_WITH_CPU): Undefine.
* configure.ac: Add --with-cpu support, and define in config.h.
* configure: Regenerate.
* config/tc-arc.c: Use TARGET_WITH_CPU to select default CPU.
* NEWS: Mention new configure option.

9 years ago[ARM][GAS] ARMv8.2 should enable ARMv8.1 NEON instructions.
Matthew Wahab [Thu, 30 Jun 2016 09:46:51 +0000 (10:46 +0100)] 
[ARM][GAS] ARMv8.2 should enable ARMv8.1 NEON instructions.

GAS fails to recognize march=armv8.2-a as a superset of march=armv8.1-a
when assembling NEON instructions. The patch corrects this, making
-march=armv8.2-a -mfpu=neon-fp-armv8 enable the NEON intructions
introduced with ARMv8.1-A.

include/
2016-06-30  Matthew Wahab  <matthew.wahab@arm.com>

* opcode/arm.h (ARM_ARCH_V8_2a): Add FPU_NEON_EXT_RDMA to the set
of enabled FPU features.

gas/
2016-06-30  Matthew Wahab  <matthew.wahab@arm.com>

* testsuite/gas/arm/armv8_2+rdma.d: New.

9 years agoAdd support for simulating big-endian AArch64 binaries.
Jim Wilson [Thu, 30 Jun 2016 08:10:41 +0000 (09:10 +0100)] 
Add support for simulating big-endian AArch64 binaries.

* cpustate.h: Include config.h.
(union GRegisterValue): Add WORDS_BIGENDIAN check.  For big endian code
use anonymous structs to align members.
* simulator.c (aarch64_step): Use sim_core_read_buffer and
endian_le2h_4 to read instruction from pc.

9 years agoFix gold testsuite failure with GCC 6.
Cary Coutant [Thu, 30 Jun 2016 06:24:35 +0000 (23:24 -0700)] 
Fix gold testsuite failure with GCC 6.

With GCC 6 when not using -static-libstdc++, the operator delete(void*)
function is defined in the shared C++ support library, rather than in
the main program. The test script is too aggressive in checking for
this symbol's presence among the exported symbols. This patch removes
the check for that symbol.

gold/
PR gold/20310
* testsuite/dynamic_list.sh: Remove check for _ZdlPv.

9 years agoUpdate "make clean" in gold/testsuite.
Cary Coutant [Thu, 30 Jun 2016 06:16:24 +0000 (23:16 -0700)] 
Update "make clean" in gold/testsuite.

gold/
* testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2.
* testsuite/Makefile.in: Regenerate.

9 years ago[GOLD] Pass -Wl,-z to gcc, not plain -z
Alan Modra [Wed, 29 Jun 2016 09:07:27 +0000 (18:37 +0930)] 
[GOLD] Pass -Wl,-z to gcc, not plain -z

* testsuite/Makefile.am (memory_test, memory_test_2): Pass
-Wl,-z to gcc, not plain -z.
* testsuite/Makefile.in: Regenerate.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Jun 2016 00:00:19 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAdd copyright header in gdb.base/return.c
Yao Qi [Wed, 29 Jun 2016 16:33:19 +0000 (17:33 +0100)] 
Add copyright header in gdb.base/return.c

gdb/testsuite:

2016-06-29  Yao Qi  <yao.qi@linaro.org>

* gdb.base/return.c: Add copyright header.

9 years agoDefault to --enable-compressed-debug-sections=gas for Linux/x86
H.J. Lu [Wed, 29 Jun 2016 16:29:39 +0000 (09:29 -0700)] 
Default to --enable-compressed-debug-sections=gas for Linux/x86

--enable-compressed-debug-sections=gas added to binutils 2.26.  Make it
default for Linux/x86 targets in 2.27.

* NEWS: Mention --enable-compressed-debug-sections=gas is the
default for Linux/x86 targets.
* configure.tgt (ac_default_compressed_debug_sections): Default
to yes for Linux/x86 targets.

9 years agoFix PR python/20129 - use of non-existing variable
Tom Tromey [Mon, 6 Jun 2016 17:21:15 +0000 (11:21 -0600)] 
Fix PR python/20129 - use of non-existing variable

PR python/20129 concerns the error message one gets from a command
like "disable frame-filter global NoSuchFilter".  Currently this
throws a second, unexpected, exception due to the use of a
non-existing variable named "name".

This patch adds regression tests and fixes a couple of spots to use
the correct variable name.

Built and regtested on x86-64 Fedora 23.

2016-06-29  Tom Tromey  <tom@tromey.com>

PR python/20129:
* python/lib/gdb/command/frame_filters.py (_do_enable_frame_filter)
(SetFrameFilterPriority._set_filter_priority): Use "frame_filter",
not "name".

2016-06-29  Tom Tromey  <tom@tromey.com>

PR python/20129:
* gdb.python/py-framefilter.exp: Add tests for setting priority
and disabling of non-existent frame filter.

9 years agoPR gdb/17210 - fix possible memory leak in read_memory_robust
Tom Tromey [Thu, 9 Jun 2016 15:46:53 +0000 (09:46 -0600)] 
PR gdb/17210 - fix possible memory leak in read_memory_robust

PR gdb/17210 concerns a possible memory leak in read_memory_robust.
The bug can happen because read_memory_robust allocates memory, does
not install any cleanups, and invokes QUIT.  Similarly, target_read
calls QUIT, so it too can potentially throw.

The fix is to install cleanups to guard the allocated memory.

Built and regtested on x86-64 Fedora 23.  I couldn't think of a way to
test this, so no new test; and of course this means it should have
more careful review.

2016-06-29  Tom Tromey  <tom@tromey.com>

PR gdb/17210:
* target.c (free_memory_read_result_vector): Take a pointer to the
VEC as an argument.
(read_memory_robust): Install a cleanup for "result".
* mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.

9 years agogold: Support 386 TLS code sequences without PLT
H.J. Lu [Wed, 29 Jun 2016 15:38:43 +0000 (08:38 -0700)] 
gold: Support 386 TLS code sequences without PLT

There are extensions to 386 psABI:

https://groups.google.com/forum/#!topic/ia32-abi/awsRSvJOJfs

to call tls_get_addr via GOT:

call *___tls_get_addr@GOT(%reg)

where EBX register isn't required as GOT base.

Since direct call is 4-byte long and indirect call, is 5-byte long, the
extra one byte must be handled properly.

For general dynamic model, 7-byte lea instruction before call
instruction is replaced by 6-byte one to make room for indirect call.
For local dynamic model, we simply use 5-byte indirect call.

TLS linker optimization is updated to recognize new instruction
patterns.  For local dynamic model to local exec model transition,
we generate a 6-byte lea instruction as nop, instead of a 1-byte nop
plus a 4-byte lea instruction.

PR gold/20308
* i386.cc (Target_i386::Relocate::relocate): Allow
R_386_GOT32X relocation against ___tls_get_addr.
(Target_i386::Relocate::tls_gd_to_ie): Support indirect
call to __tls_get_addr.
(Target_i386::Relocate::tls_gd_to_le): Likewise.
(Target_i386::Relocate::tls_ld_to_le): Likewise.
* testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test,
pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test.
(pr20308a_test_SOURCES): New.
(pr20308a_test_DEPENDENCIES): Likewise.
(pr20308a_test_CFLAGS): Likewise.
(pr20308a_test_LDFLAGS): Likewise.
(pr20308a_test_LDADD): Likewise.
(pr20308b_test_SOURCES): Likewise.
(pr20308b_test_DEPENDENCIES): Likewise.
(pr20308b_test_CFLAGS): Likewise.
(pr20308b_test_LDFLAGS): Likewise.
(pr20308b_test_LDADD): Likewise.
(pr20308c_test_SOURCES): Likewise.
(pr20308c_test_DEPENDENCIES): Likewise.
(pr20308c_test_CFLAGS): Likewise.
(pr20308c_test_LDFLAGS): Likewise.
(pr20308c_test_LDADD): Likewise.
(pr20308d_test_SOURCES): Likewise.
(pr20308d_test_DEPENDENCIES): Likewise.
(pr20308d_test_CFLAGS): Likewise.
(pr20308d_test_LDFLAGS): Likewise.
(pr20308d_test_LDADD): Likewise.
(pr20308e_test_SOURCES): Likewise.
(pr20308e_test_DEPENDENCIES): Likewise.
(pr20308e_test_CFLAGS): Likewise.
(pr20308e_test_LDFLAGS): Likewise.
(pr20308e_test_LDADD): Likewise.
(pr20308a.so): Likewise.
(pr20308b.so): Likewise.
(pr20308_gd.o): Likewise.
(pr20308_ld.o): Likewise.
(MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so.
* testsuite/Makefile.in: Regenerated.
* testsuite/pr20308_def.c: New file.
* testsuite/pr20308_gd.S: Likewise.
* testsuite/pr20308_ld.S: Likewise.
* testsuite/pr20308_main.c: Likewise.

9 years agogold: Support x86-64 TLS code sequences without PLT
H.J. Lu [Wed, 29 Jun 2016 15:37:30 +0000 (08:37 -0700)] 
gold: Support x86-64 TLS code sequences without PLT

There are extensions to x86-64 psABI:

https://groups.google.com/forum/#!topic/x86-64-abi/de5_KnLHxtI

to call tls_get_addr via GOT:

call *__tls_get_addr@GOTPCREL(%rip)

Since direct call is 4-byte long and indirect call, is 5-byte long, the
extra one byte must be handled properly.

For general dynamic model, one 0x66 prefix before call instruction is
removed to make room for indirect call.  For local dynamic model, we
simply use 5-byte indirect call.

TLS linker optimization is updated to recognize new instruction
patterns.  For local dynamic model to local exec model transition, we
generate 4 0x66 prefixes, instead of 3, before mov instruction in 64-bit
and generate a 5-byte nop, instead of 4-byte, before mov instruction in
32-bit.

PR gold/20216
* configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
AM_CONDITIONAL.
* configure: Regenerated.
* x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
R_X86_64_GOTPCRELX relocation against __tls_get_addr.
(Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
call to __tls_get_addr.
(Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
(Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
* testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
(pr20216a_test_SOURCES): New.
(pr20216a_test_DEPENDENCIES): Likewise.
(pr20216a_test_CFLAGS): Likewise.
(pr20216a_test_LDFLAGS): Likewise.
(pr20216a_test_LDADD): Likewise.
(pr20216b_test_SOURCES): Likewise.
(pr20216b_test_DEPENDENCIES): Likewise.
(pr20216b_test_CFLAGS): Likewise.
(pr20216b_test_LDFLAGS): Likewise.
(pr20216b_test_LDADD): Likewise.
(pr20216c_test_SOURCES): Likewise.
(pr20216c_test_DEPENDENCIES): Likewise.
(pr20216c_test_CFLAGS): Likewise.
(pr20216c_test_LDFLAGS): Likewise.
(pr20216c_test_LDADD): Likewise.
(pr20216d_test_SOURCES): Likewise.
(pr20216d_test_DEPENDENCIES): Likewise.
(pr20216d_test_CFLAGS): Likewise.
(pr20216d_test_LDFLAGS): Likewise.
(pr20216d_test_LDADD): Likewise.
(pr20216e_test_SOURCES): Likewise.
(pr20216e_test_DEPENDENCIES): Likewise.
(pr20216e_test_CFLAGS): Likewise.
(pr20216e_test_LDFLAGS): Likewise.
(pr20216e_test_LDADD): Likewise.
(pr20216a.so): Likewise.
(pr20216b.so): Likewise.
(pr20216_gd.o): Likewise.
(pr20216_ld.o): Likewise.
(MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
* testsuite/Makefile.in: Regenerated.
* testsuite/pr20216_def.c: New file.
* testsuite/pr20216_gd.S: Likewise.
* testsuite/pr20216_ld.S: Likewise.
* testsuite/pr20216_main.c: Likewise.

9 years agoInitialize strtok_r's saveptr to NULL
Manish Goregaokar [Wed, 29 Jun 2016 11:39:43 +0000 (17:09 +0530)] 
Initialize strtok_r's saveptr to NULL

Building gdb with --enable-build-with-cxx=no trips on a warning:

 ../../binutils-gdb/gdb/rust-lang.c:173:15: error: saveptr may be used
 uninitialized in this function [-Werror=maybe-uninitialized]
     ret.name = concat (TYPE_NAME (type), "::", token, (char *) NULL);

The problem is that gcc doesn't understand that "tail" can never be
NULL in the call to strtok_r:

      name = xstrdup (TYPE_FIELD_NAME (type, 0));
      cleanup = make_cleanup (xfree, name);
      tail = name + strlen (RUST_ENUM_PREFIX);
...
      for (token = strtok_r (tail, "$", &saveptr);

Fix this by always initializing saveptr.

2016-06-29  Manish Goregaokar  <manish@mozilla.com>

gdb/ChangeLog:
    * rust-lang.c (rust_get_disr_info): Initialize saveptr to NULL.

9 years agoSet unknown_syscall differently on arm linux
Yao Qi [Wed, 29 Jun 2016 13:51:41 +0000 (14:51 +0100)] 
Set unknown_syscall differently on arm linux

Currently, we use 123456789 as unknown or illegal syscall number, and
expect program return ENOSYS.  Although 123456789 is an illegal syscall
number on arm linux, kernel sends SIGILL rather than returns -ENOSYS.
However, arm linux kernel returns -ENOSYS if syscall number is within
0xf0001..0xf07ff, so we can use 0xf07ff for unknown_syscall in test.

gdb/testsuite:

2016-06-29  Yao Qi  <yao.qi@linaro.org>

* gdb.base/catch-syscall.c [__arm__]: Set unknown_syscall to
0x0f07ff.

9 years agosparc: make SPARC_OPCODE_ARCH_MAX part of its enum
Trevor Saunders [Fri, 27 May 2016 08:52:45 +0000 (04:52 -0400)] 
sparc: make SPARC_OPCODE_ARCH_MAX part of its enum

include/ChangeLog:

2016-06-29  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* opcode/sparc.h (enum sparc_opcode_arch_val): Move
SPARC_OPCODE_ARCH_MAX into the enum.

9 years agoUse strtok_r instead of strsep in rust_get_disr_info
Manish Goregaokar [Wed, 29 Jun 2016 10:12:28 +0000 (15:42 +0530)] 
Use strtok_r instead of strsep in rust_get_disr_info

strsep doesn't exist on Windows.

2016-06-29  Manish Goregaokar  <manish@mozilla.com>

gdb/ChangeLog:
    * rust-lang.c (rust_get_disr_info): Use strtok_r instead of strsep.

9 years agoPreserve all mapping symbols in ARM and AArch64 object files.
Nick Clifton [Wed, 29 Jun 2016 10:17:40 +0000 (11:17 +0100)] 
Preserve all mapping symbols in ARM and AArch64 object files.

bfd * elfnn-aarch64.c (is_aarch64_mapping_symbol): New function.
Returns TRUE for AArch64 mapping symbols.
(elfNN_aarch64_backend_symbol_processing): New function.  Marks
mapping symbols as precious in object files so that they will not
be stripped.
(elf_backend_symbol_processing): Define.

* elf32-arm.c (is_arm_mapping_symbol): New function.  Returns TRUE
for ARM mapping symbols.
(elf32_arm_backend_symbol_processing): Make use of the new function.

9 years agoCorrect fix for typo
Nick Clifton [Wed, 29 Jun 2016 08:09:03 +0000 (09:09 +0100)] 
Correct fix for typo

9 years agoFix typo
Nick Clifton [Wed, 29 Jun 2016 08:06:55 +0000 (09:06 +0100)] 
Fix typo

9 years agoGAS: Fix `abort' expansion in write.c
Maciej W. Rozycki [Tue, 28 Jun 2016 16:33:38 +0000 (17:33 +0100)] 
GAS: Fix `abort' expansion in write.c

Remove an internal diagnostic regression introduced with the inclusion of
"libbfd.h" from write.c, added with:

commit e7ff5c732e7b95aafccd0910ea1a5cb8251a1033
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Feb 16 03:40:17 2007 +0000

That change made "libbfd.h" override the `abort' definition provided by
"as.h" earlier on, making the message produced by any calls reached from
write.c, which is a part of the GAS proper, look like they came from
BFD, e.g.:

.../gas/testsuite/gas/elf/type.s: Assembler messages:
.../gas/testsuite/gas/elf/type.s:30: Error: symbol type "gnu_unique_object" is supported only by GNU targets
../as-new: BFD (GNU Binutils) 2.26.51.20160628 internal error, aborting at .../gas/write.c:608 in size_seg

../as-new: Please report this bug.

vs:

.../gas/testsuite/gas/elf/type.s: Assembler messages:
.../gas/testsuite/gas/elf/type.s:30: Error: symbol type "gnu_unique_object" is supported only by GNU targets
.../gas/testsuite/gas/elf/type.s: Internal error, aborting at .../gas/write.c:602 in size_seg
Please report this bug.

With the removal of "libbfd.h" restore the latter message format.

gas/
* write.c: Remove "libbfd.h" inclusion.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 29 Jun 2016 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years ago[GOLD] Modify script_test_12
Alan Modra [Tue, 28 Jun 2016 22:30:58 +0000 (08:00 +0930)] 
[GOLD] Modify script_test_12

Changes necessary to make this test pass on powerpc64.

* script_test_12.t: Delete .plt, specify 64k page size.
* script_test_12i.t: Likewise.

9 years ago[GOLD] alignment test
Alan Modra [Tue, 28 Jun 2016 22:30:15 +0000 (08:00 +0930)] 
[GOLD] alignment test

PowerPC gcc aligns char arrays to a word which results in the test
failing since it expects a char alignment.  As the test already uses
gcc attributes to assign variables to sections, we may as well use an
attribute to align too.

* testsuite/plugin_layout_with_alignment.c: Explicitly align all
variables.

9 years ago[GOLD] Disable copy_test_protected on powerpc
Alan Modra [Tue, 28 Jun 2016 22:29:34 +0000 (07:59 +0930)] 
[GOLD] Disable copy_test_protected on powerpc

A target like powerpc64 that is PIC by default doesn't need copy relocs.

* testsuite/Makefile.am (copy_test_protected): Disable for powerpc.
* testsuite/Makefile.in: Regenerate.

9 years agoFix execute permission on gold/testsuite/script_test_14.sh.
Cary Coutant [Tue, 28 Jun 2016 22:44:22 +0000 (15:44 -0700)] 
Fix execute permission on gold/testsuite/script_test_14.sh.