public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in•ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission•com>
Cc: fastboot@osdl•org, Jan Kratochvil <lace@jankratochvil•net>,
	linux-kernel@vger•kernel.org, Linda Wang <lwang@redhat•com>,
	Horms <horms@verge•net.au>, "H. Peter Anvin" <hpa@zytor•com>,
	linuxppc64-dev@ozlabs•org
Subject: Re: [CFT] ELF Relocatable x86 and x86_64 bzImages
Date: Fri, 25 Aug 2006 16:16:17 -0400	[thread overview]
Message-ID: <20060825201617.GC8909@in.ibm.com> (raw)
In-Reply-To: <m1u04x4uiv.fsf_-_@ebiederm.dsl.xmission.com>

On Mon, Jul 31, 2006 at 10:19:04AM -0600, Eric W. Biederman wrote:
> 
> I have spent some time and have gotten my relocatable kernel patches
> working against the latest kernels.  I intend to push this upstream
> shortly.
> 
> Could all of the people who care take a look and test this out
> to make certain that it doesn't just work on my test box?
> 
> My approach is to extend bzImage so that it is an ET_DYN ELF executable
> (we have what used to be a bootsector where we can put the header).
> Boot loaders are explicitly not expected to process relocations.
> 
> The x86_64 kernel is simply built to live at a fixed virtual address
> and the boot page tables are relocated.  The i386 kernel is built
> to process relocates generated with --embedded-relocs (after vmlinux.lds.S)
> has been fixed up to sort out static and dynamic relocations.
> 
> Currently there are 33 patches in my tree to do this.
> 
> The weirdest symptom I have had so far is that page faults did not
> trigger the early exception handler on x86_64 (instead I got a reboot).
> 
> The code should be available shortly at:
> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-reloc.git#reloc-v2.6.18-rc3
> 
> If all goes well with the testing I will push the patches to Andrew in the next couple 
> of days.

It breaks powerpc build as poewrpc does not seem to be defining symbol
_text which is used by arch independent kallsyms.c. Attached is the one
line fix.

Thanks
Vivek


o ppc64 does not seem to be defining symbol _text  which is used by
  kernel/kallsyms.c for relocatable kernel patches. Instead of absolute
  symbol addresses now it is stored as offset from symbol _text
  (_text + offset) so that relocations entries for this section are
  generated, if need be. (currently i386 will be the only user once
  the relocatable kernel patches are merged).

Signed-off-by: Vivek Goyal <vgoyal@in•ibm.com>
---

 arch/powerpc/kernel/vmlinux.lds.S |    1 +
 1 file changed, 1 insertion(+)

diff -puN arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix arch/powerpc/kernel/vmlinux.lds.S
--- linux-2.6.18-rc3-1M/arch/powerpc/kernel/vmlinux.lds.S~ppc64-compilation-fix	2006-08-24 16:16:17.000000000 -0400
+++ linux-2.6.18-rc3-1M-root/arch/powerpc/kernel/vmlinux.lds.S	2006-08-24 16:26:33.000000000 -0400
@@ -33,6 +33,7 @@ SECTIONS
 
 	/* Text and gots */
 	.text : {
+		_text = .;
 		*(.text .text.*)
 		SCHED_TEXT
 		LOCK_TEXT
_

           reply	other threads:[~2006-08-25 20:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <m1u04x4uiv.fsf_-_@ebiederm.dsl.xmission.com>]

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=20060825201617.GC8909@in.ibm.com \
    --to=vgoyal@in$(echo .)ibm.com \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=fastboot@osdl$(echo .)org \
    --cc=horms@verge$(echo .)net.au \
    --cc=hpa@zytor$(echo .)com \
    --cc=lace@jankratochvil$(echo .)net \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc64-dev@ozlabs$(echo .)org \
    --cc=lwang@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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