The previous test was testing -flavor link. This patch correctly
tests link2 and fixes a bug that we didn't emit import thunks.
llvm-svn: 243559
uint16_t Machine)
: Defined(DefinedImportThunkKind, Name) {
switch (Machine) {
- case AMD64:
- Data.reset(new ImportThunkChunkX64(S));
- return;
- case I386:
- Data.reset(new ImportThunkChunkX86(S));
- return;
- default:
- llvm_unreachable("unknown machine type");
+ case AMD64: Data.reset(new ImportThunkChunkX64(S)); return;
+ case I386: Data.reset(new ImportThunkChunkX86(S)); return;
+ case ARMNT: Data.reset(new ImportThunkChunkARM(S)); return;
+ default: llvm_unreachable("unknown machine type");
}
}
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld -flavor link /out:%t.exe /subsystem:console %t.obj %p/Inputs/library.lib
+# RUN: lld -flavor link2 /out:%t.exe /subsystem:console %t.obj \
+# RUN: /entry:mainCRTStartup %p/Inputs/library.lib
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s
# CHECK: Import {
# CHECK: Name: library.dll
-# CHECK: ImportLookupTableRVA: 0x4000
-# CHECK: ImportAddressTableRVA: 0x2000
+# CHECK: ImportLookupTableRVA: 0x2028
+# CHECK: ImportAddressTableRVA: 0x2030
# CHECK: Symbol: function (0)
# CHECK: }