ARM thumbmode architecture question
Steffen Dettmer
steffen.dettmer@googlemail.com
Tue Mar 15 15:39:00 GMT 2011
Hi,
thanks for your quick reply.
On Tue, Mar 15, 2011 at 2:29 PM, Ian Lance Taylor <iant@google.com> wrote:
> Steffen Dettmer <steffen.dettmer@googlemail.com> writes:
>> The application size increased, exeeded 4 MB (working) and
>> finally around 4 MB and I ended up with the linker error
>> "relocation truncated to fit: R_ARM_THM_PC22":
>>
>> relocation truncated to fit: R_ARM_THM_PC22
>> against symbol `_call_via_r4' defined in .text section in
>> /tmp/x/lib_gcc_gnu/libgcc.a(_call_via_rX.o)
>> ../../../../../myfile.c:238: relocation truncated to fit: R_ARM_THM_PC22
>> against symbol `_call_via_r3' defined in .text section in
>> /tmp/x/lib_gcc_gnu/libgcc.a(_call_via_rX.o)
>> [more similar errors, depending on my #defines/my code various
>> symbols from various source files]
>
> I note that this is in libgcc.a, which will not be affected by
> using -mlong-calls to compile your application.
Ahh yes (I assumed the problem is that this _call_via_rX
functions are used, instead of some others for long calls).
Where can I find more information about compiling options of libgcc.a?
(I thought it was compiled as part of gcc building [and thus
assumed it would be built with correct compiler options]. Could
it be that I used bad limiting options when the arm-elf-gcc was
compiled?)
>> I searched the internet and read about `trampolines' and the
>> general possibility to have small wrapper functions in ARM code
>> able to execute very long calls (gigabyte range).
>> Compilers/linkers could theoretically automatically use such
>> "wrappers". This information is in contrast to the previous one.
>
> The linker does have support for this. Which version of the
> linker are you using?
$ gcc -Wl,--version
GNU ld version 2.16.1
(does this mean it is from binutils-2.16.1 from June 2005?)
is `veneer generation' the correct term for what I called `trampoline'?
oki,
Steffen
More information about the Gcc-help
mailing list