
Scott Wood scottwood@freescale.com wrote on 2010/10/12 17:52:58:
On Tue, 12 Oct 2010 15:04:31 +0200 Joakim Tjernlund joakim.tjernlund@transmode.se wrote:
_GLOBAL_OFFSET_TABLE_ is a predefined symbol that the linker defines
to
be in the middle of the -fpic GOT table. It marks the end of the GOT
table
as far as we are concerned(u-boot does not generate so many relocs
that
the linker needs to use the space above _GLOBAL_OFFSET_TABLE_)
There is no predefined symbol that marks the start of fpic relocs so one is added(_GOT_TABLE_) by me to the linker script.
Maybe call it _GOT_START_ or similar? _GLOBAL_OFFSET_TABLE_ and _GOT_TABLE_[1] look like synonyms.
hmm, the other reloc syms are named _GOT2_TABLE_ and _FIXUP_TABLE_ so I think I should follow that.
-Scott
[1] Global offset table table? :-)
:)
Figured I should mention that I have added -msingle-pic-base(from ARM) which works nicely with -fpic(not sure if -fPIC is possible) and reduces size even more:
size u-boot-before text data bss dec hex filename 230595 6580 24228 261403 3fd1b u-boot size u-boot-after text data bss dec hex filename 222779 6580 24228 253587 3de93 u-boot
If you have 8 KB free DPRAM/cache one can move the GOT tables there while in flash and create true PIC
Jocke