This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM thumbmode architecture question


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.

> 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?

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]