summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorMartell Malone <martellmalone@gmail.com>2017-07-18 17:39:11 +0000
committerMartell Malone <martellmalone@gmail.com>2017-07-18 17:39:11 +0000
commitafe8549269fc9957daea2dea697fbe41ba5bbbc4 (patch)
treecb9fbc1dbfd00dbded2fc2fd7557359b99d36a06 /llvm/lib/Object/COFFObjectFile.cpp
parentaa619221577f57c554c6d0d6523bdf73f38d4200 (diff)
downloadbcm5719-llvm-afe8549269fc9957daea2dea697fbe41ba5bbbc4.tar.gz
bcm5719-llvm-afe8549269fc9957daea2dea697fbe41ba5bbbc4.zip
llvm: add llvm-dlltool support to the archiver
A PE COFF spec compliant import library generator. Intended to be used with mingw-w64. Supports: PE COFF spec (section 8, Import Library Format) PE COFF spec (Aux Format 3: Weak Externals) Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D29892 llvm-svn: 308329
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 1e9b0c5b045..0a2053477ca 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -227,8 +227,11 @@ uint32_t COFFObjectFile::getSymbolFlags(DataRefImpl Ref) const {
if (Symb.isExternal() || Symb.isWeakExternal())
Result |= SymbolRef::SF_Global;
- if (Symb.isWeakExternal())
+ if (Symb.isWeakExternal()) {
Result |= SymbolRef::SF_Weak;
+ // We use indirect to allow the archiver to write weak externs
+ Result |= SymbolRef::SF_Indirect;
+ }
if (Symb.getSectionNumber() == COFF::IMAGE_SYM_ABSOLUTE)
Result |= SymbolRef::SF_Absolute;
OpenPOWER on IntegriCloud