Re: how to create a self-relocatable raw binary with gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux