base, python: Allow dirname selection for the interpreter
This is the second step towards being able to run dynamically linked
applications when the guest ISA != than host ISA.
Once the guest interpreter is loaded to memory, we are able to redirect
shared object loads through the redirectPath interface.
How do we load the guest interpreter?
The elf file is for example asking for the /lib/ld-linux-aarch64.so
That would point to a valid dynamic linker/loader if guest ISA == host
ISA, but if we are running on X86 we should point to the guest
(aarch64 in the example) toolchain wherever it is installed.
This patch is adding the --interp-dir option to point to the parent
folder of the guest /lib in the host fs.
Signed-off-by: Giacomo Travaglini <firstname.lastname@example.org>
Reviewed-by: Jason Lowe-Power <email@example.com>
Maintainer: Jason Lowe-Power <firstname.lastname@example.org>
Tested-by: kokoro <email@example.com>
6 files changed