]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
5 years ago[gold] Fix integer narrowing in switch users/roland/2.31/gold-narrowing-switch
Roland McGrath [Fri, 3 Aug 2018 21:38:20 +0000 (14:38 -0700)] 
[gold] Fix integer narrowing in switch

gold/
* target.h (Sized_target::record_gnu_property): Use unsigned int
for second argument.
* x86_64.cc (Target_x86_64<size>::record_gnu_property): Likewise.

(cherry picked from commit ccaf6a01bae457aba3a3f6baf1239bb55bc189a4)

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Aug 2018 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Aug 2018 00:01:29 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoFix spurious check-ld failures on aarch64-elf
Roland McGrath [Wed, 1 Aug 2018 20:36:51 +0000 (13:36 -0700)] 
Fix spurious check-ld failures on aarch64-elf

ld/
* testsuite/ld-aarch64/ifunc-1-local.d: Adjust regexps to match
the offsets emitted by aarch64-elf configurations.
* testsuite/ld-aarch64/ifunc-1.d: Likewise.
* testsuite/ld-aarch64/ifunc-2-local.d: Likewise.
* testsuite/ld-aarch64/ifunc-2.d: Likewise.
* testsuite/ld-aarch64/ifunc-21.d: Likewise.
* testsuite/ld-aarch64/ifunc-3a.d: Likewise.

(cherry picked from commit c198a1ecf835c5896ef810ebe1ded06729039dcd)

5 years ago[PATCH, LD, AArch64] Fix ifunc testisms
Andre Simoes Dias Vieira [Thu, 19 Jul 2018 15:18:28 +0000 (16:18 +0100)] 
[PATCH, LD, AArch64] Fix ifunc testisms

This patch fixes some ifunc testisms after H.J. Lu's patch to enable the
use of IFUNC pointers in position dependent code for binutils. See PR
LD/23169 in binutils bugzilla.

The aarch64 ifunc error message test was changed to no longer expect
this error message as this is now an accepted combination. This patch
also disables the executable tests added by H.J. Lu for aarch64, just as
Alan Modra did with his patch, as these tests only seem to work on some
architectures.

ld/ChangeLog:
2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* testsuite/ld-aarch64/ifunc-9.d: Remove no longer expected error.
* testsuite/ld-ifunc/ifunc.exp: Disable tests for aarch64.

(cherry picked from commit 3ba174474d3cc063d6b7abf0bfdd6021bbaf8a90)

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Aug 2018 00:01:56 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agox86: don't mistakenly scale non-8-bit displacements
Jan Beulich [Tue, 31 Jul 2018 09:04:34 +0000 (11:04 +0200)] 
x86: don't mistakenly scale non-8-bit displacements

PR gas/23465

In commit b5014f7af2 I've removed (instead of replaced) a conditional,
resulting in addressing forms not allowing 8-bit displacements to now
get their displacements scaled under certain circumstances. Re-add the
missing conditional.

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 31 Jul 2018 00:02:23 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoFix unwind offset for call_info->start_symbol.
John David Anglin [Mon, 30 Jul 2018 14:52:34 +0000 (10:52 -0400)] 
Fix unwind offset for call_info->start_symbol.

* config/tc-hppa.c: Include "struc-symbol.h".
(pa_build_unwind_subspace): Use call_info->start_symbol->sy_frag
instead of frag_now for local symbol replacement.

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Jul 2018 00:01:37 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Jul 2018 00:02:34 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Jul 2018 00:01:52 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Jul 2018 00:02:08 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Jul 2018 00:02:03 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Jul 2018 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoS/390: Set the htm flag on PPA
Andreas Krebbel [Thu, 19 Jul 2018 08:00:51 +0000 (10:00 +0200)] 
S/390: Set the htm flag on PPA

The PPA instruction will be emitted by GCC transactional execution
builtins so it needs to be accepted with just -mhtm and without
-march=zEC12.

opcodes/ChangeLog:

2018-07-24  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2018-07-19  Andreas Krebbel  <krebbel@linux.ibm.com>

* s390-opc.txt (PPA): Add the htm flag.

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Jul 2018 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agox86: Add a GNU_PROPERTY_X86_ISA_1_USED note if needed
H.J. Lu [Fri, 20 Jul 2018 16:18:47 +0000 (09:18 -0700)] 
x86: Add a GNU_PROPERTY_X86_ISA_1_USED note if needed

When -z separate-code, which is enabled by default for Linux/x86, is
used to create executable, ld won't place any data in the code-only
PT_LOAD segment.  If there are no data sections placed before the
code-only PT_LOAD segment, the program headers won't be mapped into
any PT_LOAD segment.  When the executable tries to access it (based
on the program header address passed in AT_PHDR), it will lead to
segfault.  This patch inserts a GNU_PROPERTY_X86_ISA_1_USED note if
there may be no data sections before the text section so that the
first PT_LOAD segment won't be code-only and will contain the program
header.

Testcases are adjusted to either pass "-z noseparate-code" to ld or
discard the .note.gnu.property section.  A Linux/x86 run-time test is
added.

bfd/

PR ld/23428
* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
separate code program header is needed, make sure that the first
read-only PT_LOAD segment has no code by adding a
GNU_PROPERTY_X86_ISA_1_USED note.

ld/

PR ld/23428
* testsuite/ld-elf/linux-x86.S: New file.
* testsuite/ld-elf/linux-x86.exp: Likewise.
* testsuite/ld-elf/pr23428.c: Likewise.
* testsuite/ld-elf/sec64k.exp: Pass "-z noseparate-code" to ld
for Linux/x86 targets.
* testsuite/ld-i386/abs-iamcu.d: Likewise.
* testsuite/ld-i386/abs.d: Likewise.
* testsuite/ld-i386/pr12718.d: Likewise.
* testsuite/ld-i386/pr12921.d: Likewise.
* testsuite/ld-x86-64/abs-k1om.d: Likewise.
* testsuite/ld-x86-64/abs-l1om.d: Likewise.
* testsuite/ld-x86-64/abs.d: Likewise.
* testsuite/ld-x86-64/pr12718.d: Likewise.
* testsuite/ld-x86-64/pr12921.d: Likewise.
* testsuite/ld-linkonce/zeroeh.ld: Discard .note.gnu.property
section.
* testsuite/ld-scripts/print-memory-usage.t: Likewise.
* testsuite/ld-scripts/size-2.t: Likewise.
* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use ld
to create executable if language is "asm".

(cherry picked from commit 241e64e3b42cd9eba514b8e0ad2ef39a337f10a5)

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Jul 2018 00:02:19 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Jul 2018 00:02:13 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Jul 2018 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Jul 2018 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Jul 2018 00:02:23 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agox86: Split vcvtps2{,u}qq and vcvttps2{,u}qq
H.J. Lu [Wed, 18 Jul 2018 19:34:44 +0000 (12:34 -0700)] 
x86: Split vcvtps2{,u}qq and vcvttps2{,u}qq

After

commit 1b54b8d7e4fc8055f9220a5287e8a94d8a65a88d
Author: Jan Beulich <jbeulich@novell.com>
Date:   Mon Dec 18 09:36:14 2017 +0100

    x86: fold RegXMM/RegYMM/RegZMM into RegSIMD

    ... qualified by their respective sizes, allowing to drop FirstXmm0 at
    the same time.

folded RegXMM, RegYMM and RegZMM into RegSIMD, it's no longer impossible
to distinguish if Xmmword can represent a memory reference when operand
specification contains SIMD register. For example, template operands
specification like these

RegXMM|...|Xmmword|...

and

RegXMM|...

The Xmmword bitfield is always set by RegXMM which is represented by
"RegSIMD|Xmmword".  This patch splits each of vcvtps2qq, vcvtps2uqq,
vcvttps2qq and vcvttps2uqq into 2 templates: one template only has
RegXMM source operand and the other only has mempry source operand.

gas/

PR gas/23418
* testsuite/gas/i386/xmmword.s: Add tests for vcvtps2qq,
vcvtps2uqq, vcvttps2qq and vcvttps2uqq.
* testsuite/gas/i386/xmmword.l: Updated.

opcodes/

PR gas/23418
* i386-opc.h (Byte): Update comments.
(Word): Likewise.
(Dword): Likewise.
(Fword): Likewise.
(Qword): Likewise.
(Tbyte): Likewise.
(Xmmword): Likewise.
(Ymmword): Likewise.
(Zmmword): Likewise.
* i386-opc.tbl: Split vcvtps2qq, vcvtps2uqq, vcvttps2qq and
vcvttps2uqq.
* i386-tbl.h: Regenerated.

(cherry picked from commit 11a322db5c8bc23009e97af30180d6b14d86dbd3)

5 years agoSet the development flag back to true.
Nick Clifton [Wed, 18 Jul 2018 08:05:35 +0000 (09:05 +0100)] 
Set the development flag back to true.

* development.sh: Set to true.

5 years agoRegenerate files and add changelog entries for 2.31.1 release binutils-2_31_1
Nick Clifton [Wed, 18 Jul 2018 07:54:05 +0000 (08:54 +0100)] 
Regenerate files and add changelog entries for 2.31.1 release

5 years agoFix typo in src-release.sh script. Update French translation for gold and Spanish...
Nick Clifton [Wed, 18 Jul 2018 07:35:24 +0000 (08:35 +0100)] 
Fix typo in src-release.sh script.  Update French translation for gold and Spanish translation for ld.

gold * po/fr.po: Updated French translation.
ld * po/es.po: Updated Spanish translation.
. * (DEVO_SUPPORT): Fix typo in previous delta.
(do_proto_toplev): Add --quiet option to configure command line.

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Jul 2018 00:01:46 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Jul 2018 00:02:04 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoImport patch from mainline to fix gold's handling of already versioned symbols.
Nick Clifton [Mon, 16 Jul 2018 13:29:26 +0000 (14:29 +0100)] 
Import patch from mainline to fix gold's handling of already versioned symbols.

gold PR gold/23409
* symtab.cc (Symbol_table::define_special_symbol): Add check for
version name on existing symbol.
* testsuite/Makefile.am (ver_test_pr23409): New test case.
* testsuite/Makefile.in: Regenerate.
* testsuite/ver_test_pr23409.sh: New test script.
* testsuite/ver_test_pr23409_1.script: New version script.
* testsuite/ver_test_pr23409_2.script: New version script.

5 years agoAdd the new top level files test-driver and ar-lib to the src-release script.
Nick Clifton [Mon, 16 Jul 2018 13:11:57 +0000 (14:11 +0100)] 
Add the new top level files test-driver and ar-lib to the src-release script.

* src-release.sh (DEVO_SUPPORT): Add test-driver and ar-lib.

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Jul 2018 00:01:59 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Jul 2018 00:02:24 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoReset branch back to development mode
Nick Clifton [Sat, 14 Jul 2018 18:39:32 +0000 (19:39 +0100)] 
Reset branch back to development mode

5 years ago2.31 Release point binutils-2_31
Nick Clifton [Sat, 14 Jul 2018 18:05:56 +0000 (19:05 +0100)] 
2.31 Release point

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Jul 2018 00:01:33 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoAllow bit-patterns in the immediate field of ARM neon mov instructions.
Nick Clifton [Fri, 13 Jul 2018 10:44:49 +0000 (11:44 +0100)] 
Allow bit-patterns in the immediate field of ARM neon mov instructions.

* config/tc-arm.c (do_neon_mov): When converting an integer
immediate into a floating point value, check that the conversion
is valid.  Also warn if the immediate is valid as both a floating
point value and a bit pattern.
* testsuite/gas/arm/vfp-mov-enc.s: Add instructions that use
floating point bit patterns.
* testsuite/gas/arm/vfp-mov-enc.d: Add regexps for the disassembly
of the new insns.

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Jul 2018 00:02:29 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoHide dynamic symbols in discarded sections
Alan Modra [Tue, 3 Jul 2018 02:48:10 +0000 (12:18 +0930)] 
Hide dynamic symbols in discarded sections

This is a followup to git commit 97196564c7 "Strip global symbol
defined in discarded section".  If a symbol defined in a discarded
section was dynamic, that patch left .dynsym with holes (ie. all zero
entries).  For example, the following from libstdc++.so:

Symbol table '.dynsym' contains 6090 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000000000a74e0     0 SECTION LOCAL  DEFAULT   10
     2: 0000000000264180     0 SECTION LOCAL  DEFAULT   17
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_addUserCommitAction
     4: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_memcpyRtWn
     5: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
readelf: Warning: local symbol 5 found at index >= .dynsym's sh_info value of 3
     6: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
readelf: Warning: local symbol 6 found at index >= .dynsym's sh_info value of 3
[snip]

This patch removes the symbols from .dynsym too.

PR 17550
* elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
in discarded sections.

(cherry picked from commit af0bfb9c4283ce80fe37ad6360d12cae8ec38696)

5 years agoThis patch adds support for the SSBB and PSSBB speculation barrier instructions to...
Nick Clifton [Thu, 12 Jul 2018 14:50:35 +0000 (15:50 +0100)] 
This patch adds support for the SSBB and PSSBB speculation barrier instructions to the AArch64 assembler and disassembler.

For more details see: https://static.docs.arm.com/ddi0596/a/DDI_0596_ARM_a64_instruction_set_architecture.pdf

opcodes * aarch64-tbl.h (aarch64_opcode_table): Add entry for
ssbb and pssbb and update dsb flags to F_HAS_ALIAS.
* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-opc-2.c: Regenerate.

gas * testsuite/gas/aarch64/system.s: Add test for ssbb
and pssbb.
* testsuite/gas/aarch64/system.d: Update accordingly
and remove explicit addresses.

5 years agoResolve merge conflicts.
Nick Clifton [Thu, 12 Jul 2018 10:27:30 +0000 (11:27 +0100)] 
Resolve merge conflicts.

5 years agoAdd support for the ARM speculation barrier instructions SSBB and PSSBB.
Sudakshina Das [Thu, 12 Jul 2018 10:25:12 +0000 (11:25 +0100)] 
Add support for the ARM speculation barrier instructions SSBB and PSSBB.

opcodes * arm-dis.c (arm_opcodes): Add ssbb and pssbb and move
     csdb together with them.
     (thumb32_opcodes): Likewise.

gas  * config/tc-arm.c (insns): Add new ssbb and pssbb instructions.
     * testsuite/gas/arm/csdb.s: Add new tests for ssbb and pssbb.
     * testsuite/gas/arm/csdb.d: Likewise
     * testsuite/gas/arm/thumb2_it_bad.s: Likewise.
     * testsuite/gas/arm/thumb2_it_bad.l: Likewise.
     * testsuite/gas/arm/barrier.d: Update with ssbb.
     * testsuite/gas/arm/barrier-thumb.d: Likewise.

5 years agoAdd remainder of Em16 restrictions for AArch64 gas.
Tamar Christina [Thu, 12 Jul 2018 09:28:46 +0000 (10:28 +0100)] 
Add remainder of Em16 restrictions for AArch64 gas.

This adds the missing Em16 constraints the rest of the instructions requiring them
and also adds a testcase to test all the instructions so these are checked from
now on.

The Em16 operand constrains the valid registers to the lower 16 registers when used
with a half precision qualifier.

The list has been cross checked (by hand) through the Arm ARM version Ca.

opcodes/

PR binutils/23192
* aarch64-tbl.h (sqdmlal, sqdmlal2, smlsl, smlsl2, sqdmlsl, sqdmlsl2,
mul, smull, smull2, sqdmull, sqdmull2, sqdmulh, sqrdmulh, mla, umlal,
umlal2, mls, umlsl, umlsl2, umull, umull2, sqdmlal, sqdmlsl, sqdmull,
sqdmulh, sqrdmulh): Use Em16.

gas/

PR binutils/23192
* testsuite/gas/aarch64/illegal-by-element.s: New.
* testsuite/gas/aarch64/illegal-by-element.d: New.
* testsuite/gas/aarch64/illegal-by-element.l: New.

(cherry picked from commit 45a28947f3fe5693560e9a1d6373807a9e82c04a)
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Jul 2018 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoxtensa: don't emit dynamic relocation for weak undefined symbol
Max Filippov [Mon, 2 Jul 2018 18:12:44 +0000 (11:12 -0700)] 
xtensa: don't emit dynamic relocation for weak undefined symbol

Resolved reference to a weak undefined symbol in PIE must not have
a dynamic relative relocation against itself, otherwise the value of a
reference will be changed from 0 to the base of executable, breaking
code like the following:

  void weak_function (void);
  if (weak_function)
    weak_function ();

This fixes tests for PR ld/22269 and a number of PIE tests in xtensa gcc
testsuite.

bfd/
2018-07-11  Max Filippov  <jcmvbkbc@gmail.com>

* elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
space for dynamic relocation for undefined weak symbol.
(elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
relocation for undefined weak symbols.
(shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
section for relocations against undefined weak symbols.

(cherry picked from commit c451bb34ae8bd2d0669bd563366883cfbcf0de9b)

5 years agoDuplicate code update.
Nick Clifton [Wed, 11 Jul 2018 15:46:47 +0000 (16:46 +0100)] 
Duplicate code update.

5 years agoReimport a patch to fix building gold on Cygwin64 systms: m.arena has size_t on Cygwi...
Franz Sirl [Wed, 11 Jul 2018 15:44:22 +0000 (16:44 +0100)] 
Reimport a patch to fix building gold on Cygwin64 systms: m.arena has size_t on Cygwin64 and thus errors out due to -Werror=format.

gold * main.cc: Print m.arena as long long.

5 years agoFix printing the size of GOLD's memory areana on Cygwin based systems.
Franz Sirl [Wed, 24 Jan 2018 13:39:11 +0000 (13:39 +0000)] 
Fix printing the size of GOLD's memory areana on Cygwin based systems.

I just stumbled over this with 2.29.1 while building a cross-toolchain, on Cygwin64, but it's still the same for 2.30. m.arena has size_t on Cygwin64 and thus errors out due to -Werror=format.

gold
* main.cc: Print m.arena as long long.

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Jul 2018 00:02:00 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoBFD/ELF: Correct a `remove' global shadowing error for pre-4.8 GCC
Maciej W. Rozycki [Tue, 10 Jul 2018 23:42:43 +0000 (00:42 +0100)] 
BFD/ELF: Correct a `remove' global shadowing error for pre-4.8 GCC

Remove `-Wshadow' compilation errors:

cc1: warnings being treated as errors
.../bfd/elflink.c: In function 'bfd_elf_final_link':
.../bfd/elflink.c:11722: error: declaration of 'remove' shadows a global declaration
/usr/include/stdio.h:154: error: shadowed declaration is here

which for versions of GCC before 4.8 prevent support for ELF targets
from being built.  See also GCC PR c/53066.

bfd/
* elflink.c (bfd_elf_final_link): Rename `remove' local variable
to `remove_section'.

(cherry picked from commit 5270eddc6ed6b5d8e4e2817491bb44b784fa6f81)

5 years agoFix test for availability of emplace_back.
Cary Coutant [Mon, 9 Jul 2018 23:12:27 +0000 (16:12 -0700)] 
Fix test for availability of emplace_back.

Testing for the GCC version 5 or later isn't right, since C++ 11 support
wasn't enabled by default until later.  This patch tests the C++ standard
support directly instead of inferring it from the GCC version.

gold/
* incremental.cc (Sized_incremental_binary::setup_readers): Use
emplace_back for C++ 11 or later.

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Jul 2018 00:02:08 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agobfd: Use changequote for "i[3-7]86-*-linux-*"
H.J. Lu [Mon, 9 Jul 2018 13:51:17 +0000 (06:51 -0700)] 
bfd: Use changequote for "i[3-7]86-*-linux-*"

Use changequote to match "i[3-7]86-*-linux-*", instead of
"i3-786-*-linux-*".

PR ld/23388
* configure.ac: Use changequote for "i[3-7]86-*-linux-*".
* configure: Regenerated.

(cherry picked from commit 872899f1efeda1e93ed569d322c6b2ee85ce885c)

5 years agox86: Remove x86 ISA properties with empty bits
H.J. Lu [Thu, 5 Jul 2018 16:24:07 +0000 (09:24 -0700)] 
x86: Remove x86 ISA properties with empty bits

There is no need to generate x86 ISA properties with empty bits in
linker output.

bfd/

PR ld/23372
* elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
ISA properties with empty bits.

ld/

PR ld/23372
* testsuite/ld-i386/i386.exp: Run pr23372a and pr23372b.
* testsuite/ld-i386/pr23372a.d: New file.
* testsuite/ld-i386/pr23372a.s: Likewise.
* testsuite/ld-i386/pr23372b.d: Likewise.
* testsuite/ld-i386/pr23372b.s: Likewise.
* testsuite/ld-i386/pr23372c.s: Likewise.
* testsuite/ld-x86-64/pr23372a-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372a.d: Likewise.
* testsuite/ld-x86-64/pr23372a.s: Likewise.
* testsuite/ld-x86-64/pr23372b-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372b.d: Likewise.
* testsuite/ld-x86-64/pr23372b.s: Likewise.
* testsuite/ld-x86-64/pr23372c.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr23372a, pr23372a-x32,
pr23372b and pr23372b-x32.

(cherry picked from commit 56ad703d56ffe5dc55d5e719a6ec41fd6cf9bfbe)

5 years agoFix diagnostic errors
Alan Modra [Fri, 6 Jul 2018 05:37:08 +0000 (15:07 +0930)] 
Fix diagnostic errors

Fixes a number of build errors like the following
.../elf32-arm.c: In function 'elf32_arm_nabi_write_core_note':
.../elf32-arm.c:2177: error: #pragma GCC diagnostic not allowed inside functions
.../elf32-arm.c:2186: error: #pragma GCC diagnostic not allowed inside functions
See the comment in diagnostics.h.

include/
* diagnostics.h: Comment on macro usage.
bfd/
* elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
* elf32-ppc.c (ppc_elf_write_core_note): Likewise.
* elf32-s390.c (elf_s390_write_core_note): Likewise.
* elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
* elf64-s390.c (elf_s390_write_core_note): Likewise.
* elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.

(cherry picked from commit fe75810f8e0cc33384f22d0479506711d4014c60)

5 years ago[GOLD] PowerPC .gnu.attributes support
Alan Modra [Thu, 5 Jul 2018 15:38:16 +0000 (01:08 +0930)] 
[GOLD] PowerPC .gnu.attributes support

elfcpp/
* powerpc.h (Tag_GNU_Power_ABI_FP): Define.
(Tag_GNU_Power_ABI_Vector, Tag_GNU_Power_ABI_Struct_Return): Define.
gold/
* powerpc.cc: Include attributes.h.
(Powerpc_relobj::attributes_section_data_): New variable, with
accessor and associated constructor and destructor support.
(Powerpc_dynobj::attributes_section_data_): Likewise.
(Powerpc_relobj::do_read_symbols): Stash SHT_GNU_ATTRIBUTES section
contents in attributes_section_data_.
(Powerpc_dynobj::do_read_symbols): Likewise.
(Target_powerpc): Add attributes_section_data_, last_fp_, last_ld_,
last_vec_, and last_struct_ vars.
(Target_powerpc::merge_object_attributes): New function.
(Target_powerpc::do_finalize_sections): Iterate over input objects
merging attributes.  Create output attributes section.

(cherry picked from commit 724436fccb68156ff53b7b03cb7f41547a65c30c)

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Jul 2018 00:02:17 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Jul 2018 00:02:57 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Jul 2018 00:01:59 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoRISC-V: Add riscv-*-* configure support, and minor cleanup.
Jim Wilson [Fri, 6 Jul 2018 00:49:11 +0000 (17:49 -0700)] 
RISC-V: Add riscv-*-* configure support, and minor cleanup.

bfd/
* config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
(riscv64*-*-*): Likewise.
(riscv-*-*): Add as an alias for riscv32*-*-*.

ld/
* configure.tgt (riscv-*-*): Add as an alias for riscv32*-*-*.

(cherry picked from commit bb11866d6a635fadb9285d18e2fb819d2de2c28c)

5 years agoFix SBO bit in disassembly mask for ldrah on AArch64.
Tamar Christina [Fri, 6 Jul 2018 15:18:19 +0000 (16:18 +0100)] 
Fix SBO bit in disassembly mask for ldrah on AArch64.

The disassembly mask for ldarh incorrectly didn't mask out bit 20 which
is part of the SBO part of the instruction and shouldn't be considered input.

This fixes the wrong bit fixing the disassembly of instructions to
ldarh and makes the behavior consistent.

opcodes/

PR binutils/23242
* aarch64-tbl.h (ldarh): Fix disassembly mask.

(cherry picked from commit f311ba7ed84d66ae2cd77bd969747d7ab959d866)
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
5 years agoFix the read/write flag for these registers on AArch64
Tamar Christina [Fri, 6 Jul 2018 15:15:41 +0000 (16:15 +0100)] 
Fix the read/write flag for these registers on AArch64

The previous constraints were based on information already in opcodes and it
seems that a few of them were wrong.  I have now hand verified the ones changed
by the previous patch and corrected where needed.

This prevents a warning to be issued when one shouldn't be.

opcodes/

PR binutils/23369
* aarch64-opc.c (aarch64_sys_regs): Make read/write csselr_el1,
vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1.

gas/testsuite/

PR binutils/23369
* gas/aarch64/msr.d (csselr_el1,
vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1): New.
* gas/aarch64/msr.s: Likewise.

(cherry picked from commit cba05feb51cb97f75f9a7814b081ce45245ac7b2)
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
5 years agoFix bug generating relocations for notes created by the assembler.
Nick Clifton [Fri, 6 Jul 2018 10:48:15 +0000 (11:48 +0100)] 
Fix bug generating relocations for notes created by the assembler.

* write.c (maybe_generate_build_notes): Bias reloc offsets by the
number of notes already generated.

5 years agoUpdate config.sub
Sebastian Huber [Fri, 6 Jul 2018 06:23:40 +0000 (08:23 +0200)] 
Update config.sub

* config.sub: Sync with upstream version 2018-07-03.

5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Jul 2018 00:02:26 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoError for mismatched powerpc ABI tags
Alan Modra [Wed, 4 Jul 2018 01:11:31 +0000 (10:41 +0930)] 
Error for mismatched powerpc ABI tags

And report the two input files that are incompatible rather than
reporting that an input file is incompatible with the output.

bfd/
* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
on mismatch.  Remove "warning: " from messages.  Track last bfd
used to set tags.
(ppc_elf_merge_obj_attributes): Likewise.  Handle status from
_bfd_elf_ppc_merge_fp_attributes.
* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
from _bfd_elf_ppc_merge_fp_attributes.
ld/
* testsuite/ld-powerpc/attr-gnu-4-12.d: Update expected output.
* testsuite/ld-powerpc/attr-gnu-4-13.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-21.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-23.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-31.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-4-32.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise.
* testsuite/ld-powerpc/attr-gnu-12-21.d: Likewise.

(cherry picked from commit 4a91d0ba307eb24eb87ad27f4ea8fcde823c3e61)

5 years agoCorrect removal of .gnu.attributes
Alan Modra [Tue, 3 Jul 2018 08:27:36 +0000 (17:57 +0930)] 
Correct removal of .gnu.attributes

Setting SEC_EXCLUDE for empty .gnu.attributes is too late in the link
process for the linker to remove the section.  That must be done in
bfd_elf_final_link, as we do for removed group sections.

* elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
sections.

(cherry picked from commit b8a6ced79668ec8af3180e50b76f7517ebbab0d9)

5 years agoGNU attribute output on errors
Alan Modra [Tue, 3 Jul 2018 05:20:38 +0000 (14:50 +0930)] 
GNU attribute output on errors

.gnu.attributes entries from linker input files are merged to the
output file, the output having the union of compatible input
attributes.  Incompatible attributes generally cause a linker error
and no output.  However in some cases only a warning is emitted, and
one of the incompatible input attributes is passed on to the output.

PowerPC tends to emit warnings rather than errors, and the output
takes the first input attribute.  For example, if we have two input
files with Tag_GNU_Power_ABI_FP, the first with a value signifying
"double-precision hard float, IBM long double", the second with a
value signifying "double-precision hard float, IEEE long double",
we'll get a warning about incompatible long double types and the
output will say "double-precision hard float, IBM long double".
The output attribute of course isn't correct.  It would be correct to
specify "IBM and IEEE long double", but we don't have a way to
represent that currently.  While it would be possible to extend the
encoding, there isn't much gain in doing so.  A shared library
providing support for both long double types should link against
objects using either long double type without warning or error.  That
is what you'd get if such a shared library had no Tag_GNU_Power_ABI_FP
attribute.

So this patch provides a way for the backend to omit .gnu.attributes
tags from the output.

* elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
* elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
ATTR_TYPE_FLAG_INT_VAL.  Set ATTR_TYPE_HAS_ERROR on finding
incompatible attribute.
(ppc_elf_merge_obj_attributes): Likewise.  Return
_bfd_elf_merge_object_attributes result.
* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
_bfd_elf_merge_object_attributes result.

(cherry picked from commit 8d2c8c3d17926826864f4b739362f66af547428f)

5 years agoUpdate config.guess and config.sub
Sebastian Huber [Fri, 29 Jun 2018 11:06:40 +0000 (13:06 +0200)] 
Update config.guess and config.sub

* config.guess: Sync with upstream version 2018-06-26.
* config.sub: Sync with upstream version 2018-07-02.

5 years agold: Set non_ir_ref_regular for --undefined SYMBOL
H.J. Lu [Thu, 5 Jul 2018 11:33:11 +0000 (04:33 -0700)] 
ld: Set non_ir_ref_regular for --undefined SYMBOL

Set non_ir_ref_regular to TRUE for symbols forced into the output file
so that they won't be removed by garbage collection with LTO.

PR ld/23309
* ldlang.c (insert_undefined): Set non_ir_ref_regular to TRUE.
* plugin.c (is_visible_from_outside): Don't scan entry_symbol.
* testsuite/ld-plugin/pr23309.c: New file.
* testsuite/ld-plugin/pr23309.d: Likewise.

(cherry picked from commit 94d401b8b88a76b1372ce44e805516756a4f737b)

5 years agoUpdate Russian, Bulgarian and Brazilian Portuguese translations for various component...
Nick Clifton [Thu, 5 Jul 2018 11:22:14 +0000 (12:22 +0100)] 
Update Russian, Bulgarian and Brazilian Portuguese translations for various components of the binutils.

bfd,gas * po/ru.po: Updated Russian translation.

ld * po/bg.po: Updated Bulgarian translation.
* po/pt_BR.po: Updated Brazilian Portuguese translation.

binutils* po/bg.po: Updated Bulgarian translation.

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Jul 2018 00:02:48 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agold: Properly display default for -z separate-code
H.J. Lu [Wed, 4 Jul 2018 13:22:40 +0000 (06:22 -0700)] 
ld: Properly display default for -z separate-code

Check DEFAULT_LD_Z_SEPARATE_CODE to display default for -z separate-code.

PR ld/23358
* lexsup.c (elf_shlib_list_options): Properly display default
for -z separate-code.

(cherry picked from commit b14b7ff14ffe911ec562004304841cf7d2775a19)

5 years agoAlso install diagnostics.h
H.J. Lu [Wed, 4 Jul 2018 13:18:22 +0000 (06:18 -0700)] 
Also install diagnostics.h

Since bfd.h is an installed header, also install diagnostics.h.

* Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
* Makefile.in: Regenerated.

(cherry picked from commit db40acb0bed088872837f916029d8800c33f9f94)

5 years agox86-64: Clear the R_X86_64_converted_reloc_bit bit
H.J. Lu [Mon, 2 Jul 2018 20:08:09 +0000 (13:08 -0700)] 
x86-64: Clear the R_X86_64_converted_reloc_bit bit

We need to clear the R_X86_64_converted_reloc_bit bit after setting it
to avoid leaking it out by --emit-relocs.

bfd/

PR ld/23324
* elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
R_X86_64_converted_reloc_bit bit.

ld/

PR ld/23324
* testsuite/ld-x86-64/pr23324.s: New file.
* testsuite/ld-x86-64/pr23324a.d: Likewise.
* testsuite/ld-x86-64/pr23324b.d: Likewise.

(cherry picked from commit b638b5d57fafc84a8dc0ff91d7579a3c24aad90c)

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Jul 2018 00:02:46 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Jul 2018 00:02:48 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Jul 2018 00:02:40 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Jul 2018 00:02:47 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 Jun 2018 00:02:05 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years ago[Patch AArch64] Warn on unpredictable stlxrb , stlxrh and stlxr cases.
Ramana Radhakrishnan [Fri, 29 Jun 2018 12:06:05 +0000 (13:06 +0100)] 
[Patch AArch64] Warn on unpredictable stlxrb , stlxrh and stlxr cases.

A recent case in golang highlighted that gas wasn't warning on these
unpredictable cases in the architecture. Fixed thusly.

I need to audit gcc to make sure we have early clobbers on the
patterns but that's a separate patch.

Tested aarch64-none-elf and gas

Ok ?

Ramana

2018-06-29 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>

        * config/tc-aarch64.c (warn_unpredictable_ldst): Add
        unpredictable cases for ldxp, stlxrb, stlxrh, stlxr.  *
        testsuite/gas/aarch64/diagnostic.s: New tests.  *
        testsuite/gas/aarch64/diagnostic.l: Adjust.

5 years agoFix AArch64 encodings for by element instructions.
Tamar Christina [Fri, 29 Jun 2018 11:12:27 +0000 (12:12 +0100)] 
Fix AArch64 encodings for by element instructions.

Some instructions in Armv8-a place a limitation on FP16 registers that can be
used as the register from which to select an element from.

e.g. fmla restricts Rm to 4 bits when using an FP16 register.  This restriction
does not apply for all instructions, e.g. fcmla does not have this restriction
as it gets an extra bit from the M field.

Unfortunately, this restriction to S_H was added for all _Em operands before,
meaning for a large number of instructions you couldn't use the full register
file.

This fixes the issue by introducing a new operand _Em16 which applies this
restriction only when paired with S_H and leaves the _Em and the other
qualifiers for _Em16 unbounded (i.e. using the full 5 bit range).

Also the patch updates all instructions that should be affected by this.

opcodes/

PR binutils/23192
* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Likewise.
* aarch64-opc-2.c: Likewise.
* aarch64-dis.c (aarch64_ext_reglane): Add AARCH64_OPND_Em16 constraint.
* aarch64-opc.c (operand_general_constraint_met_p,
aarch64_print_operand): Likewise.
* aarch64-tbl.h (aarch64_opcode_table): Change Em to Em16 for smlal,
smlal2, fmla, fmls, fmul, fmulx, sqrdmlah, sqrdlsh, fmlal, fmlsl,
fmlal2, fmlsl2.
(AARCH64_OPERANDS): Add Em2.

gas/

PR binutils/23192
* config/tc-aarch64.c (process_omitted_operand, parse_operands): Add
AARCH64_OPND_Em16
* testsuite/gas/aarch64/advsimd-armv8_3.s: Expand tests to cover upper
16 registers.
* testsuite/gas/aarch64/advsimd-armv8_3.d: Likewise.
* testsuite/gas/aarch64/advsimd-compnum.s: Likewise.
* testsuite/gas/aarch64/advsimd-compnum.d: Likewise.
* testsuite/gas/aarch64/sve.d: Likewise.

include/

PR binutils/23192
*opcode/aarch64.h (aarch64_opnd): Add AARCH64_OPND_Em16.

(cherry picked from commit 369c9167d47e69aad2e260cc1db17f8c894c138b)
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
5 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Jun 2018 00:02:16 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Jun 2018 00:02:28 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agogas object file locations
Alan Modra [Wed, 27 Jun 2018 03:17:13 +0000 (12:47 +0930)] 
gas object file locations

With the update to newer autotools, some gas object files are now
built in config/, breaking xtensa-elf and ia64-vms.  This patch fixes
the dependencies.

* configure.ac: Specify extra_objects with leading "config/"
for xtensa-relax.o and te-vms.o.  Use case statements to unique
extra_objects.  Formatting.
* configure: Regenerate.

(cherry picked from commit e11078da44268a4813ed81a27853143af86c3e24)

5 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 Jun 2018 00:02:44 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoPR23169 bogus test
Alan Modra [Tue, 26 Jun 2018 05:00:16 +0000 (14:30 +0930)] 
PR23169 bogus test

The testcase isn't valid.  If it happens to run on your target, you're
lucky.

PR 23169
* testsuite/ld-ifunc/ifunc.exp: Don't run pr23169 tests on
powerpc.  Comment.

5 years agoFix parens in ld bootstrap.exp
Alan Modra [Tue, 26 Jun 2018 04:59:28 +0000 (14:29 +0930)] 
Fix parens in ld bootstrap.exp

Seen with tcl 8.5.13:
ERROR: tcl error sourcing .../ld/testsuite/ld-bootstrap/bootstrap.exp.
ERROR: expected boolean value but got " [istarget ia64-*-elf*] || [istarget ia64-*-linux*"
    while executing
"if { "$flags" == "--static" && { [istarget ia64-*-elf*] || [istarget ia64-*-linux*] }
 || [istarget mips*-*-linux*] } {
# On ia64 and mips, tmpdir/l..."

* testsuite/ld-bootstrap/bootstrap.exp: Use parentheses rather
than curly braces in logical expression.

5 years agoRevert "Use offsets instead of addresses in ELF_SECTION_IN_SEGMENT for non SHT_NOBITS"
Alan Modra [Thu, 21 Jun 2018 13:49:41 +0000 (23:19 +0930)] 
Revert "Use offsets instead of addresses in ELF_SECTION_IN_SEGMENT for non SHT_NOBITS"

This reverts commit 57c0d77c2ce5e583dab322e05f8291bcbad0ccd3.

5 years agoUpdated translations.
Nick Clifton [Tue, 26 Jun 2018 12:55:59 +0000 (13:55 +0100)] 
Updated translations.

opcodes * po/uk.po: Updated Ukranian translation.
* po/de.po: Updated German translation.
* po/pt_BR.po: Updated Brazilian Portuguese translation.

ld * po/uk.po: Updated Ukranian translation.
gold * po/uk.po: Updated Ukranian translation.
gas * po/uk.po: Updated Ukranian translation.
bfd * po/uk.po: Updated Ukranian translation.

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

5 years agoFix spelling mistakes.
Nick Clifton [Tue, 26 Jun 2018 11:32:32 +0000 (12:32 +0100)] 
Fix spelling mistakes.

opcodes * nfp-dis.c: Fix spelling mistake.

ld * emultempl/aarch64elf.em: Fix spelling mistake.
* emultempl/avrelf.em: Likewise.
* emultempl/elf32.em: Likewise.

binutils* doc/binutils.texi: Fix spelling mistakes.

5 years agoAutomatic date update in version.in
GDB Administrator [Tue, 26 Jun 2018 00:02:27 +0000 (00:02 +0000)] 
Automatic date update in version.in

5 years agoFix a compile time warning building the AArch64 BFD backend.
Nick Clifton [Mon, 25 Jun 2018 11:51:10 +0000 (12:51 +0100)] 
Fix a compile time warning building the AArch64 BFD backend.

* elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
for malloc returning NULL.
(_bfd_aarch64_erratum_843419_fixup): Check for
_bfd_aarch64_erratum_835769_stub_name returning NULL.

5 years agoReset version to 2.30.90. Update configure files. Regenerate pot files.
Nick Clifton [Sun, 24 Jun 2018 18:49:22 +0000 (19:49 +0100)] 
Reset version to 2.30.90.  Update configure files.  Regenerate pot files.

5 years agoAdd 2.30 branch notes to ChangeLogs and NEWS files.
Nick Clifton [Sun, 24 Jun 2018 17:36:15 +0000 (18:36 +0100)] 
Add 2.30 branch notes to ChangeLogs and NEWS files.

5 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Jun 2018 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

5 years agoBump version number and summarize new features in 1.16.
Cary Coutant [Sat, 23 Jun 2018 07:46:13 +0000 (00:46 -0700)] 
Bump version number and summarize new features in 1.16.

gold/
* version.cc (version_string): Bump to 1.16.
* NEWS: Add new features in 1.16.

5 years agoFix "may be used uninitialized" warning.
Cary Coutant [Sat, 23 Jun 2018 07:26:07 +0000 (00:26 -0700)] 
Fix "may be used uninitialized" warning.

gold/
PR gold/22914
* x86_64.cc (Target_x86_64::record_gnu_property): Initialize val.

5 years agoAdd x86-64 support for Indirect Branch Tracking (IBT).
Cary Coutant [Sat, 23 Jun 2018 00:28:05 +0000 (17:28 -0700)] 
Add x86-64 support for Indirect Branch Tracking (IBT).

gold/
PR gold/22915
* x86_64.cc (Output_data_plt_x86_64_ibt): New class.
(Target_x86_64::do_make_data_plt): (All instantiations) Check for
IBT feature bit and create IBT PLTs.

5 years agoUpdate support for .note.gnu.property sections.
Cary Coutant [Sat, 23 Jun 2018 06:36:50 +0000 (23:36 -0700)] 
Update support for .note.gnu.property sections.

The original patch did not give the target enough hooks to discover that
an input object file does not have a particular property. For the
GNU_PROPERTY_X86_FEATURE_1_AND property, for example, where a missing
property should be assumed to be all zeroes, and ANDed with other
object modules, this is essential. We now store the target-specific
properties locally in the Target structure as native uint32_t fields,
then AND the per-object feature bits with the program's feature bits
when we're finished processing each input object file. The target-specific
properties are then added back to the output note section during
finalization.

gold/
PR gold/22914
* layout.cc (read_sized_value): Fix spelling of section name.
(Layout::layout_gnu_property): Call Sized_target::record_gnu_property
for target-specific properties;
don't store them with target-independent properties yet.
(Layout::merge_gnu_properties): New method.
(Layout::add_gnu_property): New method.
(Layout::create_gnu_properties_note): Call target to finalize
target-specific properties. Fix spelling of output section name.
* layout.h (Layout::merge_gnu_properties): New method.
(Layout::add_gnu_property): New method.
* object.cc (Sized_relobj_file::do_layout): Call
Layout::merge_gnu_properties.
* target.h (Target::merge_gnu_property): Remove.
(Target::finalize_gnu_properties): New method.
(Target::do_merge_gnu_property): Move to Sized_target and rename.
(Target::do_finalize_gnu_properties): New virtual method.
(Sized_target::record_gnu_property): Moved and renamed from
Target::do_merge_gnu_property.
(Sized_target::merge_gnu_properties): New virtual method.
* x86_64.cc (Target_x86_64::isa_1_used_, isa_1_needed_)
(feature_1_, object_feature_1_, seen_first_object_): New data members.
(Target_x86_64::do_merge_gnu_property): Rename to ...
(Target_x86_64::record_gnu_property): ... this.  Save target-specific
properties in Target class object.
(Target_x86_64::merge_gnu_properties): New method.
(add_property): New static inline function.
(Target_x86_64::do_finalize_gnu_properties): New method.
* testsuite/Makefile.am (gnu_property_test): Remove C source file;
link directly without compiler driver.
* testsuite/Makefile.in: Regenerate.
* testsuite/gnu_property_a.S: Add _start.