From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkV4a-0001VF-E2 for qemu-devel@nongnu.org; Sat, 23 Jul 2011 01:48:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkV4Y-0003sO-Uh for qemu-devel@nongnu.org; Sat, 23 Jul 2011 01:48:24 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:38922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkV4Y-0003rl-OY for qemu-devel@nongnu.org; Sat, 23 Jul 2011 01:48:22 -0400 From: josch Date: Sat, 23 Jul 2011 07:47:49 +0200 Message-Id: <1311400070-9051-1-git-send-email-josch@pyneo.org> Sender: josch@pyneo.org Subject: [Qemu-devel] [PATCH] add QEMU_LD_PREFIX environment variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio , qemu-devel@nongnu.org Cc: Johannes Schauer From: Johannes Schauer Hi, qemu allows to specify the elf interpreter prefix with the -L option. When using qemu user mode emulation through the binfmt mechanism, it is not possible to pass any commandline arguments to qemu. Having qemu evaluate an environment variable makes it possible to still supply a custom elf interpreter prefix, even if qemu is executed by the binfmt mechanism. My motivation is an emdebian project which creates foreign debian bootstraps. Since foreign binaries are executed without an explicit qemu-user call but by the binfmt mechanism, it relied on having appropriate content in /etc/qemu-binfmt/$arch/ which is the default elf interpreter prefix path on debian. The downside currently is, that the shared libraries in /etc/qemu-binfmt/$arch/ have to be adapted very often for different debian systems running on the same qemu $arch. This could be avoided by setting the proposed environment variable QEMU_LD_PREFIX to the just created debian rootfs. As mentioned earlier, the usage of the -L option is not possible in this scenario because qemu-user is only implicitly called by the binfmt mechanism. Hopefully this change can be applied. thanks! cheers, josch Johannes Schauer (1): add QEMU_LD_PREFIX environment variable linux-user/main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) -- 1.7.5.4