]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/qa: handle binaries with segments outside the first 4kb
authorRoss Burton <ross.burton@intel.com>
Mon, 7 Nov 2016 14:11:01 +0000 (14:11 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Nov 2016 15:18:48 +0000 (15:18 +0000)
commita66660aa5bb709547ce0b65a4563e4217c3c3d9f
tree2f4ac4b471860cc05b0accfa181e1044f6227210
parentb02cef58ee35dd277fff48538ce2803df1cbc4d5
lib/oe/qa: handle binaries with segments outside the first 4kb

The ELF parser was assuming that the segment tables are in the first 4kb of the
binary.  Whilst this generally appears to be the case, there have been instances
where the segment table is elsewhere (offset 2MB, in this sample I have).  Solve
this problem by mmap()ing the file instead.

Also clean up the code a little whilst chasing the problem.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/qa.py