Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-objcopy / ELF / common-symbol.test
blob4a4c295f530d296b5f621cf7b9d6d7d22276dcf9
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy %t %t2
3 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
5 !ELF
6 FileHeader:
7   Class:           ELFCLASS64
8   Data:            ELFDATA2LSB
9   Type:            ET_EXEC
10   Machine:         EM_HEXAGON
11 Symbols:
12   - Name:     test
13     Index:    SHN_COMMON
14     Value:    0x1233
15     Binding:  STB_GLOBAL
16   - Name:     test1
17     Index:    SHN_HEXAGON_SCOMMON
18     Value:    0x1234
19     Binding:  STB_GLOBAL
20   - Name:     test2
21     Index:    SHN_HEXAGON_SCOMMON_1
22     Value:    0x1235
23     Binding:  STB_GLOBAL
24   - Name:     test3
25     Index:    SHN_HEXAGON_SCOMMON_2
26     Value:    0x1236
27     Binding:  STB_GLOBAL
28   - Name:     test4
29     Index:    SHN_HEXAGON_SCOMMON_4
30     Value:    0x1237
31     Binding:  STB_GLOBAL
32   - Name:     test5
33     Index:    SHN_HEXAGON_SCOMMON_8
34     Value:    0x1238
35     Binding:  STB_GLOBAL
37 #CHECK:     Symbols [
38 #CHECK-NEXT:   Symbol {
39 #CHECK-NEXT:    Name:
40 #CHECK-NEXT:    Value: 0x0
41 #CHECK-NEXT:    Size: 0
42 #CHECK-NEXT:    Binding: Local (0x0)
43 #CHECK-NEXT:    Type: None (0x0)
44 #CHECK-NEXT:    Other: 0
45 #CHECK-NEXT:    Section: Undefined (0x0)
46 #CHECK-NEXT:  }
47 #CHECK-NEXT:  Symbol {
48 #CHECK-NEXT:    Name: test
49 #CHECK-NEXT:    Value: 0x1233
50 #CHECK-NEXT:    Size: 0
51 #CHECK-NEXT:    Binding: Global (0x1)
52 #CHECK-NEXT:    Type: None (0x0)
53 #CHECK-NEXT:    Other: 0
54 #CHECK-NEXT:    Section: Common (0xFFF2)
55 #CHECK-NEXT:  }
56 #CHECK-NEXT:  Symbol {
57 #CHECK-NEXT:    Name: test1
58 #CHECK-NEXT:    Value: 0x1234
59 #CHECK-NEXT:    Size: 0
60 #CHECK-NEXT:    Binding: Global (0x1)
61 #CHECK-NEXT:    Type: None (0x0)
62 #CHECK-NEXT:    Other: 0
63 #CHECK-NEXT:    Section: Processor Specific (0xFF00)
64 #CHECK-NEXT:  }
65 #CHECK-NEXT:  Symbol {
66 #CHECK-NEXT:    Name: test2
67 #CHECK-NEXT:    Value: 0x1235
68 #CHECK-NEXT:    Size: 0
69 #CHECK-NEXT:    Binding: Global (0x1)
70 #CHECK-NEXT:    Type: None (0x0)
71 #CHECK-NEXT:    Other: 0
72 #CHECK-NEXT:    Section: Processor Specific (0xFF01)
73 #CHECK-NEXT:  }
74 #CHECK-NEXT:  Symbol {
75 #CHECK-NEXT:    Name: test3
76 #CHECK-NEXT:    Value: 0x1236
77 #CHECK-NEXT:    Size: 0
78 #CHECK-NEXT:    Binding: Global (0x1)
79 #CHECK-NEXT:    Type: None (0x0)
80 #CHECK-NEXT:    Other: 0
81 #CHECK-NEXT:    Section: Processor Specific (0xFF02)
82 #CHECK-NEXT:  }
83 #CHECK-NEXT:  Symbol {
84 #CHECK-NEXT:    Name: test4
85 #CHECK-NEXT:    Value: 0x1237
86 #CHECK-NEXT:    Size: 0
87 #CHECK-NEXT:    Binding: Global (0x1)
88 #CHECK-NEXT:    Type: None (0x0)
89 #CHECK-NEXT:    Other: 0
90 #CHECK-NEXT:    Section: Processor Specific (0xFF03)
91 #CHECK-NEXT:  }
92 #CHECK-NEXT:  Symbol {
93 #CHECK-NEXT:    Name: test5
94 #CHECK-NEXT:    Value: 0x1238
95 #CHECK-NEXT:    Size: 0
96 #CHECK-NEXT:    Binding: Global (0x1)
97 #CHECK-NEXT:    Type: None (0x0)
98 #CHECK-NEXT:    Other: 0
99 #CHECK-NEXT:    Section: Processor Specific (0xFF04)
100 #CHECK-NEXT:  }
101 #CHECK-NEXT:]