public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Meelis Roos <mroos@linux.ee>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Jay Estabrook <jay.estabrook@hp.com>
Subject: Re: alpha compile failure (srm_printk)
Date: Sat, 28 Jul 2007 22:04:50 +0200	[thread overview]
Message-ID: <20070728200450.GA25619@uranus.ravnborg.org> (raw)
In-Reply-To: <Pine.SOC.4.64.0707281950340.20474@math.ut.ee>

On Sat, Jul 28, 2007 at 08:05:08PM +0300, Meelis Roos wrote:
> Retested this compile error with todays 2.6.23-rc1+git, still the same.
> 
> > >   LD      arch/alpha/boot/bootloader
> > > arch/alpha/boot/bootloader.lds:25: undefined symbol `srm_printk' referenced in expression
> > 
> > I was unable to repeoduce these errors on 2.6.22-rc4 with your config.
> 
> Hmm. Just make works, make bootimage does not. I debugged this further 
> today and I can not see how it can work.
> 
> The link command in question is
> ld   -static -uvsprintf -T   arch/alpha/boot/bootloader.lds arch/alpha/boot/head.o arch/alpha/boot/main.o -o arch/alpha/boot/bootloader
> and it still tells
> arch/alpha/boot/bootloader.lds:25: undefined symbol `srm_printk' referenced in expression
> 
> arch/alpha/boot/bootloader.lds contains a single related line referring 
> to srm_printk:
> printk = srm_printk;
> This only seems to define an alias to srm_printk so not important (and 
> unused)?

Hi Meelis.
I took the time to investige this a bit. The relevant files in
this case (arch/alpha/MAkefile + boot/Makefile has not seen many changes
when browsing the git tree.
So I looked back a bit further in the bitkeeper based tree.

Before boot/Makefile were converted to kbuild style bootloader indeed
referenced $(LIBS). That was lost in the process.
So adding $(LIBS_Y) is the right thing to do.

The linker error you get is due to kasprintf uses kmalloc and
it gets pulled in when srm_printf uses vsprintf.

The fix is to split kasprintf out to a separate file to
avoid pulling in more stuff than necessary.

PS. I had trouble compiling objstrip and had to due a lot of ugly
hacks before it compiles. I assume it is a toolchain issue..

	Sam

  reply	other threads:[~2007-07-28 20:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-04 11:21 alpha compile failure (srm_printk) Meelis Roos
2007-06-06  6:17 ` Andrew Morton
2007-06-06  7:48   ` Meelis Roos
2007-07-28 17:05   ` Meelis Roos
2007-07-28 20:04     ` Sam Ravnborg [this message]
2007-07-28 20:20       ` [PATCH] lib: move kasprintf to a separate file Sam Ravnborg
2007-07-28 20:52         ` [PATCH] add a missing LIB_Y to arch/alpha/boot Makefile Meelis Roos
2007-07-28 22:48         ` [PATCH] lib: move kasprintf to a separate file Jeremy Fitzhardinge
2007-07-29 20:08           ` Sam Ravnborg
2007-07-28 20:21       ` alpha compile failure (srm_printk) Sam Ravnborg

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=20070728200450.GA25619@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jay.estabrook@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=rth@twiddle.net \
    /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