relocation truncated to fit error on alpha
Richard Henderson
rth@redhat.com
Sat Apr 5 01:09:00 GMT 2003
On Fri, Apr 04, 2003 at 10:39:03PM +0200, Falk Hueffner wrote:
> sfsproac.o(.rodata+0xec):/tmp/sfs-0.7.2/async/str.h:180: relocation truncated to fit: GPREL32 *UND*
Ah. These are all of the form
00000000000000d4 GPREL32 .gnu.linkonce.t._ZN13sfsauth_dbrec8set_typeE1
4sfsauth_dbtype+0x0000000000000040
i.e. this is part of a switch statement.
My guess is that _ZN13sfsauth_dbrec8set_typeE14sfsauth_dbtype was emitted
multiple times, and this copy was dropped, which left the relocations from
the tablejump pointing to nothing.
In the short term this could be "fixed" in the linker, so that it ignores
gprel32 relocations to sections that have been removed.
The most correct fix is to use section groups, such that the bits associated
with the function get discarded with it. This is a lot of work all the way
through the toolchain though.
r~
More information about the Gcc
mailing list