[PATCH] D39021: [llvm-objcopy] Add support for --only-keep/-j and --keep

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 02:01:10 PST 2017


jhenderson added a comment.

So, apparently, I'm unable to read code/remember what I've reviewed! I could have sworn I'd checked and found no rebuilding of the string table... Never mind - moving on! (For the record, there is no particular reason for llvm-objcopy to split apart the section header string table and the symbol name string table).



================
Comment at: test/tools/llvm-objcopy/strip-sections-only-keep.test:1
+# RUN: yaml2obj %s > %t
+# RUN: llvm-objcopy -strip-sections -only-keep=.test %t %t2
----------------
This test should also check that there is no ".test" string in the output. As noted, in the inline comments elsewhere, there's a clause that theoretically prevents stripping of .shstrtab, but we don't want it prevented in this case.

A more general test illustrating that --strip-sections doesn't leak section names would be good, but doesn't need doing as part of this change.


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:252
     };
+  // Explicit copies:
+
----------------
Blank line before this comment.


Repository:
  rL LLVM

https://reviews.llvm.org/D39021





More information about the llvm-commits mailing list