From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 251ECC2BB55 for ; Thu, 16 Apr 2020 12:46:55 +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 F0E8D208E4 for ; Thu, 16 Apr 2020 12:46:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0E8D208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org 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 1jP3ul-0005iE-UF; Thu, 16 Apr 2020 12:46:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jP3uk-0005i9-Bf for xen-devel@lists.xenproject.org; Thu, 16 Apr 2020 12:46:42 +0000 X-Inumbo-ID: 515fa5a8-7fe0-11ea-b58d-bc764e2007e4 Received: from hera.aquilenet.fr (unknown [185.233.100.1]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 515fa5a8-7fe0-11ea-b58d-bc764e2007e4; Thu, 16 Apr 2020 12:46:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id E129E3384; Thu, 16 Apr 2020 14:46:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DnbOd6ykFoxr; Thu, 16 Apr 2020 14:46:39 +0200 (CEST) Received: from function (lfbn-bor-1-797-11.w86-234.abo.wanadoo.fr [86.234.239.11]) by hera.aquilenet.fr (Postfix) with ESMTPSA id E80473251; Thu, 16 Apr 2020 14:46:38 +0200 (CEST) Received: from samy by function with local (Exim 4.93) (envelope-from ) id 1jP3ue-004VIx-W9; Thu, 16 Apr 2020 14:46:37 +0200 Date: Thu, 16 Apr 2020 14:46:36 +0200 From: Samuel Thibault To: Juergen Gross Subject: Re: [PATCH] mini-os: use -m elf_i386 for final linking Message-ID: <20200416124636.35zgnf5bhq3d3bpw@function> Mail-Followup-To: Samuel Thibault , Juergen Gross , minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org References: <20200416122731.22713-1-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200416122731.22713-1-jgross@suse.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) 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: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Juergen Gross, le jeu. 16 avril 2020 14:27:31 +0200, a ecrit: > 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. ? I'm not seeing this on my system: 0 .text 0001933a 0000000000000000 0000000000000000 00001000 2**12 CONTENTS, ALLOC, LOAD, READONLY, CODE so only 4K offset in the file, the file ends up being 135K big after stripping. > Using -m elf_i386 avoids that problem without any visible disadvantage. Using a 32bit emulation for a 64bit binary? This looks very odd to me? (and probably fragile) I'd like to know more where this 2MB binary file offset is coming from, since AIUI it'd basically impact all binaries built by the toolchain of your system, not just mini-os, and I don't think the maintainers of your system want that :) Samuel