The __morestack function is only available on i386 and x86_64 architectures.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 30 Dec 2014 18:22:06 +0000 (18:22 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 30 Dec 2014 18:22:06 +0000 (18:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224994 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RTDyldMemoryManager.cpp

index 4c2f7977b76d8e124d8c4974ebcd6ef531df929b..975954b538a0c7357e2020f954000365fca18ddc 100644 (file)
@@ -210,7 +210,8 @@ ARM_MATH_IMPORTS(ARM_MATH_DECL)
 #undef ARM_MATH_DECL
 #endif
 
-#if defined(__linux__) && defined(__GLIBC__)
+#if defined(__linux__) && defined(__GLIBC__) && \
+      (defined(__i386__) || defined(__x86_64__))
 extern "C" void __morestack();
 #endif
 
@@ -238,8 +239,10 @@ RTDyldMemoryManager::getSymbolAddressInProcess(const std::string &Name) {
   if (Name == "atexit") return (uint64_t)&atexit;
   if (Name == "mknod") return (uint64_t)&mknod;
 
+#if defined(__i386__) || defined(__x86_64__)
   // __morestack lives in libgcc, a static library.
   if (Name == "__morestack") return (uint64_t)&__morestack;
+#endif
 #endif // __linux__ && __GLIBC__
   
   // See ARM_MATH_IMPORTS definition for explanation