--- lib/Target/X86/X86JITInfo.cpp.orig 2008-07-02 09:41:02.000000000 +0200 +++ lib/Target/X86/X86JITInfo.cpp 2008-07-02 09:41:51.000000000 +0200 @@ -25,8 +25,10 @@ // Determine the platform we're running on #if defined (__x86_64__) || defined (_M_AMD64) # define X86_64_JIT +# define ASMSUFFIX "@PLT" #elif defined(__i386__) || defined(i386) || defined(_M_IX86) # define X86_32_JIT +# define ASMSUFFIX #endif void X86JITInfo::replaceMachineCodeForFunction(void *Old, void *New) { @@ -112,7 +114,7 @@ // JIT callee "movq %rbp, %rdi\n" // Pass prev frame and return address "movq 8(%rbp), %rsi\n" - "call " ASMPREFIX "X86CompilationCallback2\n" + "call " ASMPREFIX "X86CompilationCallback2" ASMSUFFIX "\n" // Restore all XMM arg registers "movaps 112(%rsp), %xmm7\n" "movaps 96(%rsp), %xmm6\n" @@ -186,7 +188,7 @@ "movl 4(%ebp), %eax\n" // Pass prev frame and return address "movl %eax, 4(%esp)\n" "movl %ebp, (%esp)\n" - "call " ASMPREFIX "X86CompilationCallback2\n" + "call " ASMPREFIX "X86CompilationCallback2" ASMSUFFIX "\n" "movl %ebp, %esp\n" // Restore ESP CFI(".cfi_def_cfa_register %esp\n") "subl $12, %esp\n" @@ -240,7 +242,7 @@ "movl 4(%ebp), %eax\n" // Pass prev frame and return address "movl %eax, 4(%esp)\n" "movl %ebp, (%esp)\n" - "call " ASMPREFIX "X86CompilationCallback2\n" + "call " ASMPREFIX "X86CompilationCallback2" ASMSUFFIX "\n" "addl $16, %esp\n" "movaps 48(%esp), %xmm3\n" CFI(".cfi_restore %xmm3\n")