brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 7a964fa Raw
52 lines · plain
1// REQUIRES: x862// RUN: split-file %s %t.dir3// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/main.s -o %t.main.obj4// RUN: llvm-mc -filetype=obj -triple=x86_64-win32-gnu %t.dir/other.s -o %t.other.obj5 6// RUN: lld-link -out:%t.exe %t.main.obj %t.other.obj -entry:entry -subsystem:console -debug:symtab -wrap:foo -wrap:nosuchsym7// RUN: llvm-objdump -d --print-imm-hex %t.exe | FileCheck %s8// RUN: lld-link -out:%t.exe %t.main.obj %t.other.obj -entry:entry -subsystem:console -debug:symtab -wrap:foo -wrap:foo -wrap:nosuchsym9// RUN: llvm-objdump -d --print-imm-hex %t.exe | FileCheck %s10 11// CHECK: <entry>:12// CHECK-NEXT: movl $0x11010, %edx13// CHECK-NEXT: movl $0x11010, %edx14// CHECK-NEXT: movl $0x11000, %edx15 16// RUN: llvm-readobj --symbols %t.exe > %t.dump17// RUN: FileCheck --check-prefix=SYM1 %s < %t.dump18// RUN: FileCheck --check-prefix=SYM2 %s < %t.dump19// RUN: FileCheck --check-prefix=SYM3 %s < %t.dump20 21// foo = 0x00011000 = 6963222// __wrap_foo = 0x00011010 = 6964823// SYM1:      Name: foo24// SYM1-NEXT: Value: 6963225// SYM1-NEXT: Section: IMAGE_SYM_ABSOLUTE26// SYM1-NEXT: BaseType: Null27// SYM1-NEXT: ComplexType: Null28// SYM1-NEXT: StorageClass: External29// SYM2:      Name: __wrap_foo30// SYM2-NEXT: Value: 6964831// SYM2-NEXT: Section: IMAGE_SYM_ABSOLUTE32// SYM2-NEXT: BaseType: Null33// SYM2-NEXT: ComplexType: Null34// SYM2-NEXT: StorageClass: External35// SYM3-NOT:  Name: __real_foo36 37#--- main.s38.global entry39entry:40  movl $foo, %edx41  movl $__wrap_foo, %edx42  movl $__real_foo, %edx43 44#--- other.s45.global foo46.global __wrap_foo47.global __real_foo48 49foo = 0x1100050__wrap_foo = 0x1101051__real_foo = 0x1102052