Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Olof Johansson <olof.johansson@axis.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 5/5] lib/oe/package.py: is_elf: Make it less prone to false positives
Date: Mon, 18 Dec 2017 12:06:02 +0100	[thread overview]
Message-ID: <20171218110602.ppicezmskdv5emkq@axis.com> (raw)
In-Reply-To: <CAJTo0LYemQ16EavmwCLa4PYZQHbg12BSDgiCEZomx1YSRV7Rwg@mail.gmail.com>

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


  reply	other threads:[~2017-12-18 11:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 15:50 [PATCH 0/5] Improve isELF, gets triggered by ELF anywhere in pathname Olof Johansson
2017-12-01 15:50 ` [PATCH 1/5] lib/oe/package.py: Expose is_elf Olof Johansson
2017-12-04  9:34   ` Olof Johansson
2017-12-01 15:50 ` [PATCH 2/5] package.bbclass: Make use of common is_elf function Olof Johansson
2017-12-01 15:50 ` [PATCH 3/5] lib/oe/package.py: is_elf: Don't let filename influence filetype Olof Johansson
2017-12-01 15:50 ` [PATCH 4/5] lib/oe/package.py: is_elf: Disallow shell specials to be expanded Olof Johansson
2017-12-01 15:50 ` [PATCH 5/5] lib/oe/package.py: is_elf: Make it less prone to false positives Olof Johansson
2017-12-01 17:43   ` Mark Hatle
2017-12-01 21:13     ` Olof Johansson
2017-12-04 10:00       ` Olof Johansson
2017-12-04 19:22         ` Mark Hatle
2017-12-04 12:36   ` Burton, Ross
2017-12-04 15:30     ` Olof Johansson
2017-12-04 15:33       ` Burton, Ross
2017-12-06 21:38         ` Burton, Ross
2017-12-18 11:06           ` Olof Johansson [this message]
2017-12-18 11:28             ` Burton, Ross
2017-12-18 12:00               ` Burton, Ross
2017-12-20 11:05                 ` Olof Johansson

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=20171218110602.ppicezmskdv5emkq@axis.com \
    --to=olof.johansson@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /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