From patchwork Tue Jun 14 19:26:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Holdsworth X-Patchwork-Id: 635511 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 3rTfn2392Vz9t0q for ; Wed, 15 Jun 2016 05:27:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=vcatechnology-com.20150623.gappssmtp.com header.i=@vcatechnology-com.20150623.gappssmtp.com header.b=Asw3DkE4; dkim-atps=neutral Received: from localhost ([::1]:37666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCu04-0003nP-B0 for incoming@patchwork.ozlabs.org; Tue, 14 Jun 2016 15:27:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCtyy-0002RF-7Z for qemu-devel@nongnu.org; Tue, 14 Jun 2016 15:26:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCtyr-00026J-RP for qemu-devel@nongnu.org; Tue, 14 Jun 2016 15:26:39 -0400 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]:38463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCtyr-00026F-Mu for qemu-devel@nongnu.org; Tue, 14 Jun 2016 15:26:33 -0400 Received: by mail-it0-x22a.google.com with SMTP id h190so3180566ith.1 for ; Tue, 14 Jun 2016 12:26:33 -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=030VzY9mq/f1s1pEm7+X9q3zWGFvXSyFEjvOTrYWHv8=; b=Asw3DkE4upUNxC10G8lxFApfTqbiVF94oRjEUYCkg/xbUq8fUEynTpz2JdPgWRrOI4 Iirfj7cgUqsxmdRL2/f4pDhj9BOcptMZHb/8W/qsf3z3dEHv/WQmQsI50L2+T7RNPrci v+EGH0s8rsk8g+iHzJdc931VJRo09+CcvgAV1fQRLi8q/dYPe4F+okImI5BQsHqpBw6F HOCzuVc4JHFFrFpHtby1zkggXbDg6r9CKY/KS6yWyk8Ca3a8ABEJDsbchO4bllYzRYMB wxTmuK1QF9XetkB5CAP5K6jC7JUuXrLSDv+Bdz+U7K8fC/zemBdQJoABd8mWDPAdnbzG gz1Q== 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=030VzY9mq/f1s1pEm7+X9q3zWGFvXSyFEjvOTrYWHv8=; b=XhYZedkQZm0jvDBMIG/eKVJHZ1+J2VCxTQ5dU+izj7hl79y+cVQ2iv/jwzfms4f8/C sqacW75txafPZWwZ7RV7fsP90BkmcgBvg16LQOitW26av2k/lxYi1De3yg+aHnIkx/Q6 Hnf1ZO7D5i2F8UGnQ+qFhMMw5Q+HxH2lYsGL1D5ritw7aNNMtZghtsJjoI43UhIhBVi4 1ndrUIarEBuP8FzWYKUpGM4lI1XwnENBsmdF2HRNzy9qFZ58OoybKgMC7B8CUWubshrc tR1rmQoZTKlFeOV/lEZ6IdDmzAcOo+Ybh4CI79t75NvHnjPGAuYNUqbeeCqZh79vhxsP th0g== X-Gm-Message-State: ALyK8tLXyRY89rOyeEbhn8B3LphpBRItMD2saSkmstVf92Ipux8el+h+76H1mx0p29pJx74R X-Received: by 10.36.17.207 with SMTP id 198mr11091175itf.81.1465932393225; Tue, 14 Jun 2016 12:26:33 -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 w10sm2509039itc.1.2016.06.14.12.26.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Jun 2016 12:26:32 -0700 (PDT) From: Joel Holdsworth To: qemu-devel@nongnu.org Date: Tue, 14 Jun 2016 20:26:21 +0100 Message-Id: <1465932382-28645-4-git-send-email-joel.holdsworth@vcatechnology.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465932382-28645-1-git-send-email-joel.holdsworth@vcatechnology.com> References: <1465932382-28645-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::22a Subject: [Qemu-devel] [PATCH v2 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" --- 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 440986e..1513f0f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6667,7 +6667,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; @@ -6782,6 +6782,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++) {