From patchwork Wed May 25 16:07:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Holdsworth X-Patchwork-Id: 9135775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7CD1D6075C for ; Wed, 25 May 2016 16:12:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E03D281FE for ; Wed, 25 May 2016 16:12:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62B81282BB; Wed, 25 May 2016 16:12:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D97A7281FE for ; Wed, 25 May 2016 16:12:14 +0000 (UTC) Received: from localhost ([::1]:33893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bPq-0000vx-22 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 12:12:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bKY-0004un-U1 for qemu-devel@nongnu.org; Wed, 25 May 2016 12:06:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5bKW-0002ox-Bm for qemu-devel@nongnu.org; Wed, 25 May 2016 12:06:45 -0400 Received: from mail-it0-x233.google.com ([2607:f8b0:4001:c0b::233]:37389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bKW-0002of-7W for qemu-devel@nongnu.org; Wed, 25 May 2016 12:06:44 -0400 Received: by mail-it0-x233.google.com with SMTP id z123so31140691itg.0 for ; Wed, 25 May 2016 09:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vcatechnology-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TFjN2Xa+fwT2Enb52A0I5rQsYzeHn3Ohu0DSh6h91LQ=; b=zbjTmBmW6I31++ED+ZlZs0Pq7Zq8xb8igLI2yY3v38+CiXKVNvMu4nITdlbq58cx3W //VJRHPbHTx35h2rahEIpusecL9OxX/VlxZFDh8l/b8inEIahDfZcsageadMFoRGZ0mR vKfz3pqT9qrvjmfY/G1hkEBw23DDBbBbgJaA9Xuurc/GkctI28fLguGKzUad3eKpRmBB TAQnco7ISHVHQzKG6d2ABgbHNqWNkPoVnruO1mge64FnWQpOZ0QUTa/H5UJSHy0T1N73 93OH+bslm6ICbiexFJMHO3L30RJSsVmIscYbrZOk3ap1O+dj8fBgrq7iAWx+J4hKNqns TB3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TFjN2Xa+fwT2Enb52A0I5rQsYzeHn3Ohu0DSh6h91LQ=; b=ZBMrgxIYUCLDIoflfmiBVrgBS9UTEji7k0VPFAosAGFTUkDN6pSP+PljGajHjI2LCk 59NkS3UN95Su8pbg8K0/QusCbTcgNBLFhNy3kzKb2TgLhWwhMxvm/3OUfG4cQCp79OQa ZtSS9y0OOL01URiUgAmZwl9Z/SOP/gKT4lL+tD9VpqKbeXIhkdioBCAMset2FZwmm9/c wHICnd5mq+05cODb2nzdt9a62ig404ALKbVbcdRTeoITBCsPlVdBdrpWbVLeLlHU7TUp f/ykGr9IjH4pAzO16XHlXFJaFozSjtTdgQ/BCDWTw+SctHeF2DuADb9LXeUxkd5AuzvN UOfQ== X-Gm-Message-State: ALyK8tLM1MRLZLa6pwaBkhcXYS7yVc65fC3CxZ3dk35mNpilphgFewFj48+ne56yBnAf4g6+ X-Received: by 10.36.5.12 with SMTP id 12mr4725241itl.11.1464192403666; Wed, 25 May 2016 09:06:43 -0700 (PDT) Received: from localhost.localdomain (50-205-134-174-static.hfc.comcastbusiness.net. [50.205.134.174]) by smtp.googlemail.com with ESMTPSA id d196sm2975958ioe.41.2016.05.25.09.06.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2016 09:06:43 -0700 (PDT) From: Joel Holdsworth To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 17:07:51 +0100 Message-Id: <1464192472-7885-4-git-send-email-joel.holdsworth@vcatechnology.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464192472-7885-1-git-send-email-joel.holdsworth@vcatechnology.com> References: <1464192472-7885-1-git-send-email-joel.holdsworth@vcatechnology.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c0b::233 Subject: [Qemu-devel] [PATCH 3/4] linux-user: pass elf interpreter prefix in execve X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: riku.voipio@iki.fi, Vasileios.Kalintiris@imgtec.com, Joel Holdsworth Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP --- linux-user/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b95f75a..fb75c09 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5855,7 +5855,7 @@ static abi_long qemu_execve(char *filename, char *argv[], char *i_arg = NULL, *i_name = NULL; char **qemu_argp, **argp; int i, j; - size_t qemu_argc = 3, argc, host_envc, envpc; + size_t qemu_argc = 5, argc, host_envc, envpc; int fd, ret; char *cp; size_t def_envc = 0, undef_envc = 0; @@ -5970,6 +5970,8 @@ static abi_long qemu_execve(char *filename, char *argv[], /* set up the qemu arguments */ *argp++ = strdup(qemu_execve_path); + *argp++ = strdup("-L"); + *argp++ = strdup(path("/")); /* add arguments for the enironment variables */ for (i = 0; i < def_envc; i++) {