From patchwork Thu Apr 16 12:27:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11492981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 786FB14B4 for ; Thu, 16 Apr 2020 12:28:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EE48206B9 for ; Thu, 16 Apr 2020 12:28:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EE48206B9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jP3cF-0003Wm-MM; Thu, 16 Apr 2020 12:27:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jP3cE-0003WU-Gy for xen-devel@lists.xenproject.org; Thu, 16 Apr 2020 12:27:34 +0000 X-Inumbo-ID: a51e214b-7fdd-11ea-8b81-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a51e214b-7fdd-11ea-8b81-12813bfff9fa; Thu, 16 Apr 2020 12:27:33 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2D0CBAC6D; Thu, 16 Apr 2020 12:27:32 +0000 (UTC) From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Subject: [PATCH] mini-os: use -m elf_i386 for final linking Date: Thu, 16 Apr 2020 14:27:31 +0200 Message-Id: <20200416122731.22713-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , samuel.thibault@ens-lyon.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Using the standard -m elf_x86_64 for 64-bit mini-os results in the first section (.text) to start only at offset 2MB in the binary file. Using -m elf_i386 avoids that problem without any visible disadvantage. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- arch/x86/arch.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/arch.mk b/arch/x86/arch.mk index c87885f..00028a0 100644 --- a/arch/x86/arch.mk +++ b/arch/x86/arch.mk @@ -26,3 +26,5 @@ ifeq ($(CONFIG_PARAVIRT),n) ARCH_LDFLAGS_FINAL := --oformat=elf32-i386 ARCH_AS_DEPS += x86_hvm.S endif + +ARCH_LDFLAGS_FINAL += -m elf_i386