From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id B63B8397B830 for ; Thu, 15 Jul 2021 12:10:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B63B8397B830 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (77-167-121-15.hybrid.kpn.net [77.167.121.15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 866B6300066F; Thu, 15 Jul 2021 14:10:21 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 9CED32E80112; Thu, 15 Jul 2021 14:10:20 +0200 (CEST) Date: Thu, 15 Jul 2021 14:10:20 +0200 From: Mark Wielaard To: Timm Baeder Cc: Tomasz =?utf-8?B?UGF3ZcWC?= Gajc , elfutils-devel@sourceware.org Subject: Re: [PATCH] readelf: allow build with LLVM/clang Message-ID: References: <20210712095941.15620-1-tpgxyz@gmail.com> <37614938-c55e-32aa-78ba-1fb8b8969f32@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <37614938-c55e-32aa-78ba-1fb8b8969f32@redhat.com> X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2021 12:10:25 -0000 Hi Timm, On Thu, Jul 15, 2021 at 07:46:15AM +0200, Timm Baeder via Elfutils-devel wrote: > FWIW, there is a different version of this patch at > https://sourceware.org/pipermail/elfutils-devel/2021q1/003674.html > that doesn't have those problems as far as I remember. Indeed, that looks more clean. I still like the nested function approach better since it is more concise. But I added a ChangeLog entry and pushed the above as: commit 779c57ea864d104bad88455535df9b26336349fd Author: Timm Bäder Date: Thu Mar 18 10:25:24 2021 +0100 readelf: Pull advance_pc() in file scope Make advance_pc() a static function so we can get rid of another nested function. Rename it to run_advance_pc() and use a local advance_pc() macro to pass all the local variables. This is similar to what the equivalent code in libdw/dwarf_getsrclines.c is doing. Signed-off-by: Timm Bäder Sorry I missed this patch earilier. If there are any other pending patches that need review please ping them. Cheers, Mark