[squeak-dev] Re: Wrap .a into a .so for use by FFI

Andreas Raab andreas.raab at gmx.de
Fri Aug 20 03:53:00 UTC 2010


Check your GCC linker options; I think this might do the trick:

http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

-rdynamic
     Pass the flag -export-dynamic to the ELF linker, on targets that 
support it. This instructs the linker to add all symbols, not only used 
ones, to the dynamic symbol table. This option is needed for some uses 
of dlopen or to allow obtaining backtraces from within a program.


On 8/19/2010 6:31 PM, Schwab,Wilhelm K wrote:
> In short, I have a static library (.a) and want to make a shared library (.so) that exports all of the functions in the static library for use by FFI.  I have something building, but it is presumably being too helpful and stripping out the unreferenced symbols, leaving me with nothing??  Is there an easy way to include the code in the resulting .so?
>
> I am starting to work with a data acquisition board from Access IO.  My original plan was to write something in C++ that would wrap the board and driver with a socket server.  The idea was to get the benefit of a separate OS process that could aggressively (quasi real time) move data as needed, allowing Pharo to simply read from a socket and otherwise be unblocked.
>




More information about the Squeak-dev mailing list