1. 12 Oct, 2019 2 commits
  2. 11 Oct, 2019 1 commit
  3. 10 Oct, 2019 4 commits
    • Alan Modra's avatar
      PR25081, Discrepancy between VMA and LMA after ALIGN · 4526ef25
      Alan Modra authored
      The testcase in the PR has two empty output sections, .sec1 with an
      ALIGN and symbol assignment, and .sec2 just with an empty input
      section.  The symbol assignment results in .sec1 being kept, but
      because it is empty this section doesn't take space from the memory
      region as you might expect from the ALIGN.  Instead the next section
      .sec2, has vma/lma as if .sec1 wasn't present.  However, .sec2 is
      discarded and os->ignored set, which unfortunately meant that dot
      wasn't set from .sec2 vma.  That in turn results in .sec2 lma being
      set incorrectly.  That vma/lma difference is then propagated to
      .sec3 where it is seen as an overlap.
      	PR 25081
      	* ldlang.c (lang_size_sections_1): Set lma from section vma
      	rather than dot.
      (cherry picked from commit 8610e0fd)
    • Szabolcs Nagy's avatar
      [PR ld/22263][PR ld/25056] arm: Avoid dynamic TLS relocs in PIE · b094948c
      Szabolcs Nagy authored
      Dynamic relocs are only needed in an executable for TLS symbols if
      those are defined in an external module and even then TLS access
      can be relaxed to use IE model instead of GD.
      Several bfd_link_pic checks are turned into bfd_link_dll checks
      to fix TLS handling in PIE, for the same fix some other targets
      used !bfd_link_executable checks, but that includes relocatable
      objects so dll seems safer (in most cases either should work, since
      dynamic relocations are not applied in relocatable objects).
      On arm* fixes
      FAIL: Build pr22263-1
      	PR ld/22263
      	PR ld/25056
      	* elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
      	bfd_link_pic for TLS checks.
      	(elf32_arm_final_link_relocate): Likewise.
      	(allocate_dynrelocs_for_symbol): Likewise.
    • Szabolcs Nagy's avatar
      [PR ld/25062] arm: sign extend the addend of R_ARM_TLS_GOTDESC · 772db4c6
      Szabolcs Nagy authored
      On 64-bit host the 32-bit addend was loaded without sign extension into
      an unsigned long.
      	PR ld/25062
      	* elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
      	PR ld/25062
      	* testsuite/ld-arm/arm-elf.exp: Update.
      	* testsuite/ld-arm/tls-gdesc-neg.d: New test.
      	* testsuite/ld-arm/tls-gdesc-neg.s: New test.
    • GDB Administrator's avatar
      Automatic date update in version.in · 3115c234
      GDB Administrator authored
  4. 09 Oct, 2019 1 commit
  5. 08 Oct, 2019 8 commits
    • Alan Modra's avatar
      PR25079, "ar s" stopped working · 0bc183f8
      Alan Modra authored
      's' is both a command and a modifier.  If given as a command then we
      aren't lacking an operation.  I think the same goes when mri mode is
      selected: any following command line used to be ignored.
      	PR 25079
      	* ar.c (decode_options): Don't try for command options if
      	write_armap or mri_mode is selected.
      (cherry picked from commit b7d9d3ee)
    • Alan Modra's avatar
      PowerPC TLS miscounting PLT for __tls_get_addr · 977424c6
      Alan Modra authored
      ppc*_elf_tls_optimize decrements the PLT refcount for __tls_get_addr
      when a GD or LD sequence can be optimized.  Without tls marker relocs
      this must be done when processing the argument setup relocations.
      With marker relocs it's better done when processing the marker reloc.
      But don't count them both ways.
      Seen as "unresolvable R_PPC_REL24 relocation against symbol
      `__tls_get_addr_opt'" (and other branch relocs).
      	* elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
      	with non-local symbol.  Don't double count __tls_get_addr calls
      	with marker relocs.
      	* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
      (cherry picked from commit 7d04a20a)
    • Alan Modra's avatar
      PowerPC section flag tidy · 52b0b563
      Alan Modra authored
      has_tls_get_addr_call is no longer named correctly as the flag is
      only set on finding a __tls_get_addr call without tlsld/tlsgd marker
      	* elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
      	* elf64-ppc.c (nomark_tls_get_addr): Likewise.
      (cherry picked from commit 9737e8af)
    • Alan Modra's avatar
      Re: PowerPC PIC vs. DLL TLS issues · 8aaf083b
      Alan Modra authored
      A bug crept into commit f749f26e, which could cause linker
      segfaults when creating PIEs.  This patch fixes it.
      	* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
      	space for local got non-tls relocs when PIE.
      (cherry picked from commit 93370e8e)
    • Alan Modra's avatar
      PowerPC PIC vs. DLL TLS issues · 1b1bf9a8
      Alan Modra authored
      1) GOT entries generated for any of the GOT TLS relocations don't need
      dynamic relocations for locally defined symbols in PIEs.  In the case
      of a tls_index doubleword, the dtpmod entry is known to be 1, and the
      dtprel entry is also known at link time and relative.  Similarly,
      dtprel and tprel words are known at link time and relative.  (GOT
      entries for other than TLS symbols are not relative and thus need
      dynamic relocations in PIEs.)
      2) Local dynamic TLS code is really only meant for accesses local to
      the current binary.  There was a cheapskate test for this before using
      the common tlsld_got slot, but the test wasn't exactly correct and
      might confuse anyone looking at the code.  The proper test,
      SYMBOL_REFERENCES_LOCAL isn't so expensive that it should be avoided.
      3) The same cheap test for local syms when optimising TLS sequences
      should be SYMBOL_REFERENCES_LOCAL too.
      	* elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
      	(ppc64_elf_tls_optimize): Correct is_local condition.
      	(allocate_got): Don't reserve dynamic relocations for any of the
      	tls got relocs in PIEs when the symbol is local.
      	(allocate_dynrelocs): Correct validity test for local sym using
      	tlsld_got slot.
      	(ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
      	for any of the tls got relocs in PIEs.
      	(ppc64_elf_layout_multitoc): Likewise.
      	(ppc64_elf_relocate_section): Correct validity test for local sym
      	using tlsld_got slot.  Don't emit dynamic relocations for any of
      	the tls got relocs in PIEs when the symbol is local.
      	* elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
      	(got_relocs_needed): Delete.
      	(allocate_dynrelocs): Correct validity test for local sym using
      	tlsld_got slot.  Don't reserve dynamic relocations for any of the
      	tls got relocs in PIEs when the symbol is local.
      	(ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
      	for any of the tls got relocs in PIEs.
      	(ppc_elf_relocate_section): Correct validity test for local sym
      	using tlsld_got slot.  Don't emit dynamic relocations for any of
      	the tls got relocs in PIEs when the symbol is local.
      	* testsuite/ld-powerpc/tlsso.d: Adjust to suit tlsld_got usage change.
      	* testsuite/ld-powerpc/tlsso.g: Likewise.
      	* testsuite/ld-powerpc/tlsso.r: Likewise.
      	* testsuite/ld-powerpc/tlsso32.d: Likewise.
      	* testsuite/ld-powerpc/tlsso32.g: Likewise.
      	* testsuite/ld-powerpc/tlsso32.r: Likewise.
      (cherry picked from commit f749f26e)
    • Alan Modra's avatar
      PR25046, readelf "Reading xxx bytes extends past end of file for dynamic section" · 7cb2dcb8
      Alan Modra authored
      	PR 25046
      	* readelf.c (process_program_headers): Clear dynamic_addr and
      	dynamic_size earlier.
      (cherry picked from commit 663f67df)
    • Alan Modra's avatar
      PR24262, plugin search dir doesn't respect --libdir · 443adfa4
      Alan Modra authored
      	PR 24262
      	* Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
      	* plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
      	${bindir}/../lib/bfd-plugins if different.
      	* Makefile.in: Regenerate.
      	PR 24262
      	* ld.texi (-plugin): Revert 2019-03-15 change.
      (cherry picked from commit 41f37a6f)
    • GDB Administrator's avatar
      Automatic date update in version.in · 068723f5
      GDB Administrator authored
  6. 07 Oct, 2019 1 commit
  7. 06 Oct, 2019 1 commit
  8. 05 Oct, 2019 1 commit
  9. 04 Oct, 2019 2 commits
  10. 03 Oct, 2019 1 commit
  11. 02 Oct, 2019 2 commits
    • Nick Clifton's avatar
      Change objcopy's --set-section-alignment option so that it takes a byte... · 146a3bb9
      Nick Clifton authored
      Change objcopy's --set-section-alignment option so that it takes a byte alignment value rather than a power of two alignment value.
      	PR 24942
      	* objcopy.c (copy_usage): Update description of
      	(copy_main): Interpret numeric argument of --set-section-alignment
      	as a byte alignment, not a power of two alignment.
      	* doc/binutils.texi: Update description of
      	* testsuite/binutils-all/set-section-alignment.d: New test.
      	* testsuite/binutils-all/objcopy.exp: Run the new test.
    • GDB Administrator's avatar
      Automatic date update in version.in · f4aebe98
      GDB Administrator authored
  12. 01 Oct, 2019 1 commit
  13. 30 Sep, 2019 2 commits
  14. 29 Sep, 2019 1 commit
  15. 28 Sep, 2019 1 commit
  16. 27 Sep, 2019 1 commit
  17. 26 Sep, 2019 1 commit
  18. 25 Sep, 2019 6 commits
    • Alan Modra's avatar
      PR25031, nm reports wrong address on 32bit · 895b6d98
      Alan Modra authored
      Using saved_format breaks when nm is presented with multiple object
      files, some 32-bit and some 64-bit.
      	PR 25031
      	* nm.c (print_format_string): New.
      	(get_print_format): Delete saved_format.  Move earlier.
      	(set_print_width): Call get_print_format.
      	(print_value): Use print_format_string.
      (cherry picked from commit 352f6bc3)
    • Alan Modra's avatar
      implicit conversion from enum ld_plugin_level to enum ld_plugin_status · 40ac0077
      Alan Modra authored
      This is a gcc10 warning fix.
      	* testsuite/plugin_new_section_layout.c (new_input_hook): Correct
      	return status enum values.
      (cherry picked from commit 6831670d)
    • Alan Modra's avatar
      PR25018, readelf crash on 32bits · a11b3493
      Alan Modra authored
      Pointer comparisons after adding an offset just don't work to catch
      overflow when the offset is a larger type than the pointer.
      	PR 25018
      	* dwarf.c (get_type_signedness): Delete ineffective pointer
      	comparison check.  Properly range check uvalue offset on
      	recursive call.
      	(read_and_display_attr_value): Range check uvalue offset before
      	calling get_type_signedness.
      (cherry picked from commit b3fe587e)
    • Alan Modra's avatar
      Work around gcc10 FAIL: S-records with constructors · fdbc0dd5
      Alan Modra authored
      gcc10 on x86_64 and powerpc64le recognises that the loop in
      Foo::operator= can be turned into a call to memmove, which then
      results in an undefined symbol when linking.  Avoid that by making the
      loop smaller.
      	* testsuite/ld-srec/sr3.cc (FOO_MSG_LEN): Set to 4.
      (cherry picked from commit a13ba308)
    • Alan Modra's avatar
      tc-i386.c gcc10 warning fix · 641cbc94
      Alan Modra authored
      .../gas/config/tc-i386.c: In function ‘md_parse_option’:
      .../gas/config/tc-i386.c:11441:9: error: implicit conversion from ‘enum <anonymous>’ to ‘enum <anonymous>’ [-Werror=enum-conversion]
      11441 |  vexwig = evexw0;
            |         ^
      .../gas/config/tc-i386.c:11443:9: error: implicit conversion from ‘enum <anonymous>’ to ‘enum <anonymous>’ [-Werror=enum-conversion]
      11443 |  vexwig = evexw1;
            |         ^
      	* config/tc-i386.c (md_parse_option): Fix warning on vexwig assignment.
      (cherry picked from commit 40c9c8de)
    • GDB Administrator's avatar
      Automatic date update in version.in · 3417d517
      GDB Administrator authored
  19. 24 Sep, 2019 2 commits
  20. 23 Sep, 2019 1 commit