[U-Boot] [PATCHv3] mpc83xx: Add -fpic relocation support
Joakim Tjernlund
joakim.tjernlund at transmode.se
Thu Oct 28 10:46:18 CEST 2010
> From: Joakim Tjernlund <joakim.tjernlund at transmode.se>
>
> > From: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > To: u-boot at lists.denx.de, Scott Wood <scottwood at freescale.com>, Kim
> Phillips
> > <kim.phillips at freescale.com>
> > Cc: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > Date: 2010/10/13 23:12
> > Subject: [U-Boot] [PATCHv3] mpc83xx: Add -fpic relocation support
> > Sent by: u-boot-bounces at lists.denx.de
> >
> > This adds relocation of .got entries produced
> > by -fpic. -fpic produces 2-3% smaller code and
> > is faster. Unfortunately gcc promotes -fpic to
> > -fPIC when -mrelocatable is used so one need a very
> > small patch to gcc too(sent upstream).
> >
> > -fpic puts its GOT entries in .got section(s) and
> > linker defines the symbol _GLOBAL_OFFSET_TABLE_ to point
> > to the middle of this table. The entry at _GLOBAL_OFFSET_TABLE_-4
> > contains a blrl insn which is used to find the table's
> > real address by branching to _GLOBAL_OFFSET_TABLE_-4.
>
> Ping?
Ping ping :)
I should mention that this work tougher with -msingle-pic-base paves
the way for true PIC with minimal changes to C source code.
More information about the U-Boot
mailing list