1 # Note: ls -lu prints the accessed timestamp
2 # NetBSD: noatime mounts currently inhibit 'touch -a' updates
3 # UNSUPPORTED: system-netbsd
5 # Preserve dates when stripping to an output file.
6 # RUN: yaml2obj %s > %t.1.o
7 # RUN: touch -a -t 199505050555.55 %t.1.o
8 # RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o
9 # RUN: ls -lu %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
10 # Check that the stripped output is in fact a valid object file.
11 # RUN: llvm-readobj %t-preserved.1.o
13 # Preserve dates available via objcopy interface as well.
14 # RUN: yaml2obj %s > %t.2.o
15 # RUN: touch -a -t 199505050555.55 %t.2.o
16 # RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o
17 # RUN: ls -lu %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
18 # RUN: llvm-readobj %t-preserved.2.o
20 # Preserve dates when stripping in place.
21 # RUN: yaml2obj %s > %t.3.o
22 # RUN: touch -a -t 199505050555.55 %t.3.o
23 # RUN: llvm-strip -p %t.3.o
24 # RUN: ls -lu %t.3.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
25 # RUN: llvm-readobj %t.3.o
27 # Without -p set, don't preserve dates.
28 # RUN: yaml2obj %s > %t.4.o
29 # RUN: touch -a -t 199505050555.55 %t.4.o
30 # RUN: llvm-strip %t.4.o
31 # RUN: ls -lu %t.4.o | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-ATIME
32 # RUN: llvm-readobj %t.4.o
34 # Preserve dates in archives.
35 # RUN: yaml2obj %s > %t.5.o
37 # RUN: llvm-ar cr %t.a %t.5.o
38 # RUN: touch -a -t 199505050555.55 %t.a
39 # RUN: llvm-strip -p %t.a
40 # RUN: ls -lu %t.a | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
41 # RUN: llvm-readobj %t.a
43 # Preserve dates in split DWO files.
44 # RUN: cp %p/Inputs/dwarf.dwo %t-input.dwo
45 # RUN: touch -a -t 199505050555.55 %t-input.dwo
46 # RUN: llvm-objcopy -p --split-dwo=%t-dwo %t-input.dwo %t-nondwo
47 # RUN: ls -lu %t-dwo | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
48 # RUN: llvm-readobj %t-dwo
49 # RUN: ls -lu %t-nondwo | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME
50 # RUN: llvm-readobj %t-nondwo
52 # CHECK-PRESERVE-ATIME: {{[[:space:]]1995}}
53 # CHECK-NO-PRESERVE-ATIME-NOT: {{[[:space:]]1995}}
64 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]