public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: "Milton Miller" <miltonm@bga.com>
To: linuxppc-dev@ozlabs.org, linux-kbuild@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: [BUG] ppc64 relocatable vmlinux builds even with undefined symbols
Date: Wed, 19 Nov 2008 01:14:49 -0600	[thread overview]
Message-ID: <4923bce9.bc.3e34.1353742792@bga.com> (raw)

With the additon of -pie to build CONFIG_RELOCATABLE
CONFIG_PPC64 kernels, even
if a function is undefined we still get a vmlinux,
System.map, and other files
with no error message.
 
This is with binutils 2.17 as built by debian
 
with 2.6.28-rc5, CONFIG_EMBEDDED=y CONFIG_HOTPLUG=n
CONFIG_PCI=y, CONFIG_RELOCATABLE=n
 
arch/powerpc/kernel/built-in.o: In function
`.pcibios_remove_root_bus':
(.text+0x12dc4): undefined reference to
`.pcibios_unmap_io_space'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2
 
 
with CONFIG_RELOCATABLE=y
  LD      init/built-in.o
  LD      .tmp_vmlinux1
  KSYM    .tmp_kallsyms1.S
  AS      .tmp_kallsyms1.o
  LD      .tmp_vmlinux2
  KSYM    .tmp_kallsyms2.S
  AS      .tmp_kallsyms2.o
  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map

Note that we set -pie for this combination.  I tried adding
seperately both
--no-undefined and --no-allow-shlib-undefined to
LDFLAGS_vmilnux,
but the link still did not error out.

I note that nm -u will detect the U symbol:

$ nm -u /tmp/p-test/vmlinux                  w mach_cell
                 w mach_iseries
                 w mach_powermac
                 U pcibios_unmap_io_space

but that would either require duplicating cmd_vmlinux and
adding an additonal
check or modifing rule_vmlinux. 

milton 

                 reply	other threads:[~2008-11-19  7:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4923bce9.bc.3e34.1353742792@bga.com \
    --to=miltonm@bga.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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