[PATCH] Make the __morestack function available to the JIT memory manager under Linux.
Peter Collingbourne
peter at pcc.me.uk
Tue Dec 30 10:07:58 PST 2014
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6788
Files:
llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp
Index: llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp
===================================================================
--- llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp
+++ llvm/trunk/lib/ExecutionEngine/RTDyldMemoryManager.cpp
@@ -210,6 +210,10 @@
#undef ARM_MATH_DECL
#endif
+#if defined(__linux__) && defined(__GLIBC__)
+extern "C" void __morestack();
+#endif
+
uint64_t
RTDyldMemoryManager::getSymbolAddressInProcess(const std::string &Name) {
// This implementation assumes that the host program is the target.
@@ -233,6 +237,9 @@
if (Name == "lstat64") return (uint64_t)&lstat64;
if (Name == "atexit") return (uint64_t)&atexit;
if (Name == "mknod") return (uint64_t)&mknod;
+
+ // __morestack lives in libgcc, a static library.
+ if (Name == "__morestack") return (uint64_t)&__morestack;
#endif // __linux__ && __GLIBC__
// See ARM_MATH_IMPORTS definition for explanation
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6788.17722.patch
Type: text/x-patch
Size: 926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141230/6379f9b1/attachment.bin>
More information about the llvm-commits
mailing list