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

2017-12-20 Thread Olof Johansson
On 17-12-18 12:00 +, Burton, Ross wrote: > Just pushed ross/elf with this change. The next obvious step is to turn > lib/oe/qa.py into a new lib/oe/elf.py which has a better API and includes > the stripped function. Great; I've adapted my changes on top of yours and tested it a bit. I've publ

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

2017-12-18 Thread Burton, Ross
On 18 December 2017 at 11:28, Burton, Ross wrote: > On 18 December 2017 at 11:06, Olof Johansson > wrote: > >> 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 s

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

2017-12-18 Thread Burton, Ross
On 18 December 2017 at 11:06, Olof Johansson wrote: > 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 clas

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

2017-12-18 Thread Olof Johansson
On 17-12-06 21:38 +, 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]) > fo

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

2017-12-06 Thread Burton, Ross
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.

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

2017-12-04 Thread Mark Hatle
On 12/4/17 4:00 AM, Olof Johansson wrote: > On 17-12-01 22:13 +0100, Olof Johansson wrote: >> On 17-12-01 11:43 -0600, Mark Hatle wrote: >>> The original implementation did not include the ',' options because >>> different >>> versions of file (as well as different architectures) would return diff

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

2017-12-04 Thread Burton, Ross
On 4 December 2017 at 15:30, Olof Johansson wrote: > On 17-12-04 12:36 +, 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

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

2017-12-04 Thread Olof Johansson
On 17-12-04 12:36 +, 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 cou

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

2017-12-04 Thread Burton, Ross
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,

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

2017-12-04 Thread Olof Johansson
On 17-12-01 22:13 +0100, Olof Johansson wrote: > On 17-12-01 11:43 -0600, Mark Hatle wrote: > > The original implementation did not include the ',' options because > > different > > versions of file (as well as different architectures) would return different > > strings. > > > > They all contains

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

2017-12-01 Thread Olof Johansson
On 17-12-01 11:43 -0600, Mark Hatle wrote: > The original implementation did not include the ',' options because different > versions of file (as well as different architectures) would return different > strings. > > They all contains the same information, but order and inclusion of ',' changed >

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

2017-12-01 Thread Mark Hatle
On 12/1/17 9:50 AM, Olof Johansson wrote: > Avoid matching substrings that are picked up from paths, for instance. > Do this by anchoring the tokens we look for (e.g "executable" or "not > stripped") with whitespace and punctuation. > > Submitted with this patch series is a change that adds the us

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

2017-12-01 Thread Olof Johansson
Avoid matching substrings that are picked up from paths, for instance. Do this by anchoring the tokens we look for (e.g "executable" or "not stripped") with whitespace and punctuation. Submitted with this patch series is a change that adds the use of --brief to file. This removes the path prefix t