public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* "build-id" changes break sparc64
@ 2007-07-22  8:23 David Miller
  2007-07-22  8:59 ` Roland McGrath
  2007-07-23  6:01 ` Roland McGrath
  0 siblings, 2 replies; 25+ messages in thread
From: David Miller @ 2007-07-22  8:23 UTC (permalink / raw)
  To: roland; +Cc: linux-kernel


(This is in reference to commit 18991197b4b588255ccabf472ebc84db7b66a19c)

When actually used, the build-id linker option causes problems for the
sparc64 kernel in two ways:

1) When building modules we get tons of warnings from the linker
   such as:

  LD [M]  drivers/scsi/sr_mod.o
ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.

2) The resulting kernel image will not boot.  The SILO boot loader on
   sparc aborts if there are multiple PT_LOAD segments in the ELF
   program header of the kernel image.  The boot loader can only
   handle allocating memory for and setting up mappings via the
   firmware for one one linear PT_LOAD segment.

   build-id puts a second PT_LOAD into the kernel image (albeit a tiny
   one) and as a result it cannot be booted

This is all with the current binutils in Ubuntu gutsy which
is version 2.17.50.20070718

Whilst #1 could be some kind of binutils bug and the warning
is harmless, #2 is an outright show-stopper for sparc32 and
sparc64 and to be honest I would not be surprised if the
boot loader on some other platforms have this limitation too.

My suggestion would be to add this linker option in the various
arch/${FOO}/Makefile files for platforms and situations where it
is known to work properly.

Roland, if you agree could you submit a fix like that?

Alternatively, if you think build-id is so valuable, impress me with
your binutils ninja skills and show me how to perhaps do some objcopy
tricks wherein I could dike out the PT_LOAD segment build-id generates
for the "image" target et al.  in the arch/sparc{,64}/boot/Makefile's
rules.

Thanks a lot.

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-07-23 20:32 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22  8:23 "build-id" changes break sparc64 David Miller
2007-07-22  8:59 ` Roland McGrath
2007-07-23  2:18   ` David Miller
2007-07-23  6:01 ` Roland McGrath
2007-07-23  6:13   ` Paul Mackerras
2007-07-23  6:27     ` Sam Ravnborg
2007-07-23  7:26       ` Roland McGrath
2007-07-23  8:14         ` Sam Ravnborg
2007-07-23  8:18           ` Roland McGrath
2007-07-23  8:24             ` Sam Ravnborg
2007-07-23  9:25           ` Alan Modra
2007-07-23 11:49             ` Al Viro
2007-07-23 18:00               ` Sam Ravnborg
2007-07-23 18:56                 ` Al Viro
2007-07-23 19:13                   ` Adrian Bunk
2007-07-23 19:12                 ` Roland McGrath
2007-07-23 19:39                   ` Al Viro
2007-07-23 20:05                     ` Roland McGrath
2007-07-23 20:33                       ` Sam Ravnborg
2007-07-23  6:14   ` [PATCH] Move --build-id option Roland McGrath
2007-07-23  6:42     ` Sam Ravnborg
2007-07-23  8:09       ` Roland McGrath
2007-07-23  8:12       ` [PATCH] Use LDFLAGS_MODULE only for .ko links Roland McGrath
2007-07-23  8:16         ` Sam Ravnborg
2007-07-23  6:22   ` "build-id" changes break sparc64 Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox