[PATCH] D69188: [llvm-objcopy] Preserve .ARM.attributes section when stripping files

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 02:59:10 PDT 2019


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


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/strip-preserve-arm-attributes.test:6-9
+# RUN: llvm-objcopy --strip-all %t %t2
+# RUN: llvm-readobj --sections %t2 | FileCheck %s
+# RUN: llvm-objcopy --strip-all-gnu %t %t3
+# RUN: llvm-readobj --sections %t3 | FileCheck %s
----------------
jhenderson wrote:
> Since the original issue was with llvm-strip, it probably makes sense to include llvm-strip invocations to test this. Probably the best thing to do would be to run llvm-strip and llvm-strip --strip-all-gnu and then cmp the output with the corresponding llvm-objcopy output.
I think I understood what you mean - but just to make sure you meant something like this right:

```
 # RUN: yaml2obj %s > %t
-# RUN: llvm-objcopy --strip-all %t %t2
+# RUN: llvm-strip %t %t2
 # RUN: llvm-readobj --sections %t2 | FileCheck %s
-# RUN: llvm-objcopy --strip-all-gnu %t %t3
+# RUN: llvm-strip --strip-all-gnu %t %t3
 # RUN: llvm-readobj --sections %t3 | FileCheck %s
+# RUN: llvm-objcopy --strip-all %t %t4
+# RUN: cmp %t4 %t2
+# RUN: llvm-objcopy --strip-all-gnu %t %t5
+# RUN: cmp %t5 %t3```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69188





More information about the llvm-commits mailing list