Hi
I have a problem when linking an application compiled with GCC for c6x (v 4.5-124).
I get the following error message during linking:
pr-support.c:(.text+0x1074): relocation truncated to fit: R_C6000_PCR_S21 against symbol `abort' defined in .plt section in /home/vagrant/repositories/ti_toolchain/gcc-c6x/bin/../c6x-uclinux/libc/lib/crt1.o
/home/vagrant/repositories/ti_toolchain/gcc-c6x/bin/../lib/gcc/c6x-uclinux/4.5.1/libgcc.a(emutls.o): In function `__emutls_get_address':
emutls.c:(.text+0x68): relocation truncated to fit: R_C6000_PCR_S21 against symbol `malloc' defined in .plt section in /home/vagrant/repositories/ti_toolchain/gcc-c6x/bin/../c6x-uclinux/libc/lib/crt1.o
emutls.c:(.text+0xa4): relocation truncated to fit: R_C6000_PCR_S21 against symbol `memcpy' defined in .plt section in /home/vagrant/repositories/ti_toolchain/gcc-c6x/bin/../c6x-uclinux/libc/lib/crt1.o
emutls.c:(.text+0xec): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
The application is almost 5 MB.
We have tried to add -mlong-calls as suggested in 8.QA http://linux-c6x.org/wiki/index.php/FAQ.
This however provokes several compilation errors like this:
algdat/adstringhelper.h: In function 'void ADStringSetSignedNumber(ADString&, T, int, int, char) [with T = int]': algdat/adstringhelper.h:175:1: error: insn does not satisfy its constraints: (insn:TI 71 48 54 2 algdat/adstringhelper.h:16 2 (parallel [ (unspec [ (symbol_ref:SI ("_ZN8ADString5resetEi") [flags 0x3] <function_decl 0x40393700 reset>) (const_int 1 [0x1]) ] 10) (clobber (reg:SI 35 B3)) ]) 81 {real_call} (expr_list:REG_UNUSED (reg:SI 35 B3) (nil))) algdat/adstringhelper.h:175:1: internal compiler error: in final_scan_insn, at final.c:2591 Please submit a full bug report, with preprocessed source if appropriate. See <https://support.codesourcery.com/GNUToolchain/> for instructions.
Any suggestions on how to resolve this?
Best regards
Anders