All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: (alpha) process_reloc_for_got confuses r_offset and r_addend
Date: Mon, 5 Sep 2005 20:33:34 +0200	[thread overview]
Message-ID: <9a874849050905113369bae774@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0509051334440.8784@localhost>

On 9/5/05, Chaskiel Grundman <cg2v@andrew.cmu.edu> wrote:
> arch/alpha/kernel/module.c:process_reloc_for_got(), which figures out how
> big the .got section for a module should be, appears to be confusing
> r_offset (the file offset that the relocation needs to be applied to) with
> r_addend (the offset of the relocation's actual target address from the
> address of the relocation's symbol). Because of this, one .got entry is
> allocated for each relocation instead of one each unique symbol/addend.
> 
> In the module I am working with, this causes the .got section to be almost
> 10 times larger than it needs to be (75544 bytes instead of 7608 bytes).
> As the .got is accessed with global-pointer-relative instructions, it
> needs to be within the 64k gp "zone", and a 75544 byte .got clearly does
> not fit. The result of this is that relocation overflows are detected
> during module load and the load is aborted.
> 
> Does anyone see anything wrong with this analysis? I tested a patch that
> makes the obvious change to struct got_entry/process_reloc_for_got and it
> seems to work ok.
> 
> (Please cc me on replies. thanks)

Why not post the patch you made for review as well?

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2005-09-05 18:34 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 [this message]
2005-09-05 18:42   ` Chaskiel Grundman
2005-09-06 21:10     ` Richard Henderson

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=9a874849050905113369bae774@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=cg2v@andrew.cmu.edu \
    --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.