From 84801c217c69d31c24d0f1f5c7623fba5ce00536 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 20 Oct 2014 23:39:54 +0000 Subject: [MCJIT] Make MCJIT honor symbol visibility settings when populating the global symbol table. Patch by Anthony Pesch. Thanks Anthony! llvm-svn: 220245 --- llvm/lib/Object/MachOObjectFile.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Object/MachOObjectFile.cpp') 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)) -- cgit v1.2.3