PowerPC sections ?

James E Wilson wilson@specifixinc.com
Tue Apr 12 21:27:00 GMT 2005


Charles J Gillan wrote:
> Is the GOT not sufficient to do this though ? I canÂ’t see why 
> it is necessary to define two new sections ?  What goes into those 
> sections ?

The GOT is sufficient if you have a shared library loader that knows how 
to read ELF files and apply the relocations embedded within.

The -mrelocatable option tries to make this easier for embedded targets 
by emitting code that does the relocations for you, and storing the 
relocation info in regular object file data sections.  See the 
gcc/config/rs6000/eabi.asm file, in particular the __eabi_convert 
function and its callers, which uses the got2 and fixup sections to 
perform relocations when a program is loaded at a different address than 
it was linked for.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list