Re: statically linked PIEs without GOT

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

 



On Wed, Jul 11, 2012 at 7:06 AM, Morten Shearman Kirkegaard
<moki@xxxxxxxxxxxxx> wrote:
>
> I have a somewhat strange request. I would like to generate statically
> linked position independent executables for I386 and AMD64. The source
> language is C, I use ELF for the object files, and link them using GNU
> ld with a custom linker script.
>
> The code generated by GCC with -fpic uses the Global Offset Table to
> resolve external symbols. Since my program will be statically linked, I
> would like to avoid this, to simplify loading. All symbols will be
> resolvable at link time.
>
> Is there an option to avoid using a GOT?

Such a thing could be supported in principle, by including a runtime
relocation routine in the executable itself.  However, I'm not aware
of any current support for this.

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