public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@seketeli.org>
To: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
Cc: libabigail@sourceware.org
Subject: Re: [Bug default/25058] abigail does not handle subprogram DIEs with DW_AT_ranges instead of DW_AT_low_pc
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <8736g8ri6d.fsf@seketeli.org> (raw)
In-Reply-To: <bug-25058-9487-wzMwA8VMEY@http.sourceware.org/bugzilla/> (simark	at simark dot ca's message of "Wed, 02 Oct 2019 21:58:52 +0000")

"simark at simark dot ca" <sourceware-bugzilla@sourceware.org> a écrit:

> I suppose it could try to look up an ELF symbol using the "low pc" of each
> range, until it finds one whose name corresponds to the DW_AT_linkage_name of
> the function DIE (if the DIE has that attribute).

I think trying to match the DW_AT_linkage_name will lead to to errors
because we can't rely on the fact that a DW_AT_linkage_name has to match
a symbol name.

Symbol aliasing, which usually happens due to compiler code size
optimizations (e.g, happens a lot in C++), or due to assembler tricks
programmers play sometime, can make the name of the symbol be different
from the value of the DW_AT_linkage_name.

So instead, I'd go for just picking the first address (of the set
referred to by the value of the DW_AT_ranges attribute) that is for a
publicly exported function symbol and consider that one as being the one
we are looking for.

-- 
		Dodji

  reply	other threads:[~2019-10-04  9:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 [Bug default/25058] New: abigail does not recognize simark at simark dot ca
2019-01-01  0:00 ` [Bug default/25058] abigail does not handle subprogram DIEs with DW_AT_ranges instead of DW_AT_low_pc simark at simark dot ca
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00   ` Dodji Seketeli
2019-01-01  0:00 ` dodji at seketeli dot org
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00   ` Dodji Seketeli [this message]
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` dodji at seketeli dot org
2019-01-01  0:00 ` mark at klomp dot org
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` mark at klomp dot org
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` dodji at redhat dot com
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` simark at simark dot ca
2019-01-01  0:00 ` dodji at redhat dot com

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=8736g8ri6d.fsf@seketeli.org \
    --to=dodji@seketeli.org \
    --cc=libabigail@sourceware.org \
    --cc=sourceware-bugzilla@sourceware.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 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).