[squeak-dev] FFI: get function address?

John M McIntosh johnmci at smalltalkconsulting.com
Fri Mar 26 03:43:15 UTC 2010


There usually is an operating system call that you feed a "symbol" to that gives you a memory address. 
This address could be: 

(a) the start address of executable code.
(b) the start address of read only, or read/write storage for a data element of some sort.

This is kinda of exposed in the VM api via 

	VM->ioLoadModuleOfLength = ioLoadModuleOfLength;
	VM->ioLoadSymbolOfLengthFromModule = ioLoadSymbolOfLengthFromModule;



On 2010-03-25, at 7:50 PM, Schwab,Wilhelm K wrote:

> Hello all,
> 
> Does Squeak/Pharo FFI offer a way to get the address of a function in a library?  The target of interest is probably more of an exported global containing a pointer, but GetProcAddress() worked on Windows, and I am assuming a similar trick will be required on Linux.
> 
> Bill
> 
> 

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2445 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100325/ad8ad7c7/smime.bin


More information about the Squeak-dev mailing list