This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: relocation truncated to fit errors


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.

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.)

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.

Richard


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