[uClibc] Re: building et_dyn executables
Peter S. Mazinger
ps.m at gmx.net
Mon Mar 29 12:20:46 UTC 2004
> Whats the best way to build et_dyn executables?
>
> i tried this:
>
> gcc -pie a.c
>
> the resulting a.out will segfault
>
> but
> gcc -fPIC -c a.c
> gcc -pie a.o
> does the right thing
For ET_DYN binaries all the objects have to be built as PIC, so the second
is the correct one. For objects used only in ET_DYN binaries you can also
use -fPIE, but these objects are unusable for dynamic libraries (build
faulty libraries)
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
More information about the uClibc
mailing list