I've inherited a RISCV port, where we need to generate code such that text
references are PIC, but data references are absolute.
1) Does such a mode have a name? It seems very eXecuteInPlace-like? It's be a
shame to make up a new name for it.
2) The target is bare metal, no VM, no shared objects. The loader places code at
an arbitrary address, but static data is at a fixed location. The code is
self-contained, so no references to external libraries (say).
3) I'm pretty sure no GOT is needed in this mode -- everything can be resolved
by the static linker. (exception being if there are indeed calls to external
locations).
4) The only dynamic relocs needed will be for static data that's statically
initialized to a function pointer -- or other text-section resident objects,
such as .rodata (maybe).
Am I missing something?
nathan
--
Nathan Sidwell