[PATCH] D57440: [llvm-strip] Add --strip-symbol
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 30 02:27:27 PST 2019
jhenderson added inline comments.
================
Comment at: test/tools/llvm-objcopy/ELF/strip-symbol.test:2
# RUN: yaml2obj %s > %t
+# RUN: llvm-strip --strip-symbol baz -N bar %t -o %t2
+# RUN: llvm-readobj --symbols --sections %t2 | FileCheck %s
----------------
Please use a different output file for each test case. Probably easiest is to put this after the llvm-objcopy case and use `%t3` instead.
================
Comment at: tools/llvm-objcopy/CopyConfig.cpp:437
if (!Config.StripDebug && !Config.StripUnneeded && !Config.DiscardAll &&
- !Config.StripAllGNU)
+ !Config.StripAllGNU && !InputArgs.hasArg(STRIP_strip_symbol))
Config.StripAll = true;
----------------
I'm not sure I like checking InputArgs here, since it looks weird compared to the other cases. Perhaps the better thing to do would be to move this entire if clause to after the for loops, and then check if the `SymbolsToRemove` vector is empty.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57440/new/
https://reviews.llvm.org/D57440
More information about the llvm-commits
mailing list