[OE-core] [PATCH 5/5] lib/oe/package.py: is_elf: Make it less prone to false positives

Burton, Ross ross.burton at intel.com
Wed Dec 6 21:38:27 UTC 2017


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.

Ross


On 4 December 2017 at 15:33, Burton, Ross <ross.burton at intel.com> wrote:

> On 4 December 2017 at 15:30, Olof Johansson <olof.johansson at axis.com>
> wrote:
>
>> On 17-12-04 12:36 +0000, Burton, Ross wrote:
>> > You might be interested in some of the patches I've got sitting in
>> > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ross/mutb
>> > specifically around "Add new ELF parser".  This adds a fully-featured
>> > Python ELF parser to lib/oe which could be used to inspect the binaries
>> the
>> > way file does, but without having to call and parse the output of file.
>>
>> Oh, that's awesome. Please disregard v1 of my patch series, and
>> I'll try to adapt package.bbclass and lib/oe/package.py to make
>> use of your changes and see what happens. Thanks!
>>
>
> Hopefully to get what you want out of it doesn't involve too much pain...
>
> I still need to finish the series of to get it ready for merging, but I've
> just pushed a new branch ross/elf to poky-contrib which has just the
> patches.  As I clean it up I'll force push there, so feel free to
> track/rebase/send improvements.
>
> Ross
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20171206/c411ffc9/attachment-0002.html>


More information about the Openembedded-core mailing list