diff options
Diffstat (limited to 'lld/lib/ReaderWriter/PECOFF/IdataPass.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/PECOFF/IdataPass.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp b/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp index 925a262416f..1357168d9a1 100644 --- a/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp +++ b/lld/lib/ReaderWriter/PECOFF/IdataPass.cpp @@ -185,7 +185,10 @@ void DelayImportDirectoryAtom::addRelocations( for (int i = 0, e = sharedAtoms.size(); i < e; ++i) { const DefinedAtom *loader = new (_alloc) DelayLoaderAtom( context, addrTable[i], this, delayLoadHelper); - addDir64Reloc(addrTable[i], loader, context.ctx.getMachineType(), 0); + if (context.ctx.is64Bit()) + addDir64Reloc(addrTable[i], loader, context.ctx.getMachineType(), 0); + else + addDir32NBReloc(addrTable[i], loader, context.ctx.getMachineType(), 0); } } |