[PATCH] D81123: [llvm-objcopy] Reorder --dump-section for MachO. Fixes PR44283

Sameer Arora via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 08:14:15 PDT 2020


sameerarora101 marked 5 inline comments as done.
sameerarora101 added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/MachO/dump-before-add-remove.test:5
+# RUN: llvm-objcopy --dump-section __TEXT,__text=%t1.dump.text --remove-section __TEXT,__text %t %t2
+# RUN: od -t x1 %t1.dump.text | FileCheck %s --ignore-case
+# RUN: wc -c %t1.dump.text | FileCheck %s --check-prefix=SIZE
----------------
jhenderson wrote:
> If you make the section content something ASCII, you could use FileCheck directly on the file to avoid the need for `od` and `wc`:
> 
> ```# FileCheck %s --input-file=%t1.dump.txt --check-prefix=CONTENTS --implicit-check-not={{.}}
> # CONTENTS: abcd```
Really cool, thanks 😊 .




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81123





More information about the llvm-commits mailing list