[PATCH] D126046: [lld-macho] Support -non_global_symbols_strip_list, -non_global_symbols_no_strip_list, -x

Vincent Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 03:25:33 PDT 2022


thevinster added inline comments.


================
Comment at: lld/MachO/Driver.cpp:1421
+  {
+    bool hasInclude = false;
+    bool hasExclude = false;
----------------
nit: variable name seems clearer if it's named `includeLocal`/`excludeLocal`. 


================
Comment at: lld/MachO/SyntheticSections.cpp:971
+    break;
+  case SymtabPresence::None:
+    localSymbolsHandler = [&](Symbol *) { /* Do nothing*/ };
----------------
Does this case need to be enumerated if it's already being filtered out below? 


================
Comment at: lld/test/MachO/local-symbol-output.s:73
+
+## Test interactions with exported_symbol.
+# RUN: %lld %t/main.o -o %t/strip_all_export_one.out \
----------------
Can we also have a test for interactions with `-unexported_symbol` as well? Specifically, that a global doesn't get included in the symbol table?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126046



More information about the llvm-commits mailing list