"Pan ruochen" <panruochen@xxxxxxxxx> writes: > I want to create a raw binary excutable for MIPS arch, which can relocate > itself to any load address at runtime without an externel loader. > How should I compile the sources and write the linker script for this purpose? There isn't any way to do this without some hacking. gcc and gas used to support that for the MIPS. The option was -membedded-pic. It was removed because it stopped working and nobody was interested in fixing it. So one approach would be to look at old releases for that code and fix it up. Ian