Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / dynamic-list-preempt.s
bloba4c072e5a91c412f7d4ec58bc7c00de7385b2b25
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "{ foo; zed; };" > %t.list
5 # RUN: echo "{ global: foo; bar; local: *; };" > %t.vers
6 # RUN: ld.lld --hash-style=sysv -fatal-warnings -dynamic-list %t.list -version-script %t.vers -shared %t.o -o %t.so
7 # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=RELOCS %s
8 # RUN: llvm-readobj --dyn-syms %t.so | FileCheck --check-prefix=DYNSYMS %s
10 # RUN: echo "V1 { global: foo; bar; local: *; };" > %t.vers
11 # RUN: ld.lld --hash-style=sysv -fatal-warnings -dynamic-list %t.list -version-script %t.vers -shared %t.o -o %t.so
12 # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=RELOCS %s
13 # RUN: llvm-readobj --dyn-syms %t.so | FileCheck --check-prefix=DYNSYMS %s
15 # RELOCS: Relocations [
16 # RELOCS-NEXT: Section ({{.*}}) .rela.plt {
17 # RELOCS-NEXT: R_X86_64_JUMP_SLOT foo{{.*}} 0x0
18 # RELOCS-NEXT: R_X86_64_JUMP_SLOT ext 0x0
19 # RELOCS-NEXT: }
20 # RELOCS-NEXT: ]
22 # DYNSYMS: DynamicSymbols [
23 # DYNSYMS-NEXT: Symbol {
24 # DYNSYMS-NEXT: Name:
25 # DYNSYMS-NEXT: Value: 0x0
26 # DYNSYMS-NEXT: Size: 0
27 # DYNSYMS-NEXT: Binding: Local
28 # DYNSYMS-NEXT: Type: None
29 # DYNSYMS-NEXT: Other: 0
30 # DYNSYMS-NEXT: Section: Undefined
31 # DYNSYMS-NEXT: }
32 # DYNSYMS-NEXT: Symbol {
33 # DYNSYMS-NEXT: Name: foo
34 # DYNSYMS-NEXT: Value:
35 # DYNSYMS-NEXT: Size:
36 # DYNSYMS-NEXT: Binding: Global
37 # DYNSYMS-NEXT: Type:
38 # DYNSYMS-NEXT: Other:
39 # DYNSYMS-NEXT: Section:
40 # DYNSYMS-NEXT: }
41 # DYNSYMS-NEXT: Symbol {
42 # DYNSYMS-NEXT: Name: bar
43 # DYNSYMS-NEXT: Value:
44 # DYNSYMS-NEXT: Size:
45 # DYNSYMS-NEXT: Binding: Global
46 # DYNSYMS-NEXT: Type:
47 # DYNSYMS-NEXT: Other:
48 # DYNSYMS-NEXT: Section:
49 # DYNSYMS-NEXT: }
50 # DYNSYMS-NEXT: Symbol {
51 # DYNSYMS-NEXT: Name: ext
52 # DYNSYMS-NEXT: Value:
53 # DYNSYMS-NEXT: Size:
54 # DYNSYMS-NEXT: Binding: Global
55 # DYNSYMS-NEXT: Type:
56 # DYNSYMS-NEXT: Other:
57 # DYNSYMS-NEXT: Section:
58 # DYNSYMS-NEXT: }
59 # DYNSYMS-NEXT: ]
61 .globl foo
62 foo:
63 ret
65 .globl bar
66 bar:
67 ret
69 .globl baz
70 baz:
71 ret
73 .globl zed
74 zed:
75 ret
77 call foo@PLT
78 call bar@PLT
79 call baz@PLT
80 call zed@PLT
81 call ext@PLT