From patchwork Thu Sep 10 05:43:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 516129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3163B14010F for ; Thu, 10 Sep 2015 15:44:38 +1000 (AEST) Received: from localhost ([::1]:47084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZuey-0004WY-5e for incoming@patchwork.ozlabs.org; Thu, 10 Sep 2015 01:44:36 -0400 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 X-QQ-mid: esmtp32t1441863839t053t07316 Received: from localhost.localdomain (unknown [36.110.17.42]) by esmtp4.qq.com (ESMTP) with id ; Thu, 10 Sep 2015 13:43:53 +0800 (CST) X-QQ-SSF: 01000000000000F0FG400500002000H X-QQ-FEAT: q17Yoz/cMVqJntu7H28t4ff60W5KYFjEBN0e83Do/Ii9gxIHq6Hi4R5xyEdsf tIc2t2btFeHOdJPEFZzKMwAL3LhFTxF45f+NuFHuLsMGTJlqtNvp/06PyIccgBAB4YvkWku vLMb4GrUiIzD7Zc8/nhmYie9V9yRiM+24GrcW3Lu68hwqgh1h7yRokc8L3slHrb/sKoJGTj 6PsB2fX5CCJ0uxs6fXZHXZ9++mBWSxVX+GrNkmMgFOXwixa3tdVYs X-QQ-GoodBg: 0 X-QQ-CSender: gang.chen.5i5j@qq.com From: gang.chen.5i5j@gmail.com To: riku.voipio@iki.fi Date: Thu, 10 Sep 2015 13:43:47 +0800 Message-Id: <1441863827-4004-1-git-send-email-gang.chen.5i5j@gmail.com> X-Mailer: git-send-email 1.9.1 X-QQ-SENDSIZE: 520 X-QQ-FName: 3DBCBF5E40614B92AC78D577075EE345 X-QQ-LocalIP: 127.0.0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 184.105.206.27 Cc: peter.maydell@linaro.org, Chen Gang , qemu-devel@nongnu.org, xili_gchen_5257@hotmail.com, rth@twiddle.net Subject: [Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)