]> 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>
Fri, 25 Nov 2016 17:35:03 +0000 (17:35 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Jan 2017 11:46:37 +0000 (11:46 +0000)
commitb88c6bd61e7c3388b3902de1adb5e48a88f2e235
tree4b7b83d0105f02a065ca3dc2a1ce894f51ba9f86
parenteec53627ac5c3aa811a0bd97f06a4827ef0189d3
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oe/qa.py