Files
TheRock/compiler/amd-llvm/llvm/test/tools/llvm-objcopy/COFF/strip-preserve-mtime.test
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

51 lines
1.8 KiB
Plaintext

## Note: ls -l prints the modified timestamp.
# RUN: yaml2obj %s -o %t.exe
## Preserve dates when stripping to an output file.
# RUN: cp %t.exe %t.1.exe
# RUN: touch -m -t 199705050555.55 %t.1.exe
# RUN: llvm-strip -p %t.1.exe -o %t-preserved.1.exe
# RUN: ls -l %t-preserved.1.exe | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
## Check that the stripped output is in fact a valid object file and the timestamp in the PE header is preserved.
# RUN: llvm-readobj --headers %t-preserved.1.exe | FileCheck %s
## Preserve dates available via objcopy interface as well.
# RUN: cp %t.exe %t.2.exe
# RUN: touch -m -t 199705050555.55 %t.2.exe
# RUN: llvm-objcopy -p %t.2.exe %t-preserved.2.exe
# RUN: ls -l %t-preserved.2.exe | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
# RUN: llvm-readobj --headers %t-preserved.2.exe | FileCheck %s
## Preserve dates when stripping in place.
# RUN: cp %t.exe %t.3.exe
# RUN: touch -m -t 199705050555.55 %t.3.exe
# RUN: llvm-strip -p %t.3.exe
# RUN: ls -l %t.3.exe | FileCheck %s --check-prefix=CHECK-PRESERVE-MTIME
# RUN: llvm-readobj --headers %t.3.exe | FileCheck %s
## Without -p set, don't preserve dates.
# RUN: cp %t.exe %t.4.exe
# RUN: touch -m -t 199705050555.55 %t.4.exe
# RUN: llvm-strip %t.4.exe
# RUN: ls -l %t.4.exe | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-MTIME
# RUN: llvm-readobj --headers %t.4.exe | FileCheck %s
## Always preserve the timestamp in the PE header.
# CHECK: TimeDateStamp: 1970-01-01 00:00:00 (0x0)
# CHECK-PRESERVE-MTIME: {{[[:space:]]1997}}
# CHECK-NO-PRESERVE-MTIME-NOT: {{[[:space:]]1997}}
!COFF
OptionalHeader:
Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
header:
Machine: IMAGE_FILE_MACHINE_AMD64
sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
VirtualSize: 20
symbols: []
...