From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch 2.6.6] Workaround linker bug
Date: Thu, 27 May 2004 05:39:41 +0000 [thread overview]
Message-ID: <9422.1085636381@kao2.melbourne.sgi.com> (raw)
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. */
next reply other threads:[~2004-05-27 5:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-27 5:39 Keith Owens [this message]
2004-05-27 7:08 ` [patch 2.6.6] Workaround linker bug H. J. Lu
2004-06-05 4:18 ` David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9422.1085636381@kao2.melbourne.sgi.com \
--to=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox