From 1f04462c22a2b0fc0bb1fc7d33b39418308fb868 Mon Sep 17 00:00:00 2001 From: Torok Edwin Date: Sat, 23 May 2009 16:23:59 +0000 Subject: [PATCH] stat64/open64/lseek64 for the interpreter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72329 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/JIT/Intercept.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp index ddc9f1303e8..3dcc4626a1f 100644 --- a/lib/ExecutionEngine/JIT/Intercept.cpp +++ b/lib/ExecutionEngine/JIT/Intercept.cpp @@ -51,7 +51,7 @@ static void runAtExitHandlers() { #if defined(HAVE_SYS_STAT_H) #include #endif - +#include /* stat functions are redirecting to __xstat with a version number. On x86-64 * linking with libc_nonshared.a and -Wl,--export-dynamic doesn't make 'stat' * available as an exported symbol, so we have to add it explicitly. @@ -63,6 +63,9 @@ public: sys::DynamicLibrary::AddSymbol("fstat", (void*)(intptr_t)fstat); sys::DynamicLibrary::AddSymbol("lstat", (void*)(intptr_t)lstat); sys::DynamicLibrary::AddSymbol("stat64", (void*)(intptr_t)stat64); + sys::DynamicLibrary::AddSymbol("\x1stat64", (void*)(intptr_t)stat64); + sys::DynamicLibrary::AddSymbol("\x1open64", (void*)(intptr_t)open64); + sys::DynamicLibrary::AddSymbol("\x1lseek64", (void*)(intptr_t)lseek64); sys::DynamicLibrary::AddSymbol("fstat64", (void*)(intptr_t)fstat64); sys::DynamicLibrary::AddSymbol("lstat64", (void*)(intptr_t)lstat64); sys::DynamicLibrary::AddSymbol("atexit", (void*)(intptr_t)atexit);