public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH] Bug 27165 - Better support multi-language binaries
Date: Tue, 02 Feb 2021 17:21:22 +0100	[thread overview]
Message-ID: <87r1lyfnjx.fsf@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

Hello,

In some binaries, a DIE named I originating from a compilation unit
written in the C++ language can be an implementation of a DIE named S
(linked through the DW_AT_specification attribute on I) originating
from a compilation unit written in, say, the C language.

In that case, when are we looking at I and try to get the scope of S
(which the DWARF reader considers as the logical scope of I)
get_scope_for_die needs to look at the DW_AT_language attribute
carried by the compilation unit DIE of S.  At the moment, we wrongly
look at the DW_AT_language carried by the compilation unit DIE of I
and we deduce the wrong language (C++ instead of C).

This patch fixes that.

	* src/abg-dwarf-reader.cc (get_scope_for_die): Get the language of
	the DIE from the compilation unit of the DIE itself.
	* tests/data/test-types-stability/PR27165-libzmq.so.5.2.3: New
	test input.
	* tests/data/test-types-stability/PR27165-libzmq.so.5.2.3.debug:
	Debug information for the new test input.
	* tests/data/Makefile.am: Add the test inputs above to the source
	distribution.
	* tests/test-types-stability.cc (elf_paths): Add the new test
	inputs to this test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>

Applied to master.

The patch is big so I am attaching it gzipped here.


[-- Attachment #2: gzipped patch --]
[-- Type: application/gzip, Size: 6438025 bytes --]

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]


-- 
		Dodji

                 reply	other threads:[~2021-02-02 16:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87r1lyfnjx.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@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).