This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC sections ?
- From: James E Wilson <wilson at specifixinc dot com>
- To: C dot Gillan at ecit dot qub dot ac dot uk
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 12 Apr 2005 14:27:21 -0700
- Subject: Re: PowerPC sections ?
- References: <E1DJqCu-0005ro-6w@mailhub1.qub.ac.uk>
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