[PATCH] D56840: [llvm-objcopy] [COFF] Implement --only-keep-debug

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 08:51:38 PST 2019


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

LGTM, assuming this matches GNU objcopy.



================
Comment at: test/tools/llvm-objcopy/COFF/only-keep-debug.test:5
+RUN: llvm-readobj --sections %t.out.exe | FileCheck %s --check-prefix=SECTIONS
+RUN: llvm-objdump -t %t.out.exe | FileCheck %s --check-prefix=SYMBOLS
+
----------------
You don't need to change this, but the GNU style of llvm-readobj also provides symbol dumping in the style you are looking at. It may be useful to use that instead, if you want to keep things to one run of llvm-readobj.


================
Comment at: test/tools/llvm-objcopy/COFF/only-keep-debug.test:8
+Check that all non-debug/buildid sections with IMAGE_SCN_CNT_CODE
+or IMAGE_SCN_CNT_INITIALIZED_DATA are truncated, and none others.
+
----------------
Oops, that should be "no others".


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

https://reviews.llvm.org/D56840





More information about the llvm-commits mailing list