[PATCH] D123433: [lld-macho][nfc] Use includeInSymtab for all symtab-skipping logic

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 19:26:47 PDT 2022


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

D123302: [lld/mac] Add some comments and asserts <https://reviews.llvm.org/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: [lld/mac] Add some comments and asserts <https://reviews.llvm.org/D123302> to reflect this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123433

Files:
  lld/MachO/ConcatOutputSection.cpp
  lld/MachO/Driver.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/SymbolTable.cpp
  lld/MachO/Symbols.cpp
  lld/MachO/Symbols.h
  lld/MachO/SyntheticSections.cpp
  lld/MachO/UnwindInfoSection.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123433.421669.patch
Type: text/x-patch
Size: 9534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220409/ddb09f07/attachment.bin>


More information about the llvm-commits mailing list