[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FBE404B.2020702@zytor.com>
Date: Thu, 24 May 2012 07:06:03 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
CC: Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: build failure after merge of the final tree
On 05/24/2012 12:16 AM, Stephen Rothwell wrote:
>
> OK, clearly something is wrong :-( There could well be a problem with my
> toolchain.
>
Apparently so... this is troublesome because it means that we have
silently built broken kernels not just with ld 2.22.52.0.x but with
older lds as well.
What originally made the ld problems surface was actually checking that
we didn't run into any absolute symbols we didn't know about, which
previously was supposed to be done by developers manually, i.e. never
done. This is extremely serious because it means that a kernel compiled
with CONFIG_RELOCATABLE doesn't actually relocate.
The workaround -- and it is a workaround -- is to take these symbols as
they appear and add them to the [S_REL] whitelist in
arch/x86/tools/relocs.c. This is the same workaround as existed before,
the only difference is that we are now enforcing it.
A patch for this particular subcase is attached and I will commit it to
tip:x86/urgent.
> $ i386-linux-ld --version
> GNU ld (GNU Binutils) 2.21
> Copyright 2010 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) a later version.
> This program has absolutely no warranty.
> Invalid absolute R_386_32 relocation: jiffies
> make[3]: *** [arch/x86/boot/compressed/vmlinux.relocs] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[2]: *** [arch/x86/boot/compressed/vmlinux] Error 2
> make[1]: *** [bzImage] Error 2
> make: *** [sub-make] Error 2
jiffies is yet another symbol created by the linker script. This one in
particular is created outside any section, so it isn't all that strange
that some versions of the linker created it absolute. Again, such a
kernel would have malfunctioned if relocated.
The really disturbing part of this one is that it shows that these
problems covers multiple GNU ld versions.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
View attachment "0001-x86-relocs-Add-jiffies-and-jiffies_64-to-the-relativ.patch" of type "text/x-patch" (1372 bytes)
Powered by blists - more mailing lists