summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-12-30 18:22:06 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-12-30 18:22:06 +0000
commitc5de311417b2802baec2f117b2234674d729534a (patch)
tree3d876076e0a0bd087c0264025150238c3afd6bc9 /llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
parent06e8543cd0e0c2b3477ee522a49c20e021b38088 (diff)
downloadbcm5719-llvm-c5de311417b2802baec2f117b2234674d729534a.tar.gz
bcm5719-llvm-c5de311417b2802baec2f117b2234674d729534a.zip
The __morestack function is only available on i386 and x86_64 architectures.
llvm-svn: 224994
Diffstat (limited to 'llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp b/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
index 4c2f7977b76..975954b538a 100644
--- a/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
+++ b/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
@@ -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
OpenPOWER on IntegriCloud