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] |
On Sat, Nov 01, 2003 at 02:37:29AM +0100, Andreas Schwab wrote: > 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. > The problem is lang_do_assignments assigns 0x6000000000004fa0 and lang_size_sections assigns 0x6000000000000430. The final one is 0x6000000000000430. > 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>. > I am testing this patch. Does this make any senses? H.J.
Attachment:
ld-final-relax-2.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |