diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
commit | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch) | |
tree | 599ab169a01f1c86eda9adc774edaedde2f2db5b /lib/Object/COFFImportFile.cpp | |
parent | 1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff) |
Diffstat (limited to 'lib/Object/COFFImportFile.cpp')
-rw-r--r-- | lib/Object/COFFImportFile.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Object/COFFImportFile.cpp b/lib/Object/COFFImportFile.cpp index dc11cc4bcffe..ff4a799be60c 100644 --- a/lib/Object/COFFImportFile.cpp +++ b/lib/Object/COFFImportFile.cpp @@ -1,9 +1,8 @@ //===- COFFImportFile.cpp - COFF short import file implementation ---------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -496,7 +495,7 @@ NewArchiveMember ObjectFactory::createWeakExternal(StringRef Sym, // COFF Header coff_file_header Header{ - u16(0), + u16(Machine), u16(NumberOfSections), u32(0), u32(sizeof(Header) + (NumberOfSections * sizeof(coff_section))), @@ -596,7 +595,10 @@ Error writeImportLibrary(StringRef ImportName, StringRef Path, ImportType = IMPORT_CONST; StringRef SymbolName = E.SymbolName.empty() ? E.Name : E.SymbolName; - ImportNameType NameType = getNameType(SymbolName, E.Name, Machine, MinGW); + ImportNameType NameType = E.Noname + ? IMPORT_ORDINAL + : getNameType(SymbolName, E.Name, + Machine, MinGW); Expected<std::string> Name = E.ExtName.empty() ? SymbolName : replace(SymbolName, E.Name, E.ExtName); |