Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jcASV-0003L4-S1 for mharc-grub-devel@gnu.org; Fri, 22 May 2020 12:23:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcAST-0003Da-K4 for grub-devel@gnu.org; Fri, 22 May 2020 12:23:41 -0400 Received: from hermes.monkeyircd.org ([52.18.162.189]:55048) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcASR-0007bg-8L for grub-devel@gnu.org; Fri, 22 May 2020 12:23:40 -0400 Received: from zoidberg.local.monkeyircd.org (unknown [82.69.123.44]) by hermes.monkeyircd.org (Postfix) with ESMTPSA id BBFE94451B for ; Fri, 22 May 2020 16:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=monkeyircd.org; s=default; t=1590164615; bh=40X+OGDDUXDKewe6D1D4gD09OwSmN2OTvL2zaeclzVk=; h=Message-ID:Subject:From:To:Date:Content-Type:MIME-Version: Content-Transfer-Encoding; b=RQP0eaflHbDelWQTFF1OP+a4ubzxRWzbwPY64J7RUGcHpJ17ZgPah0cY4zQ2PVCe8 qSuDjKDGYhdcKiUWAU2FnM0ttP9UXzsqZ28FoYXsk0VxF5/ZXlCTuDthu8uIVoE5H1 CWGCvcn5/qT2JoN3f5e8qZtDXjM/os2DfVSfswRI= Message-ID: Subject: Multiboot2 on aarch64: Alignment of ELF Headers From: Chris Plant To: The development of GNU GRUB Date: Fri, 22 May 2020 17:23:35 +0100 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=52.18.162.189; envelope-from=chris@monkeyircd.org; helo=hermes.monkeyircd.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/22 12:23:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: Fri, 22 May 2020 16:23:42 -0000 Hi, I'm continuing to work on Multiboot2 support on aarch64, and I'm looking at the alignment of the ELF headers which are passed through MB2. The alignment of the MB2 header's isn't the problem, the problem is in the ELF headers which are linked through. Some of the 8 byte wide fields (specifically addr and size) in the ELF headers are not aligned on 8 byte boundaries, and instead can aligned on 4-byte boundaries. My question is, is it preferable to state that it is possible that the headers may be aligned on 4 byte boundaries (and manage that through reading two 4-byte chunks), or to change grub code to ensure that the ELF headers are aligned on 8 byte boundaries and state that 8 byte alignment is always the case? I think logically that it should be 8 byte aligned so that's my preference, but I thought I'd ask. Thanks, Chris