From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxLz-0003Dj-Jz for qemu-devel@nongnu.org; Mon, 31 Oct 2011 15:17:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKxLy-0003in-2x for qemu-devel@nongnu.org; Mon, 31 Oct 2011 15:17:03 -0400 Received: from afflict.kos.to ([92.243.29.197]:35900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKxLx-0003ib-Pl for qemu-devel@nongnu.org; Mon, 31 Oct 2011 15:17:01 -0400 Date: Mon, 31 Oct 2011 21:16:59 +0200 From: Riku Voipio Message-ID: <20111031191659.GA11334@afflict.kos.to> References: <1317404788-30244-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] linux-user: add binfmt wrapper for argv[0] handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: vagrant@debian.org, J.Schauer@email.de, qemu-devel Developers , Reinhard Max On Sat, Oct 29, 2011 at 08:08:39PM +0200, Alexander Graf wrote: > > When using qemu's linux-user binaries through binfmt, argv[0] gets lost > > along the execution because qemu only gets passed in the full file name > > to the executable while argv[0] can be something completely different. > > > > This breaks in some subtile situations, such as the grep and make test > > suites. > > > > This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be > > used with binfmt's P flag which passes the full path _and_ argv[0] to > > the binfmt handler. > > > > The binary would be smart enough to be versatile and only exist in the > > system once, creating the qemu binary path names from its own argv[0]. > > However, this seemed like it didn't fit the make system too well, so > > we're currently creating a new binary for each target archictecture. > > > > CC: Reinhard Max > > Signed-off-by: Alexander Graf > Ping? Last time a wrapper for binfmt was suggested on this list, it was shot down since people didn't want to add extra binary to the chroot. But your point is valid, without proper argv[0] things break sometimes. For the same reason scratchbox has a wrapper binary instead of calling qemu directly... Riku