[PATCH] D61672: [llvm-objcopy] Allow strip symtab in executables and DSOs

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 13:57:15 PDT 2019


jakehehrlich added inline comments.


================
Comment at: tools/llvm-objcopy/ELF/Object.cpp:1791
 
+Error Object::removeUnneededSections() {
+  // We can remove an empty symbol table from non-relocatable objects.
----------------
This should not be a method on Object. The goal is to keep Object highly generic. Please see how to remove this from Object's interface.


================
Comment at: tools/llvm-objcopy/ELF/Object.cpp:1804-1806
+  return removeSections(false, [&](const SectionBase &Sec) {
+    return &Sec == SymbolTable || &Sec == StrTab;
+  });
----------------
I realize this is contrary to James's recommendation that this be a separate function but it would be nice if we used the same removeSections call to do this. This isn't critical however.


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

https://reviews.llvm.org/D61672





More information about the llvm-commits mailing list