| To: | Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
|---|---|
| Subject: | Re: [PATCH] fix modpost segfault for 64bit mipsel kernel |
| From: | Thiemo Seufer <ths@networkno.de> |
| Date: | Mon, 17 Apr 2006 13:53:32 +0100 |
| Cc: | linux-mips@linux-mips.org, ralf@linux-mips.org, sam@ravnborg.org |
| In-reply-to: | <20060417.210039.95063383.nemoto@toshiba-tops.co.jp> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20060417.210039.95063383.nemoto@toshiba-tops.co.jp> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.11+cvs20060403 |
Atsushi Nemoto wrote: > 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> > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index cd00e9f..7846600 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -712,7 +712,13 @@ static void check_sec_ref(struct module > r.r_offset = TO_NATIVE(rela->r_offset); > r.r_info = TO_NATIVE(rela->r_info); > r.r_addend = TO_NATIVE(rela->r_addend); > +#if KERNEL_ELFCLASS == ELFCLASS64 && KERNEL_ELFDATA == ELFDATA2LSB > + sym = elf->symtab_start + > + (hdr->e_machine == EM_MIPS ? > + (Elf32_Word)r.r_info : ELF_R_SYM(r.r_info)); > +#else > sym = elf->symtab_start + ELF_R_SYM(r.r_info); > +#endif This doesn't look right. ELF64_R_SYM/ELF64_R_TYPE should be fixed for mips64 instead. Thiemo |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] use __ffs() instead of ffs() in ip32_irq0(), Atsushi Nemoto |
|---|---|
| Next by Date: | Re: tx49 Ether problems, Sergei Shtylyov |
| Previous by Thread: | [PATCH] fix modpost segfault for 64bit mipsel kernel, Atsushi Nemoto |
| Next by Thread: | Re: [PATCH] fix modpost segfault for 64bit mipsel kernel, Thiemo Seufer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |