[all-commits] [llvm/llvm-project] 1cff72: [lld-macho][nfc] Use includeInSymtab for all symta...

Jez Ng via All-commits all-commits at lists.llvm.org
Mon Apr 11 12:46:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cff723ff527030295d84d3bb52d4d0b7cddb43a
      https://github.com/llvm/llvm-project/commit/1cff723ff527030295d84d3bb52d4d0b7cddb43a
  Author: Jez Ng <jezng at fb.com>
  Date:   2022-04-11 (Mon, 11 Apr 2022)

  Changed paths:
    M lld/MachO/ConcatOutputSection.cpp
    M lld/MachO/Driver.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/SymbolTable.cpp
    M lld/MachO/Symbols.cpp
    M lld/MachO/Symbols.h
    M lld/MachO/SyntheticSections.cpp
    M lld/MachO/UnwindInfoSection.cpp

  Log Message:
  -----------
  [lld-macho][nfc] Use includeInSymtab for all symtab-skipping logic

{D123302} got me looking deeper at `includeInSymtab`. I thought it was a
little odd that there were excluded (live) symbols for which
`includeInSymtab` was false; we shouldn't have so many different ways to
exclude a symbol. As such, this diff makes the `L`-prefixed-symbol
exclusion code use `includeInSymtab` too. (Note that as part of our
support for `__eh_frame`, we will also be excluding all `__eh_frame`
symbols from the symtab in a future diff.)

Another thing I noticed is that the `emitStabs` code never has to deal
with excluded symbols because `SymtabSection::finalize()` already
filters them out. As such, I've updated the comments and asserts from
{D123302} to reflect this.

Reviewed By: #lld-macho, thakis

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




More information about the All-commits mailing list