position independent code

Scott Howard scott@objsw.com
Mon Feb 8 17:20:00 GMT 1999


Randy Devol wrote:

> >There is an additional complication: the gnu implementation is designed
> >with shared libraries in mind; it creates an address translation table
> >which must be 'fixed up' at run time to point to the absolute address of
> >functions and variables.

> I thought that many people were successfully using Gnu tools for embedded
> work.  Is this "fix up" feature only included when -fPIC is used?

Sorry if I wasn't clear on this.  Yes, MANY people are using Gnu/EGCS
successfully for embedded systems.  The fixup is only needed for
programs compiled with -fpic/-fPIC.

  Or is it
> only present with EGCS?  (I don't need position independent code.  In fact,
> I want exactly the opposite. :-)

It's present in both GCC and EGCS, again only if you use -fpic or -fPIC.

Scott
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.



More information about the crossgcc mailing list