From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51983 invoked by alias); 4 Oct 2019 09:09:21 -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 51965 invoked by uid 89); 4 Oct 2019 09:09:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=sometime X-Spam-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1-d.mail.gandi.net Received: from relay1-d.mail.gandi.net (HELO relay1-d.mail.gandi.net) (217.70.183.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Oct 2019 09:09:20 +0000 X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodji@seketeli.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id E9C6524001B; Fri, 4 Oct 2019 09:09:15 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id C6716180006A; Fri, 4 Oct 2019 11:09:14 +0200 (CEST) From: Dodji Seketeli To: "simark at simark dot ca" 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 Organization: Me, myself and I References: X-Operating-System: Red Hat Enterprise Linux Workstation 7.7 X-URL: http://www.seketeli.net/~dodji Date: Tue, 01 Jan 2019 00:00:00 -0000 In-Reply-To: (simark at simark dot ca's message of "Wed, 02 Oct 2019 21:58:52 +0000") Message-ID: <8736g8ri6d.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-q4/txt/msg00023.txt.bz2 "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 Dodji