This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: relocation truncated to fit errors
- From: Marius Groeger <mgroeger at sysgo dot com>
- To: Niklaus <niklaus at gmail dot com>
- Cc: binutils at sources dot redhat dot com, crossgcc at sources dot redhat dot com
- Date: Mon, 3 Apr 2006 08:31:38 +0200 (CEST)
- Subject: Re: relocation truncated to fit errors
- References: <85e0e3140604010729y41282c69pb9b1d75c776f4466@mail.gmail.com>
On Sat, 1 Apr 2006, Niklaus wrote:
I setup cross compilation environment for mips and did a make . Why do
i get the last following error relocation truncated to fit errors.
...
mips-deb-linux-gcc -msoft-float -mgp32 -g -O2 -mips3 -G 0 -DGDB_STUB
-I. -I./include -I./config/mips3/vr4131 -I./config/mips3 -nostdlib
-T ./config/mips3/vr4131/vr4131_elf_gdb.ld -o jsp \
exception_vector.o sample1.o timer.o
serial.o logtask.o log_output.o vasyslog.o t_perror.o strerror.o
kernel_cfg.o libkernel.a -lgcc
What exact --configure target did you use for your cross compiler? It looks
like you've been using mips-linux or mips64-linux. Now, by selecting this
target, you'll get a libgcc which is compiled with -fPIC. Such a libgcc is
meant to be used in Linux userspace and will require a proper initialisation
of the global pointer (symbol _gp IIRC). I'm not sure you're providing that.
What's more, I think it'll also require the main program components be
linked with -fPIC as well, which you are not doing.
I'm aware that this is no directly usable help for you. All I can advise is
to carefully analyse (X-objdump -fph .. and X-objdump -d ..) ALL objects
you're linking to make sure they're compatible with each other.
Regards,
Marius
--
Marius Groeger <mgroeger@sysgo.com>
SYSGO AG Embedded and Real-Time Software
Voice: +49 6136 9948 0 FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.pikeos.com