position independent code
Randy Devol
randyd@rahul.net
Mon Feb 8 08:17:00 GMT 1999
At 05:24 PM 2/5/99 -0800, Scott Howard wrote:
>Gnu CC does support position independant code with the -fpic and -fPIC
>options. It is only supported when the compiler & assembler use the ELF
>object file format, it does not work when using COFF (as you have
>already discovered, judging from the listing you enclosed). ELF for the
>m68k will be supported in a forthcoming release of EGCS.
>
>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. This is not really useful for an embedded
>(diskless, OS-less) system. This is a more complicated issue, and it
>would take some work to implement for a low-end system (essentially you
>would need a run-time loader of some sort).
I thought that many people were successfully using Gnu tools for embedded
work. Is this "fix up" feature only included when -fPIC is used? Or is it
only present with EGCS? (I don't need position independent code. In fact,
I want exactly the opposite. :-)
-=O=- Randy
In "A Scanner Darkly," was Philip K. Dick foreshadowing Web commerce:
"Someday, he thought, it'll be mandatory that we all sell the McDonald's
hamburger as well as buy it; we'll sell it back and forth to each other
forever from our living rooms."
_______________________________________________
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