Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / wrap-i386.s
blob4684e3b25e470c0a944b7c5a576cf93a4286ee64
1 // REQUIRES: x86
2 // RUN: split-file %s %t.dir
3 // RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %t.dir/main.s -o %t.main.obj
4 // RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %t.dir/other.s -o %t.other.obj
6 // RUN: lld-link -out:%t.exe %t.main.obj %t.other.obj -entry:entry -subsystem:console -debug:symtab -safeseh:no -wrap:foo -wrap:nosuchsym
7 // RUN: llvm-objdump -d --print-imm-hex %t.exe | FileCheck %s
9 // CHECK: <_entry>:
10 // CHECK-NEXT: movl $0x11010, %edx
11 // CHECK-NEXT: movl $0x11010, %edx
12 // CHECK-NEXT: movl $0x11000, %edx
14 // RUN: llvm-readobj --symbols %t.exe > %t.dump
15 // RUN: FileCheck --check-prefix=SYM1 %s < %t.dump
16 // RUN: FileCheck --check-prefix=SYM2 %s < %t.dump
17 // RUN: FileCheck --check-prefix=SYM3 %s < %t.dump
19 // _foo = 0x00011000 = 69632
20 // ___wrap_foo = 0x00011010 = 69648
21 // SYM1: Name: _foo
22 // SYM1-NEXT: Value: 69632
23 // SYM1-NEXT: Section: IMAGE_SYM_ABSOLUTE
24 // SYM1-NEXT: BaseType: Null
25 // SYM1-NEXT: ComplexType: Null
26 // SYM1-NEXT: StorageClass: External
27 // SYM2: Name: ___wrap_foo
28 // SYM2-NEXT: Value: 69648
29 // SYM2-NEXT: Section: IMAGE_SYM_ABSOLUTE
30 // SYM2-NEXT: BaseType: Null
31 // SYM2-NEXT: ComplexType: Null
32 // SYM2-NEXT: StorageClass: External
33 // SYM3-NOT: Name: ___real_foo
35 #--- main.s
36 .global _entry
37 _entry:
38 movl $_foo, %edx
39 movl $___wrap_foo, %edx
40 movl $___real_foo, %edx
42 #--- other.s
43 .global _foo
44 .global ___wrap_foo
45 .global ___real_foo
47 _foo = 0x11000
48 ___wrap_foo = 0x11010
49 ___real_foo = 0x11020