On Thu, Oct 7, 2021 at 4:32 PM Alex Bennée <alex.ben...@linaro.org> wrote: > > Are there any other approaches you could take? Which do you think has > the most merit?
Reading through the ELF loader code in the kernel, I had another idea: If qemu-user could be turned into a replacement for /lilb/ld.so and act as an ELF interpreter rather than a binfmt-misc helper, this might address a lot of the issues automatically. It would need to be a statically linked binary so it doesn't itself require an interpreter. It would have to do the job of ld.so in addition to the emulation, but it could do that by finding the real ld.so somewhere else and running that in emulation mode. It would also not work at all for statically linked executables. Not sure if that makes the tradeoffs better than your other suggestions, but it seemed worth bringing up. Arnd