diff options
Diffstat (limited to 'contrib/llvm-project/compiler-rt/lib/orc/macho_platform.cpp')
-rw-r--r-- | contrib/llvm-project/compiler-rt/lib/orc/macho_platform.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm-project/compiler-rt/lib/orc/macho_platform.cpp b/contrib/llvm-project/compiler-rt/lib/orc/macho_platform.cpp index e3a1cdf3c4fc..340846f5f900 100644 --- a/contrib/llvm-project/compiler-rt/lib/orc/macho_platform.cpp +++ b/contrib/llvm-project/compiler-rt/lib/orc/macho_platform.cpp @@ -825,6 +825,10 @@ void *MachOPlatformRuntimeState::dlsym(void *DSOHandle, const char *Symbol) { return nullptr; } + // Sign callable symbols as functions, to match dyld. + if ((Result.second & MachOExecutorSymbolFlags::Callable) == + MachOExecutorSymbolFlags::Callable) + return reinterpret_cast<void *>(Result.first.toPtr<void(void)>()); return Result.first.toPtr<void *>(); } |