From: Chris Wright <chrisw@sous-sol.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [git patches] kbuild fixes for -rc
Date: Mon, 8 May 2006 12:03:12 -0700 [thread overview]
Message-ID: <20060508190312.GB2697@moss.sous-sol.org> (raw)
In-Reply-To: <20060508050809.GA2247@mars.ravnborg.org>
Hi Sam,
* Sam Ravnborg (sam@ravnborg.org) wrote:
> commit c8d8b837ebe4b4f11e1b0c4a2bdc358c697692ed
> Author: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> Date: Tue Apr 25 01:53:43 2006 +0900
>
> kbuild: fix modpost segfault for 64bit mipsel kernel
>
> 64bit mips has different r_info layout. This patch fixes modpost
> segfault for 64bit little endian mips kernel.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This one breaks building 32-bit x86 kernels on x86_64 box. Hmm, actually,
breaks 32-bit x86 build...period.
<snip>
> @@ -709,10 +709,17 @@ static void check_sec_ref(struct module
> for (rela = start; rela < stop; rela++) {
> Elf_Rela r;
> const char *secname;
> + unsigned int r_sym;
> r.r_offset = TO_NATIVE(rela->r_offset);
> - r.r_info = TO_NATIVE(rela->r_info);
> + if (hdr->e_ident[EI_CLASS] == ELFCLASS64 &&
> + hdr->e_machine == EM_MIPS) {
> + r_sym = ELF64_MIPS_R_SYM(rela->r_info);
$ make ARCH=i386 bzImage
HOSTCC scripts/mod/modpost.o
/home/chrisw/hg/linux/linux-2.6/scripts/mod/modpost.c: In function ‘check_sec_ref’:
/home/chrisw/hg/linux/linux-2.6/scripts/mod/modpost.c:716: error: cast to union type from type not present in union
Perhaps something at compile time keyed from mk_elfconfig, and drop the
change to modpost.c?
As in, mk_elfconfig can generate:
"#define KERNEL_ELFMACHINE EM_$MACHINE"
And modpost.h can define:
#if KERNELCLASS == ELF32CLASS
...
#define ELF_R_SYM ELF32_R_SYM
...
#else
#if KERNEL_ELFMACHINE == EM_MIPS
/* Mips specific relocation stuff */
...
#define ELF_R_SYM ELF64_MIPS_R_SYM
#else
#define ELF_R_SYM ELF64_R_SYM
#endif
...
#endif
thanks,
-chris
next prev parent reply other threads:[~2006-05-08 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-08 5:08 Sam Ravnborg
2006-05-08 19:03 ` Chris Wright [this message]
2006-05-08 20:01 ` Sam Ravnborg
2006-05-09 3:13 ` Atsushi Nemoto
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=20060508190312.GB2697@moss.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®