aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-01-24 21:56:40 +0000
committerLang Hames <lhames@gmail.com>2016-01-24 21:56:40 +0000
commit074b42debb42f933b80f7fc885b24124ca98f717 (patch)
tree1c258424f4587201a35374d307ff02ea59b78941 /llvm/lib/Object/COFFObjectFile.cpp
parentf088f52a1fccdeb120c4d8f47e9956ddb8c85cbf (diff)
downloadllvm-074b42debb42f933b80f7fc885b24124ca98f717.zip
llvm-074b42debb42f933b80f7fc885b24124ca98f717.tar.gz
llvm-074b42debb42f933b80f7fc885b24124ca98f717.tar.bz2
[Object][COFF] Set the generic SF_Exported flag on COFF exported symbols.
The ORC ObjectLinkingLayer uses this flag during symbol lookup. Failure to set it causes all symbols to behave as if they were non-exported, which has caused failures in the kaleidoscope tutorials on Windows. Raising the flag should un-break the tutorials. No test case yet - none of the existing command line tools for printing symbol tables (llvm-nm, llvm-objdump) show the status of this flag, and I don't want to change the format from these tools without consulting their owners. I'll send an email to the dev-list to figure out the right way forward. llvm-svn: 258665
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 4cd6aff..35e9392 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -207,7 +207,7 @@ uint32_t COFFObjectFile::getSymbolFlags(DataRefImpl Ref) const {
uint32_t Result = SymbolRef::SF_None;
if (Symb.isExternal() || Symb.isWeakExternal())
- Result |= SymbolRef::SF_Global;
+ Result |= (SymbolRef::SF_Global | SymbolRef::SF_Exported);
if (Symb.isWeakExternal())
Result |= SymbolRef::SF_Weak;