[PATCH] D49979: [llvm-objcopy] Add --dump-section

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 3 02:01:22 PDT 2018


jhenderson added inline comments.


================
Comment at: test/tools/llvm-objcopy/dump-section.test:4
 # RUN: llvm-objcopy -O binary -only-keep .text %t %t3
+# RUN: llvm-objcopy --dump-section .text=%t4 %t %t5
 # RUN: od -t x1 %t2 | FileCheck %s
----------------
jakehehrlich wrote:
> Can you also dump a non-allocated section with --dump-section to show why its far more useful than the -O binary -j hack?
I'd also like a test showing what happens when you try to dump a nobits section.


================
Comment at: test/tools/llvm-objcopy/dump-section.test:5
+# RUN: llvm-objcopy --dump-section .text=%t4 %t %t5
+# RUN: llvm-objcopy --dump-section .symtab=%t6 %t %t7
 # RUN: od -t x1 %t2 | FileCheck %s
----------------
Rather than use the implicitly generated .symtab, I'd prefer it if you create a simple small non-alloc section, with explicit contents (assuming this shows what @jakehehrlich is discussing above).


Repository:
  rL LLVM

https://reviews.llvm.org/D49979





More information about the llvm-commits mailing list