Content originally posted in LPCWare by lpcxpresso-support on Thu Jul 30 04:22:11 MST 2015
You are correct, in that the the generated linker script is placing code at fixed, known addresses. As well as compiling your binaries for position independence, you would also need to provide your own linker script that does not place the text/data/bss sections into named memory areas.
However, to make truly position independent code AND position independent data, requires you to write an application loader that reads the AXF file (not a binary) and provides the appropriate fix-ups. This is normally done by on operating system (not an RTOS).