* [patch 2.6.6] Workaround linker bug
@ 2004-05-27 5:39 Keith Owens
2004-05-27 7:08 ` H. J. Lu
2004-06-05 4:18 ` David Mosberger
0 siblings, 2 replies; 3+ messages in thread
From: Keith Owens @ 2004-05-27 5:39 UTC (permalink / raw)
To: linux-ia64
Building 2.6.6-ia64-040521, using GNU ld version 2.14.90.0.4 20030523.
__gp is sometimes set incorrectly. Instead of being .got + 0x2000000,
it is set to .data + 0x2000000, which breaks some LTOFF22 and GPREL22
entries.
This is non-deterministic, changing the path name to the kernel tree
which changes the size of some messages in .data is enough to make the
linker get it right. Force __gp to be based on .got.
Index: linux/arch/ia64/kernel/vmlinux.lds.S
=================================--- linux.orig/arch/ia64/kernel/vmlinux.lds.S Thu May 27 15:08:02 2004
+++ linux/arch/ia64/kernel/vmlinux.lds.S Thu May 27 15:16:11 2004
@@ -202,11 +202,10 @@ SECTIONS
.data : AT(ADDR(.data) - LOAD_OFFSET)
{ *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS }
- . = ALIGN(16);
- __gp = . + 0x200000; /* gp must be 16-byte aligned for exc. table */
-
+ . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
.got : AT(ADDR(.got) - LOAD_OFFSET)
{ *(.got.plt) *(.got) }
+ __gp = ADDR(.got) + 0x200000;
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 2.6.6] Workaround linker bug
2004-05-27 5:39 [patch 2.6.6] Workaround linker bug Keith Owens
@ 2004-05-27 7:08 ` H. J. Lu
2004-06-05 4:18 ` David Mosberger
1 sibling, 0 replies; 3+ messages in thread
From: H. J. Lu @ 2004-05-27 7:08 UTC (permalink / raw)
To: linux-ia64
On Thu, May 27, 2004 at 03:39:41PM +1000, Keith Owens wrote:
> Building 2.6.6-ia64-040521, using GNU ld version 2.14.90.0.4 20030523.
> __gp is sometimes set incorrectly. Instead of being .got + 0x2000000,
> it is set to .data + 0x2000000, which breaks some LTOFF22 and GPREL22
> entries.
>
There are a few ia64 linker fixes since 2.14.90.0.4. One of them is
http://sources.redhat.com/ml/binutils/2003-11/msg00000.html
among many others. May I suggest you try 2.15.90.0.3?
H.J.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 2.6.6] Workaround linker bug
2004-05-27 5:39 [patch 2.6.6] Workaround linker bug Keith Owens
2004-05-27 7:08 ` H. J. Lu
@ 2004-06-05 4:18 ` David Mosberger
1 sibling, 0 replies; 3+ messages in thread
From: David Mosberger @ 2004-06-05 4:18 UTC (permalink / raw)
To: linux-ia64
>>>>> On Thu, 27 May 2004 15:39:41 +1000, Keith Owens <kaos@sgi.com> said:
Keith> Building 2.6.6-ia64-040521, using GNU ld version 2.14.90.0.4
Keith> 20030523. __gp is sometimes set incorrectly. Instead of
Keith> being .got + 0x2000000, it is set to .data + 0x2000000, which
Keith> breaks some LTOFF22 and GPREL22 entries.
Keith> This is non-deterministic, changing the path name to the
Keith> kernel tree which changes the size of some messages in .data
Keith> is enough to make the linker get it right. Force __gp to be
Keith> based on .got.
I can't say I have seen this myself, but the workaround is sensible enough,
so I applied the patch.
Thanks, and sorry for the delay (still working through my backlog...).
--david
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-05 4:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-27 5:39 [patch 2.6.6] Workaround linker bug Keith Owens
2004-05-27 7:08 ` H. J. Lu
2004-06-05 4:18 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox