1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[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
This commit is contained in:
Lang Hames 2016-01-24 21:56:40 +00:00
parent ea5702b618
commit 84361d0d8a

View File

@ -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;