All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Cc: Jesper Juhl <jesper.juhl@gmail.com>,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: (alpha) process_reloc_for_got confuses r_offset and r_addend
Date: Tue, 6 Sep 2005 14:10:19 -0700	[thread overview]
Message-ID: <20050906211019.GA8430@twiddle.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0509051439040.10147@endicott.pit.dementia.org>

This patch is correct.


r~

On Mon, Sep 05, 2005 at 02:42:36PM -0400, Chaskiel Grundman wrote:
> On Mon, 5 Sep 2005, Jesper Juhl wrote:
> > Why not post the patch you made for review as well?
> 
> In part because if the analysis is wrong, then the patch surely is.
> 
> but mostly because I didn't want to post my message with the bland subject 
> that the faq recommends for patches.
> 
> --- linux-2.6.12.5/arch/alpha/kernel/module.c      2005-08-14 20:20:18.000000000 -0400
> +++ linux/arch/alpha/kernel/module.c   2005-09-05 12:38:43.000000000 -0400
> @@ -47,7 +47,7 @@
> 
>   struct got_entry {
>          struct got_entry *next;
> -       Elf64_Addr r_offset;
> +       Elf64_Sxword r_addend;
>          int got_offset;
>   };
> 
> @@ -57,14 +57,14 @@
>   {
>          unsigned long r_sym = ELF64_R_SYM (rela->r_info);
>          unsigned long r_type = ELF64_R_TYPE (rela->r_info);
> -       Elf64_Addr r_offset = rela->r_offset;
> +       Elf64_Sxword r_addend = rela->r_addend;
>          struct got_entry *g;
> 
>          if (r_type != R_ALPHA_LITERAL)
>                  return;
> 
>          for (g = chains + r_sym; g ; g = g->next)
> -               if (g->r_offset == r_offset) {
> +               if (g->r_addend == r_addend) {
>                          if (g->got_offset == 0) {
>                                  g->got_offset = *poffset;
>                                  *poffset += 8;
> @@ -74,7 +74,7 @@
> 
>          g = kmalloc (sizeof (*g), GFP_KERNEL);
>          g->next = chains[r_sym].next;
> -       g->r_offset = r_offset;
> +       g->r_addend = r_addend;
>          g->got_offset = *poffset;
>          *poffset += 8;
>          chains[r_sym].next = g;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2005-09-06 21:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-05 17:53 (alpha) process_reloc_for_got confuses r_offset and r_addend Chaskiel Grundman
2005-09-05 18:33 ` Jesper Juhl
2005-09-05 18:42   ` Chaskiel Grundman
2005-09-06 21:10     ` Richard Henderson [this message]

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=20050906211019.GA8430@twiddle.net \
    --to=rth@twiddle.net \
    --cc=akpm@osdl.org \
    --cc=cg2v@andrew.cmu.edu \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.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.