All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, sam@ravnborg.org
Subject: Re: [PATCH] fix modpost segfault for 64bit mipsel kernel
Date: Mon, 17 Apr 2006 13:53:32 +0100	[thread overview]
Message-ID: <20060417125332.GB28935@networkno.de> (raw)
In-Reply-To: <20060417.210039.95063383.nemoto@toshiba-tops.co.jp>

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

  reply	other threads:[~2006-04-17 12:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-17 12:00 [PATCH] fix modpost segfault for 64bit mipsel kernel Atsushi Nemoto
2006-04-17 12:53 ` Thiemo Seufer [this message]
2006-04-17 14:07   ` Thiemo Seufer
2006-04-17 15:47     ` Atsushi Nemoto
2006-04-17 16:27       ` Thiemo Seufer
2006-04-19  2:22         ` Atsushi Nemoto
2006-04-20  0:19           ` Thiemo Seufer
2006-04-20 16:02             ` Atsushi Nemoto
2006-04-20 16:23               ` Thiemo Seufer
2006-04-20 17:05                 ` Atsushi Nemoto
2006-04-21 13:57                   ` Thiemo Seufer
2006-04-17 13:40 ` Sam Ravnborg
2006-04-17 16:03   ` 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=20060417125332.GB28935@networkno.de \
    --to=ths@networkno.de \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.