mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Unbreak all of the darwin/ppc32 JIT failures having to do
with not being able to find printf. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8330b0e5d4
commit
1c8f374a3b
@ -102,6 +102,16 @@ void *JIT::getPointerToNamedFunction(const std::string &Name) {
|
||||
if (Ptr) return Ptr;
|
||||
}
|
||||
|
||||
// darwin/ppc adds $LDBLStub suffixes to various symbols like printf. These
|
||||
// are references to hidden visibility symbols that dlsym cannot resolve. If
|
||||
// we have one of these, strip off $LDBLStub and try again.
|
||||
#if defined(__APPLE__) && defined(__ppc__)
|
||||
if (Name.size() > 9 && Name[Name.size()-9] == '$' &&
|
||||
memcmp(&Name[Name.size()-8], "LDBLStub", 8) == 0)
|
||||
return getPointerToNamedFunction(std::string(Name.begin(),
|
||||
Name.end()-9));
|
||||
#endif
|
||||
|
||||
/// If a LazyFunctionCreator is installed, use it to get/create the function.
|
||||
if (LazyFunctionCreator)
|
||||
if (void *RP = LazyFunctionCreator(Name))
|
||||
|
Loading…
Reference in New Issue
Block a user