From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52316 invoked by alias); 4 Oct 2019 09:09:57 -0000 Mailing-List: contact libabigail-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Id: List-Subscribe: Sender: libabigail-owner@sourceware.org Received: (qmail 52276 invoked by uid 55); 4 Oct 2019 09:09:53 -0000 From: "dodji at seketeli dot org" To: libabigail@sourceware.org Subject: [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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at seketeli dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q4/txt/msg00024.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25058 --- Comment #9 from dodji at seketeli dot org --- "simark at simark dot ca" a =C3=A9crit: > 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_nam= e 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. --=20 You are receiving this mail because: You are on the CC list for the bug.