From: Alan Modra <amodra@bigpond.net.au>
To: Matthias Klose <doko@ubuntu.com>
Cc: binutils <binutils@sourceware.org>,
Bastian Blank <waldi@debian.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, Kiko Piris <kernel@pirispons.net>,
Damien Wyart <damien.wyart@free.fr>, Greg KH <gregkh@suse.de>,
Wolfgang Walter <wolfgang.walter@stwm.de>
Subject: Re: current binutils trunk fails to build bootable kernel image for some configurations
Date: Thu, 23 Jul 2009 10:19:39 +0930 [thread overview]
Message-ID: <20090723004939.GF13233@bubble.grove.modra.org> (raw)
In-Reply-To: <20090721204214.GA27015@wavehammer.waldi.eu.org> <4A6746B9.9010603@ubuntu.com>
On Wed, Jul 22, 2009 at 01:04:57PM -0400, Matthias Klose wrote:
> this was reported as http://bugs.debian.org/537389, I currently don't
> have much more information, besides that one of the Debian kernel
> maintainers did identify
>
> 2009-07-11 Alan Modra <amodra@bigpond.net.au>
>
> * ldlang.c (insert_os_after): Don't tie assignments to non-alloc
> output sections.
>
> this patch as the one causing the wrongly built kernel. However I don't
> see this checkin mentioned on the ML.
The discussion happened on bug-binutils.
http://lists.gnu.org/archive/html/bug-binutils/2009-07/msg00067.html
> Bastian Blank did check that the
> problem goes away with a binutils build from trunk and this patch
> reverted. Some more analysis in http://lkml.org/lkml/2009/7/21/400
The biggest problem is that the kernel linker script doesn't mention
all sections, which means ld must choose a place for the unmentioned
sections (orphans). Sometimes ld's placement isn't how a naive
programmer would expect.
In this case:
. = ALIGN(PAGE_SIZE);
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
ld stuck an orphan section between the two statements. Which meant
that the start of .data_nosave is not aligned (and since the end is
aligned by following statements, it means that .data_nosave also has
padding inserted). It would be more robust to write:
.data_nosave ALIGN(PAGE_SIZE) : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2009-07-23 1:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 4:08 Linux 2.6.30.2 Greg KH
2009-07-20 4:08 ` Greg KH
2009-07-20 14:13 ` Linux 2.6.30.2: does not boot Wolfgang Walter
2009-07-20 14:38 ` Kiko Piris
2009-07-20 15:09 ` Greg KH
2009-07-20 18:03 ` Damien Wyart
2009-07-20 18:16 ` Linus Torvalds
2009-07-20 18:21 ` Sam Ravnborg
2009-07-20 20:31 ` Damien Wyart
2009-07-21 0:13 ` Stephen Rothwell
2009-07-21 0:28 ` Linus Torvalds
2009-07-21 4:09 ` Stephen Rothwell
2009-07-20 19:23 ` Alejandro Riveira Fernández
2009-07-20 19:42 ` Greg KH
2009-07-20 19:50 ` Alejandro Riveira Fernández
2009-07-20 21:34 ` Greg KH
2009-07-20 19:29 ` Kiko Piris
2009-07-20 19:50 ` Linus Torvalds
2009-07-20 21:19 ` Kiko Piris
2009-07-20 22:02 ` Linus Torvalds
2009-07-20 22:04 ` Linus Torvalds
2009-07-20 22:14 ` Kiko Piris
2009-07-21 0:42 ` Wolfgang Walter
2009-07-21 20:42 ` Bastian Blank
[not found] ` <4A6746B9.9010603@ubuntu.com>
2009-07-23 0:49 ` Alan Modra [this message]
2009-07-23 5:05 ` current binutils trunk fails to build bootable kernel image for some configurations Sam Ravnborg
2009-07-23 6:01 ` Alan Modra
2009-07-20 20:29 ` Linux 2.6.30.2: does not boot Marcel Beister
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=20090723004939.GF13233@bubble.grove.modra.org \
--to=amodra@bigpond.net.au \
--cc=binutils@sourceware.org \
--cc=damien.wyart@free.fr \
--cc=doko@ubuntu.com \
--cc=gregkh@suse.de \
--cc=kernel@pirispons.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=waldi@debian.org \
--cc=wolfgang.walter@stwm.de \
/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