[PATCH] D114737: [lld][Macho] Include dead-stripped symbols in mapfile

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 09:49:47 PST 2022


oontvoo added inline comments.


================
Comment at: lld/MachO/MapFile.cpp:46
+// the right element is a container of all dead symbols.
+static std::pair<Symbols, Symbols> getSymbols() {
+  Symbols liveSymbols, deadSymbols;
----------------
int3 wrote:
> oontvoo wrote:
> > It seems the `deadSymbols` is only ever used if `config->deadStrip`. 
> > Can this function take a flag (eg., includeDead) and not collect or sort dead symbols when the flag is not set?
> when the flag's not set, the `deadSymbols` vector will be empty anyway, so sorting will be a no-op.
Ah, ok! :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114737/new/

https://reviews.llvm.org/D114737



More information about the llvm-commits mailing list