This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
relocation truncated to fit
- To: binutils at sourceware dot cygnus dot com
- Subject: relocation truncated to fit
- From: Matt Postiff <postiffm at eecs dot umich dot edu>
- Date: Tue, 12 Sep 2000 14:50:53 -0400 (EDT)
Hi,
I'm having trouble compiling the gcc95 benchmark from SPECint95. I'm using
GNU ld version 2.9.5 (with BFD 2.9.5)--targetted to SimpleScalar, which is
basically MIPS-COFF little endian. I get thousands of "relocation
truncated to fit: GPREL..." errors.
What exactly does this error mean?
Is it something to do with the .sdata or .data sections?
What are some things I can I do to get around this problem?
If I get rid of all uses of .sdata, I have same problem,
though with a different list of variables.
-------------------------------
Here's a snippet of the output:
%sslittle-na-sstrix-ld gcc95-*.o
...
gcc95-file0.o: In function `get_insns':
gcc95-file0.S:52: relocation truncated to fit: GPREL
emit_rtl.mrv21first_insn
gcc95-file0.o: In function `emit_insn':
gcc95-file0.S:80: relocation truncated to fit: GPREL
emit_rtl.mrv21last_insn
gcc95-file0.o: In function `finalize_pic':
gcc95-file0.S:424: relocation truncated to fit: GPREL flag_pic
gcc95-file0.S:425: relocation truncated to fit: GPREL
current_function_uses_pic_
offset_table
Some other facts that may help:
What I'm doing is a little off the wall--I've combined all the C files
from gcc95 with a high-level source linker and then compiled the whole
mess down to assembly. The single large gcc95.S file will not assemble
properly because of 'reloc overflow' problems. So I split the gcc95.S file
into 10 chunks, assemble them to .o files. Then I have gcc95-*.o which I
pass to the linker in the above command line.
If I compile gcc's *.c files separately and separately link them, I have
no difficulty, so there is something in my high-level linker that is
causing this bug to be exposed. It could be a bug in my linker, but I'm
hoping what may be pointed out in response to this question could help me
to determine that.
Matt Postiff
Advanced Computer Architecture Lab
University of Michigan