FAQ

[Perl6-internals] [not quite an RFC] shared bytecode/optree

Chaim Frenkel
Oct 25, 2000 at 3:45 pm
"BS" == Benjamin Stuhl writes:
BS> 1. Bytecode can just be mmap'ed or read in, no playing
BS> around with relocations on loading or games with RVAs
BS> (which can't be used anyway, since variable RVAs vary based
BS> on what's been allocated or freed earlier).

(What is an RVA?)

And how does the actual runtime use a relocatable pointer? If it is
an offset, then any access becomes an add. And depending upon the
source of the pointer, it would either be a real address or an offset.

Or if everything is a handle, then each access requires two fetches.
And I don't see where you avoided the relocation. The handle table
that would come in with the bytecode would need to be adjusted to
reflect the real address.

I vaguly can see a TIL that uses machine code linkage (real machine code
jumps) that perhaps could use relative addressing as not needing
relocation. But I'm not sure that all architectures support long enough
relative jumps/calls.

Doing the actual relocation should be quite fast. I believe that all
current executables have to be relocated upon loading. Not to mention
the calls to shared modules/dlls.

<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
chaimf@pobox.com +1-718-236-0183
reply

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions