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 5 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 8 9// CHECK: <_entry>: 10// CHECK-NEXT: movl $0x11010, %edx 11// CHECK-NEXT: movl $0x11010, %edx 12// CHECK-NEXT: movl $0x11000, %edx 13 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 18 19// _foo = 0xffc11000 = 4290842624 20// ___wrap_foo = ffc11010 = 4290842640 21// SYM1: Name: _foo 22// SYM1-NEXT: Value: 4290842624 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: 4290842640 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 34 35#--- main.s 36.global _entry 37_entry: 38 movl $_foo, %edx 39 movl $___wrap_foo, %edx 40 movl $___real_foo, %edx 41 42#--- other.s 43.global _foo 44.global ___wrap_foo 45.global ___real_foo 46 47_foo = 0x11000 48___wrap_foo = 0x11010 49___real_foo = 0x11020 50