Skip to main content
daviddavid92
Associate II
May 20, 2010
Question

Executing binaries

  • May 20, 2010
  • 3 replies
  • 790 views
Posted on May 20, 2010 at 13:36

Executing binaries

    This topic has been closed for replies.

    3 replies

    daviddavid92
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:51

    Helpful - thanks!

    Chris.

    sjo2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 13:51

    -fpic does work, but you will have to handle the GOT - been a while and i was only executing small amounts of code.

    also maybe of interest:

    http://nuttx.sourceforge.net/NuttXNxFlat.html

    Cheers

    Spen

    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 13:51

    ELF would be the way to go, perhaps overkill, but the tools generate it and it is well documented.

    You should probably look at the linker (and the directive file) rather than the compiler. The objects emitted by the compiler are relocatable ELF objects. You might look at the --emit-relocs option to keep them.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..