This is the mail archive of the binutils@sources.redhat.com 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]

IA64 linker relaxation bug


The testcase at <ftp://ftp.suse.com/pub/people/schwab/ia64-relax.tar.bz2>
demonstrates a bug in the linker relaxation on ia64:

$ make
ld -o temacs temacs.o libncurses.so libm.so libc.so elf-init.oS crtn.o
elf-init.oS(.text+0x101): In function `__libc_csu_init':
: relocation truncated to fit: GPREL22 __init_array_start
make: *** [temacs] Error 1

The problem is that __init_array_start is changing its value multiple
times during linking, always alternating between 0x6000000000000430 and
0x6000000000004fa0.  There is an LTOFF22X relocation against this symbol,
and by the time the relaxing pass looks at this relocation the value of
__init_array_start is 0x6000000000004fa0 which is close enough to the gp
value.  But the final value happens to be 0x6000000000000430, outside of
the range of a GPREL22 relocation.

This bug is reproducable both with mainline and 2.14 branch.  I think it
is a side effect of
<http://sources.redhat.com/ml/binutils/2001-02/msg00304.html>.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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