Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-objcopy / ELF / weaken-all.test
blob69f4ebc6f0a465381d03ccebec4bc7340415c3e0
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --weaken %t %t2
3 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
5 !ELF
6 FileHeader:
7   Class:           ELFCLASS64
8   Data:            ELFDATA2LSB
9   Type:            ET_REL
10   Machine:         EM_X86_64
11 Sections:
12   - Name:            .text
13     Type:            SHT_PROGBITS
14     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
15     Address:         0x1000
16     AddressAlign:    0x0000000000000010
17     Size:            64
18   - Name:            .rel.text
19     Type:            SHT_REL
20     Info:            .text
21     Relocations:
22       - Offset: 0x1000
23         Symbol: undefGlobal
24         Type:   R_X86_64_PC32
25 Symbols:
26   - Name:     Local
27     Type:     STT_FUNC
28     Section:  .text
29     Value:    0x1008
30     Size:     8
31   - Name:     Global
32     Type:     STT_FUNC
33     Size:     8
34     Section:  .text
35     Value:    0x1018
36     Binding:  STB_GLOBAL
37   - Name:     undefGlobal
38     Type:     STT_FUNC
39     Size:     8
40     Binding:  STB_GLOBAL
41   - Name:     Weak
42     Type:     STT_FUNC
43     Size:     8
44     Section:  .text
45     Value:    0x1010
46     Binding:  STB_WEAK
47   - Name:     GnuUnique
48     Section:  .text
49     Value:    0x1010
50     Binding:  STB_GNU_UNIQUE
52 #CHECK: Symbols [
53 #CHECK-NEXT:  Symbol {
54 #CHECK-NEXT:    Name:
55 #CHECK-NEXT:    Value: 0x0
56 #CHECK-NEXT:    Size: 0
57 #CHECK-NEXT:    Binding: Local
58 #CHECK-NEXT:    Type: None
59 #CHECK-NEXT:    Other: 0
60 #CHECK-NEXT:    Section: Undefined
61 #CHECK-NEXT:  }
62 #CHECK-NEXT:  Symbol {
63 #CHECK-NEXT:    Name: Local
64 #CHECK-NEXT:    Value: 0x1008
65 #CHECK-NEXT:    Size: 8
66 #CHECK-NEXT:    Binding: Local
67 #CHECK-NEXT:    Type: Function
68 #CHECK-NEXT:    Other: 0
69 #CHECK-NEXT:    Section: .text
70 #CHECK-NEXT:  }
71 #CHECK-NEXT:  Symbol {
72 #CHECK-NEXT:    Name: Global
73 #CHECK-NEXT:    Value: 0x1018
74 #CHECK-NEXT:    Size: 8
75 #CHECK-NEXT:    Binding: Weak
76 #CHECK-NEXT:    Type: Function
77 #CHECK-NEXT:    Other: 0
78 #CHECK-NEXT:    Section: .text
79 #CHECK-NEXT:  }
80 #CHECK-NEXT:  Symbol {
81 #CHECK-NEXT:    Name: undefGlobal
82 #CHECK-NEXT:    Value: 0x0
83 #CHECK-NEXT:    Size: 8
84 #CHECK-NEXT:    Binding: Global
85 #CHECK-NEXT:    Type: Function
86 #CHECK-NEXT:    Other: 0
87 #CHECK-NEXT:    Section:
88 #CHECK-NEXT:  }
89 #CHECK-NEXT:  Symbol {
90 #CHECK-NEXT:    Name: Weak
91 #CHECK-NEXT:    Value: 0x1010
92 #CHECK-NEXT:    Size: 8
93 #CHECK-NEXT:    Binding: Weak
94 #CHECK-NEXT:    Type: Function
95 #CHECK-NEXT:    Other: 0
96 #CHECK-NEXT:    Section: .text
97 #CHECK-NEXT:  }
98 #CHECK-NEXT:  Symbol {
99 #CHECK-NEXT:    Name: GnuUnique
100 #CHECK-NEXT:    Value: 0x1010
101 #CHECK-NEXT:    Size: 0
102 #CHECK-NEXT:    Binding: Weak
103 #CHECK-NEXT:    Type: None
104 #CHECK-NEXT:    Other: 0
105 #CHECK-NEXT:    Section: .text
106 #CHECK-NEXT:  }
107 #CHECK-NEXT:]