brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 0c98ca0 Raw
36 lines · plain
1// REQUIRES: x862// RUN: split-file %s %t.dir3// RUN: llvm-lib -machine:amd64 -out:%t.lib -def:%t.dir/lib.def4// RUN: llvm-mc -filetype=obj -triple=x86_64-windows %t.dir/main.s -o %t.main.obj5 6// RUN: lld-link -out:%t.exe %t.main.obj -wholearchive:%t.lib -entry:entry -subsystem:console7// RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s8 9// As LLD usually doesn't use the header/trailer object files from import10// libraries, but instead synthesizes those structures, we end up with two11// import directory entries if we force those objects to be included.12 13// CHECK:      Import {14// CHECK-NEXT:   Name: lib.dll15// CHECK-NEXT:   ImportLookupTableRVA: 0x205016// CHECK-NEXT:   ImportAddressTableRVA: 0x206817// CHECK-NEXT: }18// CHECK-NEXT: Import {19// CHECK-NEXT:   Name: lib.dll20// CHECK-NEXT:   ImportLookupTableRVA: 0x205821// CHECK-NEXT:   ImportAddressTableRVA: 0x207022// CHECK-NEXT:   Symbol: func (0)23// CHECK-NEXT: }24 25 26#--- main.s27.global entry28entry:29  call func30  ret31 32#--- lib.def33LIBRARY lib.dll34EXPORTS35func36