elf: add 64 bits elf loading support
This patch add elf64 loading support to the elf loader. Since
elf32 and elf64 uses completely different types, to avoid copying all
the code and simply replace elf32 with elf64, use a macro which will
return the appropriate field for each type of header. This macro
generates getter for elf structures according to the class of the loaded
elf.
All direct elf struct dereference are then replaced by call to generated
functions. This allows to keep a common loader code even if types are
different.

Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Clement Leger <cleger@kalray.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 59cca41 commit 0ca284b26d0ef59912380478b71a90976e3e79cc
@Clement Leger Clement Leger authored on 4 Sep 2019
Sascha Hauer committed on 6 Sep 2019
Showing 2 changed files
View
common/elf.c
View
include/elf.h