[PATCH] D66281: [llvm-objcopy][MachO] Implement --strip-all

Seiya Nuta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 01:47:36 PDT 2019


seiya added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp:53-57
+  auto RemovePred = [Config](const std::unique_ptr<SymbolEntry> &N) {
+    if (N->Referenced)
+      return false;
+    return Config.StripAll;
+  };
----------------
rupprecht wrote:
> For ELF files, --strip-all seems to strip all symbols regardless of whether they're referenced by relocations, is that not true for MachO files?
We can't remove all symbols. Symbols referenced in the indirect symbol table are necessary for dynamic linking (i.e., there're no separate sections just like `.dynsym` and `.dynstr`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66281





More information about the llvm-commits mailing list