Displaying 1 result from an estimated 1 matches for "addone_addr".
2009 Feb 16
1
[LLVMdev] Invalid call generated on 64-bit linux when calling native C function from IR
...s a relative address and thus needs to be
within 2^24 bytes of the instruction. It looks like the code generator
should generate a jump using a function pointer in this situation and fails
to handle this.
Am I doing something wrong in my code or is this an LLVM bug?
Jan
Linux 64-bit:
(gdb) print addone_addr
$1 = (void *) 0x406018
(gdb) x/10i foo_addr
0x2b7184072030: sub $0x8,%rsp
0x2b7184072034: mov $0x14,%edi
0x2b7184072039: callq 0x2b7200406018 <--- absolutely not ok
0x2b718407203e: add $0x8,%rsp
0x2b7184072042: retq
(gdb) x/10i nfoo_addr
0x40603a <nativefoo>: pu...