Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Paul Pluzhnikov <ppluzhnikov@google.com>
Subject: Re: --gc-section leftovers workaround.
Date: Wed, 28 Oct 2009 19:35:00 -0000	[thread overview]
Message-ID: <200910281935.26781.pedro@codesourcery.com> (raw)
In-Reply-To: <8ac60eac0910281223q144eb548qe92cc9758d184a96@mail.gmail.com>

On Wednesday 28 October 2009 19:23:11, Paul Pluzhnikov wrote:
> On Wed, Oct 28, 2009 at 11:51 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> 
> > With --gc-sections, gnu ld zeros out the start addresses of
> > unreferences FDEs, but leaves them behind.
> 
> I believe the same thing happens when there are multiple instances of the
> same inline function in several translation units: one is selected, and
> debug info for the other ones gets zero start address.

Ah.

> The patch looks good to me.

It wasn't unfortunately.  :-( I had posted an early patch
that got one thing wrong.  It compared FDE->initial_location to
(FDE+1)->initial_location, to check for overlap, and discarded
FDE if so.  But, this isn't correct since FDE may be the valid one
we should keep, and (FDE+1)->initial_location could be 0!  The
corrected patch first looks for the first FDE with
initial_location != 0 and uses that one for overlap and discarding
decisions.  Anyway, I think that patch is itself clearer than I
can manage to explain it.  :-)

-- 
Pedro Alves


  reply	other threads:[~2009-10-28 19:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 18:50 Pedro Alves
2009-10-28 19:23 ` Paul Pluzhnikov
2009-10-28 19:35   ` Pedro Alves [this message]
2009-10-28 20:13     ` Paul Pluzhnikov
2009-10-28 20:20       ` Pedro Alves
2009-10-28 20:35         ` Paul Pluzhnikov
2009-10-28 20:55           ` Pedro Alves
2009-10-28 21:21             ` Paul Pluzhnikov
2009-10-28 19:29 ` Pedro Alves

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=200910281935.26781.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.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