From 074b42debb42f933b80f7fc885b24124ca98f717 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sun, 24 Jan 2016 21:56:40 +0000 Subject: [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 --- llvm/lib/Object/COFFObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/COFFObjectFile.cpp') 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; -- cgit v1.1