Received: from eggs.gnu.org ([2001:4830:134:3::10]:55723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZueh-00049G-N2 for qemu-devel@nongnu.org; Thu, 10 Sep 2015 01:44:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZuee-0004dV-I8 for qemu-devel@nongnu.org; Thu, 10 Sep 2015 01:44:19 -0400 Received: from smtpbg302.qq.com ([184.105.206.27]:60561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZuee-0004bP-Aa for qemu-devel@nongnu.org; Thu, 10 Sep 2015 01:44:16 -0400 Sender: gang.chen.5i5j@qq.com From: gang.chen.5i5j@gmail.com Date: Thu, 10 Sep 2015 13:43:47 +0800 Message-Id: <1441863827-4004-1-git-send-email-gang.chen.5i5j@gmail.com> Subject: [Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: riku.voipio@iki.fi Cc: peter.maydell@linaro.org, Chen Gang , qemu-devel@nongnu.org, xili_gchen_5257@hotmail.com, rth@twiddle.net From: Chen Gang If qemu sets interp_prfix via command line '-L' instead of environments variable QEMU_LD_PREFIX, it will cause syscall execve() failed. Because the 2nd qemu has no command line '-L'. So qemu need always set QEMU_LD_PREFIX when interp_prefix is changed. Signed-off-by: Chen Gang --- linux-user/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 06dd296..2f31ea6 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3539,7 +3539,11 @@ static void handle_arg_stack_size(const char *arg) static void handle_arg_ld_prefix(const char *arg) { + char *buf = g_strdup_printf("QEMU_LD_PREFIX=%s", arg); + interp_prefix = strdup(arg); + (void) envlist_setenv(envlist, buf); + g_free(buf); } static void handle_arg_pagesize(const char *arg) -- 1.9.1