tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Tests requiring MD hooks



On Mon, Jul 11, 2011 at 12:34:03 +0100, jean-Yves Migeon wrote:

> Exactly; use of function pointers is dictated by the ABI, so I can't 
> really use them as I'd like to

But you do cast your mapped address to a function pointer.  Does that
do the right thing for architectures with fat function pointers?

You also don't seem to mention instruction/data-cache issues.  I don't
remember if mprotecting something +x makes any guarantees about caches
(cf. arm_sync_icache(2) for example).


> I can't do that simply through rtld, as I need to memcpy(2) the payload 
> and therefore have access to the beginning (which is not necessarily 
> trivial given certain architectures), and the end (never found a way to 
> properly label those without using assembly routines).

You can always parse ELF yourself (unfortunately libelf is still not
imported, it seems).


-uwe


Home | Main Index | Thread Index | Old Index