[Mono-dev] ARM/NativeClient port
vargaz at gmail.com
Sun Feb 3 18:09:46 UTC 2013
> We're working on implementation of Mono JIT/ARM for Native Client, and
want to discuss certain details about design of our solution.
> Native Client's sandboxing mechanism, being a SFI solution, has rather
strict limitations on how verifiable machine code may look like. To be
> Our idea is to emit per-method (or per class?) "jump table" somewhere in
.data, which contains list of all relocations, and use some register to
point to this table.
> So for example, trampoline like this:
> ldr ip, [pc, #0]
> b skip
> .word target
> mov lr, pc
> mov pc, ip
> would become (if r10 is used as jump table base register):
> .align 4 # for NaCl only
> ldr ip, [r10, #32] # unique (per-method or class) index for every
> nop # for NaCl only, to have bl at bundle end
> bic r10, r10, #0xc000000f # for NaCl only
> bl ip # or blx
> r10 could point somewhere in method metadata, where its relocation table
> So our question is if someone sees problem with such approach, or could
suggest better alternative. Also advises which register could be used as
the jump table base, and where > to store
> such a table (maybe patch info?) are very welcome.
ARM has PC relative addressing, so it would be easier to use that instead
of reserving a register.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list