[uClinux-dev] GOT size limit reached

Anders Holmberg lists at endian.se
Tue Aug 30 05:16:29 EDT 2005


I am working for a customer that is implementing a C++ application on  
a Coldfire 5272 target; and this application has reached the GOT size  
limit. I am sure that this is the problem, because when examining the  
disassembly from a previous release (without the GOT size error) and  
grepping for "movel %a5(" you can see that it is very close to the  
32k limit. One solution would of course be to skip XIP but this will  
bring other problems; so I am currently trying to expand the GOT  
table size. My strategy is :

1. Update the linker to accept relocations in the 0-64k range  
(instead of 0-32k).

2. Change the crt0.S startup code to set a5 to .data + 32768 instead  
of .data.

3. Update elf2flt to rearrange the GOT table to accomodate for the  
fact that the movel %a5() instruction uses a signed offset instead of  
a signed (this will have the side-effect that the GOT table size will  
be 32k + min( 32k, real size of relocations) but that is a small  
problem compared to the other one).

All this should be controlled by a new compiler/linker switch;  
something like -mgot-64k or -mxgot.

So, my question is, has anyone done something like this before? Is  
there anything I am missing in the strategy above?

/Anders
--
Anders Holmberg
Endian Technologies AB
http://endian.se for contact information



More information about the uClinux-dev mailing list