Re: [arm-gnu] Linkere generated stubs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Linkere generated stubs



On Monday 27 February 2006 10:48, Borkar, Parag (Parag) wrote:
> Hi All,
>
> I am working on GCC for ARM Target.I am working on very big project and
> I want to understand about linker generated stubs(like veneers ,i think
> in ARM ADS).
> As I am using large amount of C files , so when I am linking , linker is
> giving error about "Call Truncated to fit".And , I am using Relocation
> of the Code( VMA != LMA).
>
> When I tried using -mlong-calls GCC option, then I am able to link files
> but size of the Executable is very large.
> So, Would anybody explain me how to generate stubs without -mlong-calls
> option or reducing code size for this type of Application.

The GNU linker does not support automatic fixup of out of range branches.

If the total size of your code exceeds the direct branch range, or you have 
many calls between two far-apart code regions then -mlong-calls is currently 
the real solution.

If the problem is that you have two distinct code regions separated by a large 
distance (eg. ROM and RAM) and only a small number of calls between the two 
you may be able to manually work around the problem:
Isolate all the inter-region calls into their own files, manually inserting 
thunks if necessary, and compile just those files with -mlong-calls.

Paul