[PATCH] D46369: [llvm-objcopy] Add --strip-symbol (-N) option

Paul Semel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 02:12:33 PDT 2018


paulsemel added inline comments.


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:349
 
-    Obj.SymbolTable->removeSymbols([&](const Symbol &Sym) {
+    Obj.removeSymbols([&](const Symbol &Sym) {
       if (Config.DiscardAll && Sym.Binding == STB_LOCAL &&
----------------
jakehehrlich wrote:
> Just thought about this. Can we do symbol removals before symbol updates?
Well, I took a look and, to me, it doesn't seem that there is technical reasons not to do it.
For the moment, I don't think this is really relevant, as the user might explicitly enter collapsing options to trigger the counter performance (like LocalizeHidden and DiscardAll for example). Anyway, for the future options I'm planning to implement, I'm pretty sure that the collapsing will be less evident to the user (and in all cases, we might not count on the user not to enter collapsing options, so we might do it anyway).
If you want, I can propose this change in its own patch, to get better track of changes we make ? :)


Repository:
  rL LLVM

https://reviews.llvm.org/D46369





More information about the llvm-commits mailing list