[PATCH] D58027: [llvm-objcopy] Add --strip-unneeded-symbol(s)

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 11 04:53:34 PST 2019


evgeny777 marked an inline comment as done.
evgeny777 added inline comments.


================
Comment at: test/tools/llvm-objcopy/ELF/strip-unneeded.test:29
+# RUN: llvm-objcopy --regex --strip-unneeded-symbols %t.list2.txt %t %t6
+# RUN: cmp %t2 %t6
+
----------------
mstorsjo wrote:
> All the newly added tests produce results identical to some of the existing tests, removing all symbols. Wouldn't it be useful with a test that only removes some of the unneeded symbols but not all of them, to showcase the difference?
--strip-unneeded removes only bar, foobar and foobaz. File and section symbols are not removed, also foo is not removed because it's in comdat. This is checked by original test case (line 6). Additional tests check that

1. Unneeded symbols are removed, but not STT_FILE / STT_SECTON nor comdat (%t3)
2. Stripping all symbols by regex pattern .* is identical to ---strip-unneeded (%t4)
3. Stripping just bar, foobar and foobaz is identical to --strip-unneeded, because all others should be preserved (%t5)
4. The %t6 is identical to %t4, but using a file

What kind of extra test do you feel is needed?


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

https://reviews.llvm.org/D58027





More information about the llvm-commits mailing list