[Vm-dev] Mars, stuck on callbacks (again)... need opinions

Andreas Raab andreas.raab at gmx.de
Thu Dec 23 23:00:34 UTC 2010


On 12/23/2010 2:49 PM, John M McIntosh wrote:
> Well I"m not sure what is being suggested here, but on iOS a shared library is marked as read and executable, NOT writable. so you can't do self modifying code...
> Unless you are saying you'd like to on macintel generate arm code and stick it into a shared library for later loading and execution on iOS?

Yup. Of course. It's pretty obvious that shared libs would've to be 
read-only on iOS. And I would also expect that there's no call to set 
the executable bit on a file (otherwise you could create a new shared lib).

Cheers,
   - Andreas

> On 2010-12-23, at 1:04 PM, Andreas Raab wrote:
>
>> On 12/23/2010 12:47 PM, Igor Stasenko wrote:
>>> it is possible (if someone provide a code), but i wonder why do you
>>> need such extra loops?
>>> It will give you nothing.
>>
>> Unless the platform does not allow making memory regions executable, as on, say, iOS. In which case the ability to generate code into a shared lib becomes suddenly very valuable.
>>
>> Cheers,
>>   - Andreas
>>
>>> You could generate a native code and put it
>>> into executable memory region,
>>> instead of object memory, which could be then used to pass as callback
>>> address to some external function.
>>> Actually, if you look how NB callback test implemented - it does
>>> exactly what i describing.
>>>
>>>
>>> You can always use NB (or just AsmJit) for generating code and putting
>>> it into static library or file..
>>> but once it become static it is no longer interesting, because its
>>> static (yeah.. tautology ;)
>>>
>>>
>
> --
> ===========================================================================
> John M. McIntosh<johnmci at smalltalkconsulting.com>    Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
>


More information about the Vm-dev mailing list