Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ELF / symver.s
blobe039259268e261cca354ba6309e193aeb7dca165
1 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
2 # RUN: llvm-readobj -r %t | FileCheck %s
3 # RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYM
5 defined1:
6 defined2:
7 defined3:
8 .symver defined1, bar1@zed
9 .symver undefined1, bar2@zed
11 .symver defined2, bar3@@zed
13 .symver defined3, bar5@@@zed
14 .symver undefined3, bar6@@@zed
16 .long defined1
17 .long undefined1
18 .long defined2
19 .long defined3
20 .long undefined3
22 .global global1
23 .symver global1, g1@@zed
24 global1:
26 // CHECK: Relocations [
27 // CHECK-NEXT: Section {{.*}} .rela.text {
28 // CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0
29 // CHECK-NEXT: 0x4 R_X86_64_32 bar2@zed 0x0
30 // CHECK-NEXT: 0x8 R_X86_64_32 .text 0x0
31 // CHECK-NEXT: 0xC R_X86_64_32 .text 0x0
32 // CHECK-NEXT: 0x10 R_X86_64_32 bar6@zed 0x0
33 // CHECK-NEXT: }
34 // CHECK-NEXT: ]
36 # SYM: Symbol table '.symtab' contains 11 entries:
37 # SYM-NEXT: Num: Value Size Type Bind Vis Ndx Name
38 # SYM-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
39 # SYM-NEXT: 1: 0000000000000000 0 SECTION LOCAL DEFAULT 2 .text
40 # SYM-NEXT: 2: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 defined1
41 # SYM-NEXT: 3: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 defined2
42 # SYM-NEXT: 4: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 bar1@zed
43 # SYM-NEXT: 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 bar3@@zed
44 # SYM-NEXT: 6: 0000000000000000 0 NOTYPE LOCAL DEFAULT 2 bar5@@zed
45 # SYM-NEXT: 7: 0000000000000014 0 NOTYPE GLOBAL DEFAULT 2 global1
46 # SYM-NEXT: 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar2@zed
47 # SYM-NEXT: 9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar6@zed
48 # SYM-NEXT: 10: 0000000000000014 0 NOTYPE GLOBAL DEFAULT 2 g1@@zed