[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git] / llvm / test / tools / llvm-objcopy / ELF / keep-file-symbols.test
blob8471c1831ae82a1a254658eec071c8bdcc068f9f
1 # RUN: yaml2obj %s -o %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 # RUN: llvm-objcopy --keep-file-symbols --strip-debug %t %t5
13 # RUN: llvm-readobj --symbols %t5 | FileCheck %s --check-prefix=STRIPDEBUG
14 # RUN: llvm-objcopy --keep-file-symbols --strip-unneeded %t %t6
15 # RUN: llvm-readobj --symbols %t6 | FileCheck %s --check-prefix=STRIPDEBUG
17 # RUN: llvm-strip --keep-file-symbols --strip-debug %t -o %t7
18 # RUN: llvm-readobj --symbols %t7 | FileCheck %s --check-prefix=STRIPDEBUG
19 # RUN: llvm-strip --keep-file-symbols --strip-unneeded %t -o %t8
20 # RUN: llvm-readobj --symbols %t8 | FileCheck %s --check-prefix=STRIPDEBUG
22 !ELF
23 FileHeader:
24   Class:           ELFCLASS64
25   Data:            ELFDATA2LSB
26   Type:            ET_REL
27   Machine:         EM_X86_64
28 Sections:
29   - Name:            .debugfoo
30     Type:            SHT_PROGBITS
31     Content:         "00000000"
32   - Name:            .text
33     Type:            SHT_PROGBITS
34     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
35     Address:         0x1000
36     AddressAlign:    0x0000000000000010
37     Size:            64
38 Symbols:
39   - Name:     foo
40     Type:     STT_FILE
41     Section:  .text
42   - Name:     bar
43     Type:     STT_FUNC
44     Section:  .text
45     Binding:  STB_GLOBAL
46   - Name:     debugfoo
47     Section:  .debugfoo
48     Binding:  STB_GLOBAL
50 #STRIPALL: Symbols [
51 #STRIPALL-NEXT:  Symbol {
52 #STRIPALL-NEXT:    Name:
53 #STRIPALL-NEXT:    Value: 0x0
54 #STRIPALL-NEXT:    Size: 0
55 #STRIPALL-NEXT:    Binding: Local
56 #STRIPALL-NEXT:    Type: None
57 #STRIPALL-NEXT:    Other: 0
58 #STRIPALL-NEXT:    Section: Undefined
59 #STRIPALL-NEXT:  }
60 #STRIPALL-NEXT:  Symbol {
61 #STRIPALL-NEXT:    Name: foo
62 #STRIPALL-NEXT:    Value: 0x0
63 #STRIPALL-NEXT:    Size: 0
64 #STRIPALL-NEXT:    Binding: Local
65 #STRIPALL-NEXT:    Type: File
66 #STRIPALL-NEXT:    Other: 0
67 #STRIPALL-NEXT:    Section: .text
68 #STRIPALL-NEXT:  }
69 #STRIPALL-NEXT:]
71 #STRIP: Symbols [
72 #STRIP-NEXT:  Symbol {
73 #STRIP-NEXT:    Name:
74 #STRIP-NEXT:    Value: 0x0
75 #STRIP-NEXT:    Size: 0
76 #STRIP-NEXT:    Binding: Local
77 #STRIP-NEXT:    Type: None
78 #STRIP-NEXT:    Other: 0
79 #STRIP-NEXT:    Section: Undefined
80 #STRIP-NEXT:  }
81 #STRIP-NEXT:  Symbol {
82 #STRIP-NEXT:    Name: foo
83 #STRIP-NEXT:    Value: 0x0
84 #STRIP-NEXT:    Size: 0
85 #STRIP-NEXT:    Binding: Local
86 #STRIP-NEXT:    Type: File
87 #STRIP-NEXT:    Other: 0
88 #STRIP-NEXT:    Section: .text
89 #STRIP-NEXT:  }
90 #STRIP-NEXT:  Symbol {
91 #STRIP-NEXT:    Name: bar
92 #STRIP-NEXT:    Value: 0x0
93 #STRIP-NEXT:    Size: 0
94 #STRIP-NEXT:    Binding: Global
95 #STRIP-NEXT:    Type: Function
96 #STRIP-NEXT:    Other: 0
97 #STRIP-NEXT:    Section: .text
98 #STRIP-NEXT:  }
99 #STRIP-NEXT:  Symbol {
100 #STRIP-NEXT:    Name: debugfoo
101 #STRIP-NEXT:    Value: 0x0
102 #STRIP-NEXT:    Size: 0
103 #STRIP-NEXT:    Binding: Global
104 #STRIP-NEXT:    Type: None
105 #STRIP-NEXT:    Other: 0
106 #STRIP-NEXT:    Section: .debugfoo
107 #STRIP-NEXT:  }
108 #STRIP-NEXT:]
110 #STRIPDEBUG: Symbols [
111 #STRIPDEBUG-NEXT:  Symbol {
112 #STRIPDEBUG-NEXT:    Name:
113 #STRIPDEBUG-NEXT:    Value: 0x0
114 #STRIPDEBUG-NEXT:    Size: 0
115 #STRIPDEBUG-NEXT:    Binding: Local
116 #STRIPDEBUG-NEXT:    Type: None
117 #STRIPDEBUG-NEXT:    Other: 0
118 #STRIPDEBUG-NEXT:    Section: Undefined
119 #STRIPDEBUG-NEXT:  }
120 #STRIPDEBUG-NEXT:  Symbol {
121 #STRIPDEBUG-NEXT:    Name: foo
122 #STRIPDEBUG-NEXT:    Value: 0x0
123 #STRIPDEBUG-NEXT:    Size: 0
124 #STRIPDEBUG-NEXT:    Binding: Local
125 #STRIPDEBUG-NEXT:    Type: File
126 #STRIPDEBUG-NEXT:    Other: 0
127 #STRIPDEBUG-NEXT:    Section: .text
128 #STRIPDEBUG-NEXT:  }
129 #STRIPDEBUG-NEXT:  Symbol {
130 #STRIPDEBUG-NEXT:    Name: bar
131 #STRIPDEBUG-NEXT:    Value: 0x0
132 #STRIPDEBUG-NEXT:    Size: 0
133 #STRIPDEBUG-NEXT:    Binding: Global
134 #STRIPDEBUG-NEXT:    Type: Function
135 #STRIPDEBUG-NEXT:    Other: 0
136 #STRIPDEBUG-NEXT:    Section: .text
137 #STRIPDEBUG-NEXT:  }
138 #STRIPDEBUG-NEXT:]