This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: relocation truncated to fit errors
On 4/5/06, Richard Sandiford <richard@codesourcery.com> wrote:
> Niklaus <niklaus@gmail.com> writes:
> > On 4/3/06, Marius Groeger <mgroeger@sysgo.com> wrote:
> >> On Mon, 3 Apr 2006, Niklaus wrote:
> >>
> >> > I don't find any __gp.
> >>
> >> How about _gp (w/o underscore)?
> >>
> > None
> > pro@deb:~/scripe/cross$ ./bin/mips-deb-linux-objdump -d
>
> Use -dr instead of -d. You should then find that:
>
> > ./lib/gcc/mips-deb-linux /3.4.6/libgcc.a | grep gp | more
> > 0: 3c1c0000 lui gp,0x0
> > 4: 279c0000 addiu gp,gp,0
>
> ...these insns have relocations against _gp_disp. The linker will
> turn _gp_disp into an offset from _gp.
>
Yes it did indeed show up as you said.
0: 3c1c0000 lui gp,0x0
0: R_MIPS_HI16 _gp_disp
4: 279c0000 addiu gp,gp,0
4: R_MIPS_LO16 _gp_disp
> I'm still not sure what it is you're trying to do though. What is
> your target system? VR413x GNU/Linux? Or something else?
> (I'm saying this as a binutils@ rathern than crossgcc@ reader btw.)
>
My toolchain was compiled with target system as mips-deb-linux.The
compiled executable is to be loaded on a vr4131 system.
Is there anything wrong or that is to be changed. Any suggestions
would be helpful.
./mips-deb-linux-ld: supported targets: elf32-tradbigmips
elf32-tradlittlemips ecoff-bigmips ecoff-littlemips elf32-ntradbigmips
elf64-tradbigmips elf32-ntradlittlemips elf64-tradlittlemips
elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex
binary ihex
./mips-deb-linux-ld: supported emulations: elf32btsmip elf32ltsmip
elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip
> The command line:
>
> > 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
>
> (in particular the vr4131_elf_gdb.ld bit) suggests that you're trying
> to use a *-elf (bare-metal) linker script with a GNU/Linux compiler,
> so I wasn't sure whether your target really was GNU/Linux or not.
>
I am using a crosscompiler to build the toppers jsp kernel
http://www.toppers.jp/download.cgi/jsp-1.4.2.tar.gz
The kernel is to be used on vr4131 system.
The target system is vr4131 .I build the cross toolchain with target
mips-deb-linux.
Is there anything wrong or that is to be modified.
> Richard
>