1. 11 Jul, 2018 5 commits
    • Max Filippov's avatar
      xtensa: don't emit dynamic relocation for weak undefined symbol · 82f32155
      Max Filippov authored
      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 c451bb34)
      82f32155
    • Nick Clifton's avatar
      Duplicate code update. · 8e188148
      Nick Clifton authored
      8e188148
    • Franz Sirl's avatar
      Reimport a patch to fix building gold on Cygwin64 systms: m.arena has size_t... · ea22a560
      Franz Sirl authored
      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.
      ea22a560
    • Franz Sirl's avatar
      Fix printing the size of GOLD's memory areana on Cygwin based systems. · 8238fb62
      Franz Sirl authored
      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.
      8238fb62
    • GDB Administrator's avatar
      Automatic date update in version.in · 557b8e0e
      GDB Administrator authored
      557b8e0e
  2. 10 Jul, 2018 3 commits
    • Maciej W. Rozycki's avatar
      BFD/ELF: Correct a `remove' global shadowing error for pre-4.8 GCC · df402ddc
      Maciej W. Rozycki authored
      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 5270eddc)
      df402ddc
    • Cary Coutant's avatar
      Fix test for availability of emplace_back. · 21555352
      Cary Coutant authored
      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.
      21555352
    • GDB Administrator's avatar
      Automatic date update in version.in · 10a1ed12
      GDB Administrator authored
      10a1ed12
  3. 09 Jul, 2018 5 commits
    • H.J. Lu's avatar
      bfd: Use changequote for "i[3-7]86-*-linux-*" · fa1b3193
      H.J. Lu authored
      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 872899f1)
      fa1b3193
    • H.J. Lu's avatar
      x86: Remove x86 ISA properties with empty bits · f6becb01
      H.J. Lu authored
      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 56ad703d)
      f6becb01
    • Alan Modra's avatar
      Fix diagnostic errors · e55992d4
      Alan Modra authored
      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 fe75810f)
      e55992d4
    • Alan Modra's avatar
      [GOLD] PowerPC .gnu.attributes support · 1cbba2d2
      Alan Modra authored
      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 724436fc)
      1cbba2d2
    • GDB Administrator's avatar
      Automatic date update in version.in · 9822d332
      GDB Administrator authored
      9822d332
  4. 08 Jul, 2018 1 commit
  5. 07 Jul, 2018 1 commit
  6. 06 Jul, 2018 6 commits
  7. 05 Jul, 2018 7 commits
    • Alan Modra's avatar
      Error for mismatched powerpc ABI tags · 2df83626
      Alan Modra authored
      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 4a91d0ba)
      2df83626
    • Alan Modra's avatar
      Correct removal of .gnu.attributes · e89e89c9
      Alan Modra authored
      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 b8a6ced7)
      e89e89c9
    • Alan Modra's avatar
      GNU attribute output on errors · bdb5f07b
      Alan Modra authored
      .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 8d2c8c3d)
      bdb5f07b
    • Sebastian Huber's avatar
      Update config.guess and config.sub · f4b933dd
      Sebastian Huber authored
      	* config.guess: Sync with upstream version 2018-06-26.
      	* config.sub: Sync with upstream version 2018-07-02.
      f4b933dd
    • H.J. Lu's avatar
      ld: Set non_ir_ref_regular for --undefined SYMBOL · 2c4995ba
      H.J. Lu authored
      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 94d401b8)
      2c4995ba
    • Nick Clifton's avatar
      Update Russian, Bulgarian and Brazilian Portuguese translations for various... · 3839e940
      Nick Clifton authored
      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.
      3839e940
    • GDB Administrator's avatar
      Automatic date update in version.in · ea2d583f
      GDB Administrator authored
      ea2d583f
  8. 04 Jul, 2018 4 commits
    • H.J. Lu's avatar
      ld: Properly display default for -z separate-code · b6a63da4
      H.J. Lu authored
      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 b14b7ff1)
      b6a63da4
    • H.J. Lu's avatar
      Also install diagnostics.h · 8d8c8344
      H.J. Lu authored
      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 db40acb0)
      8d8c8344
    • H.J. Lu's avatar
      x86-64: Clear the R_X86_64_converted_reloc_bit bit · b29dd6c3
      H.J. Lu authored
      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 b638b5d5)
      b29dd6c3
    • GDB Administrator's avatar
      Automatic date update in version.in · 30d282be
      GDB Administrator authored
      30d282be
  9. 03 Jul, 2018 1 commit
  10. 02 Jul, 2018 1 commit
  11. 01 Jul, 2018 1 commit
  12. 30 Jun, 2018 1 commit
  13. 29 Jun, 2018 3 commits
    • Ramana Radhakrishnan's avatar
      [Patch AArch64] Warn on unpredictable stlxrb , stlxrh and stlxr cases. · 513e3973
      Ramana Radhakrishnan authored
      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.
      513e3973
    • Tamar Christina's avatar
      Fix AArch64 encodings for by element instructions. · 48d86a7a
      Tamar Christina authored
      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 369c9167
      
      )
      Signed-off-by: default avatarTamar Christina <tamar.christina@arm.com>
      48d86a7a
    • GDB Administrator's avatar
      Automatic date update in version.in · 59ee9ce5
      GDB Administrator authored
      59ee9ce5
  14. 28 Jun, 2018 1 commit