summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-10-20 23:39:54 +0000
committerLang Hames <lhames@gmail.com>2014-10-20 23:39:54 +0000
commit84801c217c69d31c24d0f1f5c7623fba5ce00536 (patch)
tree40a565b546452151459ab30a8a751ba79003e67a /llvm/lib/Object/MachOObjectFile.cpp
parentab506adf7d3ced6abcaf42f92de3d6cd15fa19e8 (diff)
downloadbcm5719-llvm-84801c217c69d31c24d0f1f5c7623fba5ce00536.tar.gz
bcm5719-llvm-84801c217c69d31c24d0f1f5c7623fba5ce00536.zip
[MCJIT] Make MCJIT honor symbol visibility settings when populating the global
symbol table. Patch by Anthony Pesch. Thanks Anthony! llvm-svn: 220245
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 6e83d8182a4..91aa13f7130 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -454,6 +454,9 @@ uint32_t MachOObjectFile::getSymbolFlags(DataRefImpl DRI) const {
if (Value && Value != UnknownAddressOrSize)
Result |= SymbolRef::SF_Common;
}
+
+ if (!(MachOType & MachO::N_PEXT))
+ Result |= SymbolRef::SF_Exported;
}
if (MachOFlags & (MachO::N_WEAK_REF | MachO::N_WEAK_DEF))
OpenPOWER on IntegriCloud