[llvm] [llvm-objcopy] Allow -p on COFF targets (PR #171237)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 01:03:20 PST 2025
================
@@ -41,6 +41,10 @@ RUN: obj2yaml %t.x86_64.exe > %t.x86_64.exe.yaml
RUN: obj2yaml %t.x86_64-copy.exe > %t.x86_64-copy.exe.yaml
RUN: cmp %t.x86_64.exe.yaml %t.x86_64-copy.exe.yaml
+RUN: llvm-objcopy -p %t.x86_64.exe %t.x86_64-copy-p.exe
+RUN: obj2yaml %t.x86_64-copy-p.exe > %t.x86_64-copy-p.exe.yaml
+RUN: cmp %t.x86_64.exe.yaml %t.x86_64-copy-p.exe.yaml
+
----------------
jh7370 wrote:
Should this test be in a separate file named after the option, like most options?
Also, should you test the basic behaviour of modification time preservation, like on ELF? (See https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-mtime.test and https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test).
https://github.com/llvm/llvm-project/pull/171237
More information about the llvm-commits
mailing list