You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Felix S. Klock II edited this page Jul 28, 2013
·
2 revisions
"PositionIndependentCode" is machine code which eschews the use of absolute addresses when branching.
Instead, all branching is relative, either to the current program counter, or to some common point of reference.
For example:
the code vector in reg0
the code-vector in some procedure referenced by the current procedure's constant vector
the code-vector obtained by following the lexical chain for the current procedure (see for example the MacScheme jump instruction for where this arises).
PetitLarceny does not use position independent code; instead it emits C (or NASM) source with references to labels in the text segment that must be resolved at link time, at the latest.