When the function called by the ffi called a function defined in a shared library generate a fatal error

The correction was to take into consideration the GOT.
This commit is contained in:
Paulo Pizarro
2014-01-02 16:17:59 -02:00
parent 3dc3f32c35
commit 1a0b01e171
2 changed files with 23 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
ffi.c - Copyright (c) 2012 Alexandre K. I. de Mendonca <alexandre.keunecke@gmail.com> ffi.c - Copyright (c) 2012 Alexandre K. I. de Mendonca <alexandre.keunecke@gmail.com>,
Paulo Pizarro <paulo.pizarro@gmail.com>
Blackfin Foreign Function Interface Blackfin Foreign Function Interface

View File

@@ -1,5 +1,6 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
sysv.S - Copyright (c) 2012 Alexandre K. I. de Mendonca <alexandre.keunecke@gmail.com> sysv.S - Copyright (c) 2012 Alexandre K. I. de Mendonca <alexandre.keunecke@gmail.com>,
Paulo Pizarro <paulo.pizarro@gmail.com>
Blackfin Foreign Function Interface Blackfin Foreign Function Interface
@@ -47,6 +48,7 @@
ecif.rvalue = stack (fp+24) ecif.rvalue = stack (fp+24)
fn = stack (fp+28) fn = stack (fp+28)
got (fp+32) got (fp+32)
There is room for improvement here (we can use temporary registers There is room for improvement here (we can use temporary registers
instead of saving the values in the memory) instead of saving the values in the memory)
REGS: REGS: