loader: add API to load elf header
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>
Fri, 4 Mar 2016 11:30:21 +0000 (11:30 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 4 Mar 2016 11:30:21 +0000 (11:30 +0000)
commit04ae712a9f31fe21eacfcaeb689c7e6d0a7e251c
treecef357793fb382ff6efb6ff9a69b0e087ec7da75
parente334bd3190f6c4ca12f1d40d316dc471c70009ab
loader: add API to load elf header

Add an API to load an elf header header from a file. Populates a
buffer with the header contents, as well as a boolean for whether the
elf is 64b or not. Both arguments are optional.

Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: Fix typo in comment]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/core/loader.c
include/hw/loader.h