[llvm] [llvm-objcopy] Allow -p on COFF targets (PR #171237)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 00:30:22 PST 2025


================
@@ -0,0 +1,43 @@
+## Note: ls -l prints the modified timestamp
+
+## Preserve dates when stripping to an output file.
+# RUN: yaml2obj %s -o %t.1.o
+# RUN: touch -m -t 199705050555.55 %t.1.o
+# RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o
+# RUN: ls -l %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
+# Check that the stripped output is in fact a valid object file.
+# RUN: llvm-readobj %t-preserved.1.o
+
+## Preserve dates available via objcopy interface as well.
+# RUN: yaml2obj %s -o %t.2.o
+# RUN: touch -m -t 199705050555.55 %t.2.o
+# RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o
+# RUN: ls -l %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
+# RUN: llvm-readobj %t-preserved.2.o
----------------
jh7370 wrote:

What are these llvm-readobj lines supposed to be doing?

https://github.com/llvm/llvm-project/pull/171237


More information about the llvm-commits mailing list