4 ms·
Well, resident programs (actual Pure residents in AmigaOS) would be like PIE, though that came a bit later, and gave the same effect, several programs could run
by IcePic 2y ago
Well, resident programs (actual Pure residents in AmigaOS) would be like PIE, though that came a bit later, and gave the same effect, several programs could run the same code with different set of registers, and all data was pointed to by registers and no globals.
- amiga386 2y agoIt's still not position independent code (i.e. no absolute addressing, zero relocs), but pure residents are of course reentrant, so their code can be run in many processes' contexts at the same time, by virtue of not using any global state, instead using the process's stack, or have heap allocations that are passed in/out. The difference is that, with position-independent code, it can be loaded once, no relocations needed, and the same pages of code can be mapped into hundreds of processes' address spaces, each at a random location. Doing it like resident Amiga programs would mean loading to a specific address (even if random), and then it'd have to remain at that address across all processes, which makes it difficult to have different combinations of shared objects in the address space.