[Vm-dev] Call to Unix experts: how i can obtain a pointers to mmap/dlopen/dlsym functions?

Igor Stasenko siguctua at gmail.com
Sat Sep 25 18:14:12 UTC 2010


On 25 September 2010 21:08, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
>
> On 25.09.2010, at 16:27, Igor Stasenko wrote:
>
>>
>> On 25 September 2010 15:02, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>>
>>> On 25.09.2010, at 03:14, Igor Stasenko wrote:
>>>>
>>>> Is there alias of some sort, which identifies standard C library?
>>>
>>> Yes: ''
>>>
>> It actually identified main module (or global symbol space, if you want).
>> But it doesn't works :(
>
> It used to work. Guess we need to fix it?
>

I could even attempt to do that, if someone could tell me, how to
enable dprintf()
to print, what is happening inside sqNamedPrims.c
and sqUnixExternalPrims.c
so, i can see it.


> - Bert -
>
>
>> Or.. maybe it works, returning  handle = 0, except that
>> if i passing handle=0 to ioLoadSymbolOfLengthFromModule() its crashing the VM.
>>
>> I mean, since ioLoadSymbolOfLengthFromModule() ends up with dlsym() call,
>> i tried to use RTLD_DEFAULT=0 constant as module handle.
>>
>> So, currently i'm end up with extending plugin with primitive, which
>> returns me an address
>> of dlsym() function. So, then i can discover anything else through it.
>>
>>> - Bert -
>>>
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list