From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bastet.se.axis.com (bastet.se.axis.com [195.60.68.11]) by mail.openembedded.org (Postfix) with ESMTP id A20C26007A for ; Mon, 18 Dec 2017 11:06:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 38A55182CB; Mon, 18 Dec 2017 12:06:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id AVXqMq25l8hv; Mon, 18 Dec 2017 12:06:03 +0100 (CET) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id 46A8118300; Mon, 18 Dec 2017 12:06:03 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 02E051E077; Mon, 18 Dec 2017 12:06:03 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB3101E05C; Mon, 18 Dec 2017 12:06:02 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder03.se.axis.com (Postfix) with ESMTP; Mon, 18 Dec 2017 12:06:02 +0100 (CET) Received: from lnxolofjn.se.axis.com (lnxolofjn.se.axis.com [10.92.17.1]) by thoth.se.axis.com (Postfix) with ESMTP id DE2001726; Mon, 18 Dec 2017 12:06:02 +0100 (CET) Received: by lnxolofjn.se.axis.com (Postfix, from userid 20466) id C93B19C0AD; Mon, 18 Dec 2017 12:06:02 +0100 (CET) Date: Mon, 18 Dec 2017 12:06:02 +0100 From: Olof Johansson To: "Burton, Ross" Message-ID: <20171218110602.ppicezmskdv5emkq@axis.com> Mail-Followup-To: "Burton, Ross" , OE-core References: <20171201155024.3002-1-olofjn@axis.com> <20171201155024.3002-6-olofjn@axis.com> <20171204153001.enqgfe27iapaoftl@axis.com> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-TM-AS-GCONF: 00 Cc: OE-core Subject: Re: [PATCH 5/5] lib/oe/package.py: is_elf: Make it less prone to false positives X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2017 11:06:04 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 17-12-06 21:38 +0000, Burton, Ross wrote: > If you are looking at this then you'll want to pull my branch again as I > just pushed a few fixes to make ARM binaries actually work. > > Also, a prototype "is this binary stripped" function would be: > > elf = oe.elf.Elf.from_file(sys.argv[1]) > for h in elf.header.section_headers: > if h.type == oe.elf.Elf.ShType.progbits and h.name == ".debug_info": > return False > return True > > If you're not working on this yet, please say, as I'll probably have a look > this week. I'm so sorry, I missed your email; I am, but maybe not as quickly as you are able to(?). My is_stripped looks kind of like yours, but without the ShType.progbits. Thanks for the suggestion! I were able to hackishly integrate the Elf class it with staging.bbclass and package.bbclass. I did have a couple of questions; if I were to add an is_stripped method, would that fit best in the Elf class itself or in some wrapper? Would renaming the elf class to "ElfParser" class make more sense, and have an ELF class that wraps it? I can publish a draft somewhere later today. Thanks your work! -- olofjn