Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kVFVW-0005Cy-DO for mharc-grub-devel@gnu.org; Wed, 21 Oct 2020 10:54:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVFVP-0004xX-Ea for grub-devel@gnu.org; Wed, 21 Oct 2020 10:54:24 -0400 Received: from mail.rmail.be ([85.234.218.189]:56702) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVFVM-0007MW-Ue for grub-devel@gnu.org; Wed, 21 Oct 2020 10:54:22 -0400 Received: from mail.rmail.be (localhost [127.0.0.1]) by mail.rmail.be (Postfix) with ESMTP id 89BB2855282 for ; Wed, 21 Oct 2020 16:54:17 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 21 Oct 2020 16:54:17 +0200 From: AL13N To: grub-devel@gnu.org Subject: linker overlap when building xen target Message-ID: <877cc393e4a8d7e689bd91e8546e9368@mail.rmail.be> X-Sender: alien@rmail.be User-Agent: Roundcube Webmail/1.0.9-1.2.mga5 Received-SPF: pass client-ip=85.234.218.189; envelope-from=alien@rmail.be; helo=mail.rmail.be X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/21 10:54:17 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2020 14:54:24 -0000 Hi, I'm a mageia packager, and I was interested in packaging grub-2.02 with x86_64-xen target. unfortuntely, when compiling kernel.exec, I got an overlap error: https://pastebin.com/D5KGyVBF the command line in question was: https://pastebin.com/FKz3F2bZ , so, i've seen the Makefile code and apparently all xen targets have the -Ttext=0 (other targets have different values, so i'm assuming it's on purpose) (i did add the verbose and map arguments) the map file contains: https://pastebin.com/xXv8nHSY . I've seen the startup.S (which is the kern/x86_64/xen/kernel_exec-startup.o )? see https://pastebin.com/Frm2vpAi (i'm assuming the padding to local stack is for security purposes) and or host/guest seperation. I had assumed the idea (for the -Ttext=0 ) would be to have the first 0x400000 bytes be the startup.S ? but maybe i'm wrong. the internal linker script does make everything start after 0x400000 , but this means that since the text starts at 0 and the .bcc is 0x400000 in size that the other linked code will just conflict with like the .gnu.build-id stuff . I've noticed that the binutils linker allows overlap in some cases, maybe that was changed since the original design of the xen target? In any case, I would appreciate some help/insight in this. Regards, AL13N (I had asked on IRC, but they referred me to here)