From patchwork Thu Dec 1 05:14:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9455437 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 24A9160235 for ; Thu, 1 Dec 2016 05:33:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18EF1283E8 for ; Thu, 1 Dec 2016 05:33:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DCCA2846D; Thu, 1 Dec 2016 05:33:12 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 AD3C2283E8 for ; Thu, 1 Dec 2016 05:33:11 +0000 (UTC) Received: from localhost ([::1]:48235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCJzY-0001Xa-Qf for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Dec 2016 00:33:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCJho-0002xA-5n for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCJhl-0007SC-Ho for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:48 -0500 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]:33208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCJhl-0007QH-C1 for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:45 -0500 Received: by mail-yw0-x243.google.com with SMTP id s68so16780322ywg.0 for ; Wed, 30 Nov 2016 21:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RGQlL8z8WmxA48biF0ecIvk+3wD6UaNVlvGHV6N4L1Q=; b=dLd6tFgJSQqvq3WapWN52wlfLtDuKIvwyLuQB77ovCi6yHzHyE5b3Fy0EltVnaUncn PGuAhJ+S+WdvAWgNuHAoTtB57gpXYJrYc0OSknLtIoyeoSeHbv9UvOmIgoTJV+ijPNo+ jeJkTo+p/9pvwQqhOwgIvg54ZjEzkgYMP5SYDvUgguBuxRk5xl8CPB8z8ohKwGN/4qUz jPspeG/FjJLvcCNZIwY2WYhuvASwZAMyR9voMmM90KqaYt6YCjkPAj5aEXUT93C1brr0 rkKCfYH9iltJq9yZsDmE69+NcK2NGcdLGFsV/Nzq+ZQbxEDiPaDw82Vl90kLWNKvTdQ+ NK4g== 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=RGQlL8z8WmxA48biF0ecIvk+3wD6UaNVlvGHV6N4L1Q=; b=iDudBZBq1rtPKTfq0RnUJz3X4LQxLGGNg5y413nB5r4U3tSIcQNEi3wLMEP1nfvZM9 PbGUhGSFro5YPP+zGDqwxgDxHxjdn1ZYSpAOTYDbWMMu5oh88PKv4sbzC0ZS7u3nl0f1 5j1GBxXEX3L+pe4RVYa/n4ePbGDE0nnobSxEcmnkgqzHulIghK8JZeUkFkVQJ+yGBK2t d6gjLknn2qHBpG2KR1hTuv0gLOP4gbA5TyYvUADzeeafuPCjA2DUh0Pdf5fgUiqiB1mz ozFW8rgoJkennXVAn5XAZr/w0p3akhOtCuhz+l89B7+hQa5BBUfZ6djMlAN34YhPj2wn Fjlw== X-Gm-Message-State: AKaTC02mRw4hGtD58DDPJL564zXCUabD/aiV3iMNjuPmv2zVcTcHQ9tg4I78EG9DtAFk+A== X-Received: by 10.129.147.196 with SMTP id k187mr45855707ywg.135.1480569284412; Wed, 30 Nov 2016 21:14:44 -0800 (PST) Received: from localhost.localdomain (c-73-207-178-95.hsd1.ga.comcast.net. [73.207.178.95]) by smtp.gmail.com with ESMTPSA id l73sm24681068ywc.54.2016.11.30.21.14.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Nov 2016 21:14:43 -0800 (PST) From: Pranith Kumar To: alex.bennee@linaro.org Date: Thu, 1 Dec 2016 00:14:27 -0500 Message-Id: <20161201051433.17168-14-bobby.prani@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161201051433.17168-1-bobby.prani@gmail.com> References: <20161201051433.17168-1-bobby.prani@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::243 Subject: [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test 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: qemu-devel@nongnu.org, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Include a missing header and rename the function names to avoid definition mis-match. Signed-off-by: Pranith Kumar --- tests/tcg/hello-i386.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c index fa00380..4a46f80 100644 --- a/tests/tcg/hello-i386.c +++ b/tests/tcg/hello-i386.c @@ -1,6 +1,7 @@ #include +#include -static inline void exit(int status) +static inline void _exit(int status) { int __res; __asm__ volatile ("movl %%ecx,%%ebx\n"\ @@ -8,7 +9,7 @@ static inline void exit(int status) : "=a" (__res) : "0" (__NR_exit),"c" ((long)(status))); } -static inline int write(int fd, const char * buf, int len) +static inline int _write(int fd, const char * buf, int len) { int status; __asm__ volatile ("pushl %%ebx\n"\ @@ -22,6 +23,6 @@ static inline int write(int fd, const char * buf, int len) void _start(void) { - write(1, "Hello World\n", 12); - exit(0); + _write(1, "Hello World\n", 12); + _exit(0); }