[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / llvm-objcopy / ELF / keep-file-symbols.test
blob86674f1eb2d26194343c8e27d624b9b1e53a39e4
1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objcopy --strip-all --keep-file-symbols %t %t2
3 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIPALL
4 # RUN: llvm-objcopy --keep-file-symbols --strip-symbol foo %t %t2
5 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=STRIP
7 # RUN: llvm-strip --keep-file-symbols %t -o %t3
8 # RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=STRIPALL
9 # RUN: llvm-strip --keep-file-symbols --strip-symbol foo %t -o %t4
10 # RUN: llvm-readobj --symbols %t4 | FileCheck %s --check-prefix=STRIP
12 !ELF
13 FileHeader:
14   Class:           ELFCLASS64
15   Data:            ELFDATA2LSB
16   Type:            ET_REL
17   Machine:         EM_X86_64
18 Sections:
19   - Name:            .text
20     Type:            SHT_PROGBITS
21     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
22     Address:         0x1000
23     AddressAlign:    0x0000000000000010
24     Size:            64
25 Symbols:
26   - Name:     foo
27     Type:     STT_FILE
28     Section:  .text
29   - Name:     bar
30     Type:     STT_FUNC
31     Section:  .text
32     Binding:  STB_GLOBAL
34 #STRIPALL: Symbols [
35 #STRIPALL-NEXT:  Symbol {
36 #STRIPALL-NEXT:    Name:
37 #STRIPALL-NEXT:    Value: 0x0
38 #STRIPALL-NEXT:    Size: 0
39 #STRIPALL-NEXT:    Binding: Local
40 #STRIPALL-NEXT:    Type: None
41 #STRIPALL-NEXT:    Other: 0
42 #STRIPALL-NEXT:    Section: Undefined
43 #STRIPALL-NEXT:  }
44 #STRIPALL-NEXT:  Symbol {
45 #STRIPALL-NEXT:    Name: foo
46 #STRIPALL-NEXT:    Value: 0x0
47 #STRIPALL-NEXT:    Size: 0
48 #STRIPALL-NEXT:    Binding: Local
49 #STRIPALL-NEXT:    Type: File
50 #STRIPALL-NEXT:    Other: 0
51 #STRIPALL-NEXT:    Section: .text
52 #STRIPALL-NEXT:  }
53 #STRIPALL-NEXT:]
55 #STRIP: Symbols [
56 #STRIP-NEXT:  Symbol {
57 #STRIP-NEXT:    Name:
58 #STRIP-NEXT:    Value: 0x0
59 #STRIP-NEXT:    Size: 0
60 #STRIP-NEXT:    Binding: Local
61 #STRIP-NEXT:    Type: None
62 #STRIP-NEXT:    Other: 0
63 #STRIP-NEXT:    Section: Undefined
64 #STRIP-NEXT:  }
65 #STRIP-NEXT:  Symbol {
66 #STRIP-NEXT:    Name: foo
67 #STRIP-NEXT:    Value: 0x0
68 #STRIP-NEXT:    Size: 0
69 #STRIP-NEXT:    Binding: Local
70 #STRIP-NEXT:    Type: File
71 #STRIP-NEXT:    Other: 0
72 #STRIP-NEXT:    Section: .text
73 #STRIP-NEXT:  }
74 #STRIP-NEXT:  Symbol {
75 #STRIP-NEXT:    Name: bar
76 #STRIP-NEXT:    Value: 0x0
77 #STRIP-NEXT:    Size: 0
78 #STRIP-NEXT:    Binding: Global
79 #STRIP-NEXT:    Type: Function
80 #STRIP-NEXT:    Other: 0
81 #STRIP-NEXT:    Section: .text
82 #STRIP-NEXT:  }
83 #STRIP-NEXT:]