[all-commits] [llvm/llvm-project] c4fc26: [ELF] Do not leave undefined symbols (specified by...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Tue Jul 14 02:36:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c4fc26b4c0e37066c0909099b2e61d4701549227
      https://github.com/llvm/llvm-project/commit/c4fc26b4c0e37066c0909099b2e61d4701549227
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/test/ELF/init-fini.s

  Log Message:
  -----------
  [ELF] Do not leave undefined symbols (specified by -init and -fini) if they are defined in non-fetched archive members

After D69985, symbols for "-init" and "-fini" were unconditionally
marked as used even if they were just lazy symbols seen when scanning
archives. That resulted in exposing them in the symbol table of an
output file, as Undefined, which added unwanted dependencies. The patch
fixes the issue by checking the kind of the symbols before the marking.

Differential Revision: https://reviews.llvm.org/D83549


  Commit: dd6faf13d8e27990f226147f543a6bdf1d0a0c46
      https://github.com/llvm/llvm-project/commit/dd6faf13d8e27990f226147f543a6bdf1d0a0c46
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M llvm/unittests/DebugInfo/DWARF/CMakeLists.txt
    A llvm/unittests/DebugInfo/DWARF/DWARFListTableTest.cpp

  Log Message:
  -----------
  [DebugInfo] Add unit tests for DWARFListTableHeader::length().

This adds unit tests to check the expected behavior of the method in
case the unit length field is truncated.

Differential Revision: https://reviews.llvm.org/D83673


  Commit: ec9f0c7d4ae257642ee825baa9e23f9ffb000de8
      https://github.com/llvm/llvm-project/commit/ec9f0c7d4ae257642ee825baa9e23f9ffb000de8
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp
    A llvm/test/DebugInfo/X86/dwarfdump-rnglists-zero-length.s

  Log Message:
  -----------
  [DebugInfo] Fix a possible crash when reading a malformed .debug_*lists section.

DWARFListTableHeader::length() handles the zero value of HeaderData.Length
in a special way, which makes the result different from the calculated
value of FullLength, which leads to triggering an assertion. The patch
moves the assertion a bit later when `FullLength` is already checked for
minimal allowed value.

Differential Revision: https://reviews.llvm.org/D82886


Compare: https://github.com/llvm/llvm-project/compare/242a736a14ed...ec9f0c7d4ae2


More information about the All-commits mailing list