public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: kbuild breaks um - fails to find util when linking
Date: Wed, 11 Jun 2008 11:48:16 -0400	[thread overview]
Message-ID: <20080611154816.GA8167@c2.user-mode-linux.org> (raw)
In-Reply-To: <20080610190307.GA15983@uranus.ravnborg.org>

This patch obviously isn't usable for anyone else, but UML needs a
hook or something to add libgcc and libc to the ld commands:

Index: linux-2.6-git/scripts/link-vmlinux.sh
===================================================================
--- linux-2.6-git.orig/scripts/link-vmlinux.sh	2008-06-11 11:26:07.000000000 -0400
+++ linux-2.6-git/scripts/link-vmlinux.sh	2008-06-11 11:41:04.000000000 -0400
@@ -122,7 +122,7 @@ fi
 # First stage of fully linked vmlinux
 tell LD ${VMLINUX}
 ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${VMLINUX} \
-      -T ${KBUILD_VMLINUX_LDS} vmlinux.o
+      -T ${KBUILD_VMLINUX_LDS} vmlinux.o `gcc -print-libgcc-file-name` -lc
 
 if [ "${CONFIG_KALLSYMS}" = "y" ]; then
 
@@ -133,7 +133,8 @@ if [ "${CONFIG_KALLSYMS}" = "y" ]; then
         # link in kalll symbols
 	tell LD vmlinux
         ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o vmlinux \
-         -T ${KBUILD_VMLINUX_LDS} vmlinux.o .tmp_kallsyms.o
+         -T ${KBUILD_VMLINUX_LDS} vmlinux.o .tmp_kallsyms.o \
+	    `gcc -print-libgcc-file-name` -lc
 fi
 
 tell SYSMAP System.map

This fixes the flood of undefined symbols, but I still get this on the
link:
    ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored.
    ld: warning: cannot find entry symbol _start; defaulting to 08056320

And when I run the result, I get this, which I don't understand at
all:

    -bash: ./uml/linux: /usr/lib/libc.so.1: bad ELF interpreter: No
such file or directory

			Jeff

-- 
Work email - jdike at linux dot intel dot com

  parent reply	other threads:[~2008-06-11 15:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 19:03 kbuild breaks um - fails to find util when linking Sam Ravnborg
2008-06-11 15:11 ` Jeff Dike
2008-06-11 15:23 ` Jeff Dike
2008-06-11 15:48 ` Jeff Dike [this message]
2008-06-11 19:49   ` Sam Ravnborg
2008-06-12 18:08   ` Sam Ravnborg
2008-06-12 20:13     ` Jeff Dike
2008-06-12 21:06       ` Sam Ravnborg
2008-06-13 23:08         ` Gabriel C
2008-06-18 16:51           ` Jeff Dike
2008-06-18 16:59             ` 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=20080611154816.GA8167@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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