1. Jan 24, 2021
    • Nick Clifton's avatar
      2.36 release · 9288e0fa
      Nick Clifton authored
      9288e0fa
    • Alan Modra's avatar
      PR27228, .reloc wrong symbol emitted for undefined local symbol · 1aaad1d5
      Alan Modra authored
      Local symbols are of course supposed to be defined by their object
      file, but in other cases a local symbol is promoted to global by gas
      if undefined and referenced.  This patch stops gas wrongly replacing a
      local undefined symbol with the undefined section symbol, resulting in
      a .reloc undefined local symbol being emitted as global.
      
      	PR 27228
      	* write.c (resolve_reloc_expr_symbols): Don't assume local symbol
      	is defined.
      
      (cherry picked from commit 68fcee4f)
      1aaad1d5
    • H.J. Lu's avatar
      DWARF-5: Fix parsing DWARF-5 line number tables · 74c1e3df
      H.J. Lu authored
      Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in
      
      commit c3757b58
      Author: Mark Wielaard <mark@klomp.org>
      Date:   Tue Aug 25 15:33:00 2020 +0100
      
          Fix the linker's handling of DWARF-5 line number tables.
      
      	PR binutils/27231
      	* dwarf2.c (read_rnglists): Advance rngs_ptr after
      	_bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
      
      (cherry picked from commit 18454c15)
      74c1e3df
    • GDB Administrator's avatar
      Automatic date update in version.in · b9852095
      GDB Administrator authored
      b9852095
  2. Jan 23, 2021
  3. Jan 22, 2021
  4. Jan 21, 2021
  5. Jan 20, 2021
    • Alan Modra's avatar
      PowerPC64 synthetic symbols · 088572da
      Alan Modra authored
      If an assembler trims off unused section symbols there may be no
      section symbols.  This means that testing for the .opd section symbol
      needs to test both the section name and symbol flags.
      
      	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume
      	section symbols are present.
      
      (cherry picked from commit 8bd10d6b)
      088572da
    • GDB Administrator's avatar
      Automatic date update in version.in · b6f526fb
      GDB Administrator authored
      b6f526fb
  6. Jan 19, 2021
    • Nick Alcock's avatar
      libctf, create: fix ctf_type_add of structs with unnamed members · 296ffb5a
      Nick Alcock authored
      Our recent commit to support unnamed structure members better ditched
      the old ctf_member_iter iterator body in favour of ctf_member_next.
      However, these functions treat unnamed structure members differently:
      ctf_member_iter just returned whatever the internal representation
      contained, while ctf_member_next took care to always return "" rather
      than sometimes returning "" and sometimes NULL depending on whether the
      dict was dynamic (a product of ctf_create) or not (a product of
      ctf_open).  After this commit, ctf_member_iter did the same.
      
      It was always a bug for external callers not to treat a "" return from
      these functions as if it were NULL, so only buggy callers could be
      affected -- but one of those buggy callers was ctf_add_type, which
      assumed that it could just take whatever name was returned from
      ctf_member_iter and slam it directly into the internal representation of
      a dynamic dict -- which expects NULL for unnamed members, not "".  The
      net effect of all of this is that taking a struct containing unnamed
      members and ctf_add_type'ing it into a dynamic dict produced a dict
      whose unnamed members were inaccessible to ctf_member_info (though if
      you wrote that dict out and then ctf_open'ed it, they would magically
      reappear again).
      
      Compensate for this by suitably transforming a "" name into NULL in the
      internal representation, as should have been done all along.
      
      libctf/ChangeLog
      2021-01-19  Nick Alcock  <nick.alcock@oracle.com>
      
      	* ctf-create.c (membadd): Transform ""-named members into
      	NULL-named ones.
      	* testsuite/libctf-regression/type-add-unnamed-struct*: New test.
      
      (cherry picked from commit 26503e2f)
      296ffb5a
    • Nick Alcock's avatar
      libctf: lookup_by_name: do not return success for nonexistent pointer types · b7540e2b
      Nick Alcock authored
      The recent work allowing lookups of pointers in child dicts when the
      pointed-to type is in the parent dict broke the case where a pointer
      type that does not exist at all is looked up: we mistakenly return the
      pointed-to type, which is likely not a pointer at all.  This causes
      considerable confusion.
      
      Fixed, with a new testcase.
      
      libctf/ChangeLog
      2021-01-19  Nick Alcock  <nick.alcock@oracle.com>
      
      	* ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
      	base type if looking up a nonexistent pointer type.
      	* testsuite/libctf-regression/pptrtab*: Test it.
      
      (cherry picked from commit e05a3e5a)
      b7540e2b
    • Alan Modra's avatar
      [GOLD] powerpc assertion failure · d235291c
      Alan Modra authored
      A testcase with only ifuncs can result in no plt section (ifunc plt
      entries might instead be in iplt), which means we can get to this code
      without a static link.
      
      	PR 27203
      	* powerpc.cc (do_plt_fde_location): Remove doing_static_link
      	assertion.
      
      (cherry picked from commit a75a6a41)
      d235291c
    • Nelson Chu's avatar
      ld: Just xfail riscv little endian targets for compressed1d.d test. · 4c899d53
      Nelson Chu authored
      The sizes of compressed and uncompressed .debug_aranges are the same
      for the riscv big endian targets, but different for the little endian
      targets.  The compress rule is fine and isn't broken by riscv, just the
      original compressed1d.d fails by accident.  Ideally, we should fill the
      R_RISCV_ADD/SUB relocations when disabling relaxations in the assembler.
      But before that, Jim already had written an alternative test compressed1d-alt
      to relpace compressed1d.d for riscv, so we can only xfail the riscv little
      endian targets in the short-term.
      
      ld/
          * testsuite/ld-elf/elf.exp (riscv_little_endian): Added.  Return true
          if target is riscv little endian.  Otherwise, return false.
          * testsuite/ld-elf/compressed1d.d: Only xfail the riscv little endian
          targets by [riscv_little_endian].
      4c899d53
    • GDB Administrator's avatar
      Automatic date update in version.in · 216767c4
      GDB Administrator authored
      216767c4
  7. Jan 18, 2021
    • H.J. Lu's avatar
      as: Automatically enable DWARF5 support · 4e02d082
      H.J. Lu authored
      Currently
      
      $ as -o x.o x.s
      
      fails when x.s contains DWARF5 ".file 0" or ".loc 0" directives.  Update
      assembler to automatically enable DWARF5 support so that
      
      $ gcc -S -g -c x.c
      $ gcc -c x.s
      
      works.
      
      	PR gas/27195
      	* dwarf2dbg.c (dwarf2_gen_line_info): Set dwarf_level to 5 if
      	needed.
      	(dwarf2_directive_filename): Likewise.
      	(dwarf2_directive_loc): Likewise.
      	* testsuite/gas/elf/dwarf-5-file0.d: Pass --gdwarf-3.
      	* testsuite/gas/lns/lns-diag-1.l: Remove the
      	"Error: file number less than one" errors.
      
      (cherry picked from commit 705989f1)
      4e02d082
    • H.J. Lu's avatar
      gold: Remove the circular IFUNC dependency in ifuncmain6pie · 31c8a013
      H.J. Lu authored
      On Fedora 33 x86-64 with glibc 2.32-3, ifuncmain6pie failed with:
      
      ./ifuncmain6pie: IFUNC symbol 'foo' referenced in './ifuncmod6.so' is defined in the executable and creates an unsatisfiable circular dependency.
      FAIL ifuncmain6pie (exit status: 127)
      
      Remove non-JUMP_SLOT relocations against foo in ifuncmod6.so, which
      trigger the circular IFUNC dependency.
      
      	* testsuite/ifuncmain6pie.c: Remove non-JUMP_SLOT relocations
      	against foo in ifuncmod6.so.
      	* testsuite/ifuncmod6.c: Likewise.
      
      (cherry picked from commit 25294ff0)
      31c8a013
    • H.J. Lu's avatar
      ld/elf: Ignore section symbols when matching linkonce with comdat · 31768fcb
      H.J. Lu authored
      When deciding if a single member comdat group section in file FOO should
      be discarded by a linkonce section in file BAR, we check if 2 sections
      define the same set of local and global symbols.  When only one of the
      files doesn't contain the unused section symbols in the symbol table,
      such as object files generated by clang or GNU assembler with
      
      commit d1bcae83
      Author: H.J. Lu <hjl.tools@gmail.com>
      Date:   Thu Jan 7 06:42:00 2021 -0800
      
          ELF: Don't generate unused section symbols
      
      the check will fail since one file has the extra unused section symbols.
      We should ignore both undefined and section symbols in the symbol table
      when making such a decision.
      
      bfd/
      
      	PR ld/27193
      	* elflink.c (elf_create_symbuf): Also ignore section symbols.
      
      ld/
      
      	PR ld/27193
      	* testsuite/ld-i386/i386.exp: Run PR ld/27193 test.
      	* testsuite/ld-i386/pr27193.dd: New file.
      	* testsuite/ld-i386/pr27193a.o.bz2: Likewise.
      	* testsuite/ld-i386/pr27193b.s: Likewise.
      
      (cherry picked from commit 994b2513)
      31768fcb
    • H.J. Lu's avatar
      ld/elf/x86: Don't compare IFUNC address in the shared object · e9815c34
      H.J. Lu authored
      On x86, glibc 2.33 starts to issue a fatal error message when calling
      IFUNC function defined in the unrelocated executable from a shared
      library.
      
      1. Update x86 ELF linker to always convert IFUNC function defined in
      position-dependent executable (PDE) to the normal function.  GOT in PDE
      will be updated by R_*_IRELATIVE at run-time.
      2. Update PR ld/23169 tests not to compare function address of external
      IFUNC function in the shared object to avoid calling the IFUNC function
      defined in the unrelocated executable.
      3. Remove pr23169e tests which call the IFUNC function defined in the
      unrelocated position-independent executable from a shared library.
      
      bfd/
      
      	PR ld/23169
      	* elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't
      	check pointer_equality_needed.
      
      ld/
      
      	PR ld/23169
      	* testsuite/ld-ifunc/ifunc.exp: Replace pr23169c.rd with
      	pr23169a.rd for pr23169c and pr23169f.  Remove pr23169e tests.
      	* testsuite/ld-ifunc/pr23169a.c (foo): Don't compare function
      	address.
      
      (cherry picked from commit 75a933f3)
      e9815c34
    • GDB Administrator's avatar
      Automatic date update in version.in · 4c595b36
      GDB Administrator authored
      4c595b36
  8. Jan 17, 2021
  9. Jan 16, 2021
  10. Jan 15, 2021
  11. Jan 14, 2021
  12. Jan 13, 2021
  13. Jan 12, 2021
  14. Jan 11, 2021
    • Kyrylo Tkachov's avatar
      aarch64: Remove support for CSRE · 28eced2c
      Kyrylo Tkachov authored
      This patch removes support for the CSRE extension from aarch64
      gas/objdump.
      CSRE (FEAT_CSRE) is part of the Future Architecture Technologies program
      and at this time Arm is withdrawing this particular feature.
      
      The patch removes the system registers and the CSR PDEC instruction.
      
      gas/ChangeLog
      	* NEWS: Remove CSRE.
      	* config/tc-aarch64.c (parse_csr_operand): Delete.
      	(parse_operands): Delete handling of AARCH64_OPND_CSRE_CSR.
      	(aarch64_features): Remove csre.
      	* doc/c-aarch64.texi: Remove CSRE.
      	* testsuite/gas/aarch64/csre.d: Delete.
      	* testsuite/gas/aarch64/csre-invalid.s: Likewise.
      	* testsuite/gas/aarch64/csre-invalid.d: Likewise.
      	* testsuite/gas/aarch64/csre_csr.s: Likewise.
      	* testsuite/gas/aarch64/csre_csr.d: Likewise.
      	* testsuite/gas/aarch64/csre_csr-invalid.s: Likewise.
      	* testsuite/gas/aarch64/csre_csr-invalid.l: Likewise.
      	* testsuite/gas/aarch64/csre_csr-invalid.d: Likewise.
      
      include/ChangeLog
      
      	* opcode/aarch64.h (AARCH64_FEATURE_CSRE): Delete.
      	(aarch64_opnd): Delete AARCH64_OPND_CSRE_CSR.
      
      opcodes/ChangeLog
      
      	* aarch64-asm-2.c: Regenerate.
      	* aarch64-dis-2.c: Likewise.
      	* aarch64-opc-2.c: Likewise.
      	* aarch64-opc.c (aarch64_print_operand): Delete handling of
      	AARCH64_OPND_CSRE_CSR.
      	* aarch64-tbl.h (aarch64_feature_csre): Delete.
      	(CSRE): Likewise.
      	(_CSRE_INSN): Likewise.
      	(aarch64_opcode_table): Delete csr.
      28eced2c
    • Matt Jenkins's avatar
      Add support for more MIPS variants to the linker command line. · dee726de
      Matt Jenkins authored
              PR ld/27167
              * ldmain.c (get_emulation): Add mipsmips32r3, mips32r5, mips64r3
              and mips64r5 to list of known mips targets.
      dee726de
    • Nick Clifton's avatar
      254a11a5
    • GDB Administrator's avatar
      Automatic date update in version.in · 35cc7700
      GDB Administrator authored
      35cc7700
  15. Jan 09, 2021