public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org, Richard Sandiford <rdsandiford@googlemail.com>
Subject: Re: [3/6] Fix overcounting of ARM PLT references
Date: Thu, 31 May 2012 21:10:00 -0000	[thread overview]
Message-ID: <CAMe9rOq7c1DVYvOGVf1vYrxnVKY0VVGO12kH9jWz8FcZemWLAg@mail.gmail.com> (raw)
In-Reply-To: <g47hcevpgr.fsf@linaro.org>

On Fri, Mar 4, 2011 at 8:07 AM, Richard Sandiford
<richard.sandiford@linaro.org> wrote:
> If a shared object has only non-call references to a function that is
> defined in the same shared object, we will nevertheless generate an
> unused PLT entry for it.  This is due to some overeager counting in
> elf32_arm_check_relocs.
>
> The patch below restructures check_relocs and its gc_sweep_hook
> counterpart to make things a little more obvious (I hope).
> This also makes it easier to slip in the ifunc handling.
> I've kept a fair bit of the existing commentary, but moved
> it around.
>
> Note that the R_ARM_ABS12 case was misplaced: it fell through
> into the PLT relocs instead of the absolute relocs.
>
> Tested on arm-linux-gnueabi.  OK to install?
>
> Richard
>
>
> bfd/
>        * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
>        may_need_local_target_p and may_become_dynamic_p to classify
>        the relocation type.  Don't check info->symbolic or h->def_regular
>        when deciding whether to record a potential dynamic reloc.
>        Don't treat potential dynamic relocs as PLT references.
>        (elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
>        try to make the PLT reference count go negative.
>

This caused:

http://sourceware.org/bugzilla/show_bug.cgi?id=14189

-- 
H.J.

      parent reply	other threads:[~2012-05-31 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 16:08 Richard Sandiford
2011-03-14 14:17 ` Nick Clifton
2012-05-31 21:10 ` H.J. Lu [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=CAMe9rOq7c1DVYvOGVf1vYrxnVKY0VVGO12kH9jWz8FcZemWLAg@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=rdsandiford@googlemail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).