Displaying 1 result from an estimated 1 matches for "nfoo_addr".
Did you mean:
foo_addr
2009 Feb 16
1
[LLVMdev] Invalid call generated on 64-bit linux when calling native C function from IR
...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>: push %rbp
0x40603b <nativefoo+1>: mov %rsp,%rbp
0x40603e <nativefoo+4>: mov $0x1e,%edi
0x406043 <nativefoo+9>: callq 0x406018 <addOne> <--- ok
0x406048 <nativefoo+14>: leaveq
0x406049 <nativefoo+15>: retq...