From nobody Sat Nov 23 22:01:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1731443997; cv=none; d=zohomail.com; s=zohoarc; b=SDm/NUlfLbjHWCUAUT1bfEK61/6/39bczX9bg15f6ACpdgMeIMuyShK9gWEUQSlGLOQHLaxWGoH8mwv0QLvAIasVtI8+HtndCqsnIojCSGw36QrGESZg0wqhj6Jvebn+gCi/DZTY0mAh54h8tSXU7yZX0TJQupVvFVT/ee1v+3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731443997; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=i9Tx+e50KlhsYgpRqVjdsO/z4tv3m55Kc+AlE2OCoQs=; b=bMBAw0A36CEiIQPk+yiP36MvJ0oLHcH4dSdNsap7JWE5aOf4gX6ginaUdTEC+AtPeP2gtPdciHaL0Z8Jpaq/9Ksm1inQHrMYXM9YkiBcB/I4gdZD2BUpNjYcjFkPmUZgolpb5D8HP2JzEAKTSqWMhoshIEJ+kLQZsQoh8znA8pM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1731443997458837.1392892728438; Tue, 12 Nov 2024 12:39:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAxec-0001IV-J7; Tue, 12 Nov 2024 15:38:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tAxeY-0001Hc-CG for qemu-devel@nongnu.org; Tue, 12 Nov 2024 15:38:23 -0500 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAxeK-0008Sw-8w for qemu-devel@nongnu.org; Tue, 12 Nov 2024 15:38:21 -0500 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-7ee7e87f6e4so4532978a12.2 for ; Tue, 12 Nov 2024 12:38:04 -0800 (PST) Received: from stoup.. (wsip-24-120-228-34.lv.lv.cox.net. [24.120.228.34]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9f3894192sm9860a91.21.2024.11.12.12.38.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 12:38:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731443883; x=1732048683; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=i9Tx+e50KlhsYgpRqVjdsO/z4tv3m55Kc+AlE2OCoQs=; b=s9KSLqLjSdP9FhTEzjVTREwqrBkjqLZW512iM3/GRgSdLm/FbX8jXzJEUGyUi0v91t KmHWIEmDqbYllapFCKgB/Fp8ckWa3bNpVAHGrT5RI+ZNm+3Uf5c/6f5/CSl2sMsK6jkl ER1KnCnvfAU6q2I7a8bTM3PLymZVRjLIdmmLXgVKgj0wykW1kxDGNMDGePtInQCLG6KW kLEVjUUy+LPcRfa46DWdcEpO0TL3jrr/PTH9VPNfRuS7AafnN57eu5p8DVjGRAiDuQxf MfOlU2wDHEh6Dr13a1sMRgV1Y546Vm8coD1fS/w319mmOSAoCbrrqB40BJNiKes/wFQR zMkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731443883; x=1732048683; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i9Tx+e50KlhsYgpRqVjdsO/z4tv3m55Kc+AlE2OCoQs=; b=nWyIluYh+jUqw04fV8LmaODWKMxeShepSI7vD3shoRqz1bH8OxQBN+aFGttSYbTn6e lMqdE7cnV5fdJijIau4sjCNdETq+1W0y7soPt5azqKoaVFviWRir4T0tQbPvpc/9B1Ak X2GlUEJtXD49IZxdaQrynqlNdseJavpDQlflRtbQDe6+hd0UMn6K33lXM0O8OiO6zoU5 HRrcIP+LX7e8XVWFz51FYATA1Pp8meOa47c433N/PZzGO7JcUuBJM7SIk4hu9hd10A0D 2QppoXLLroWMlgCv0+Hn9iWuwkintmzD2Tkcy3xXU6s9GVZTBuEEu/4MxCuQ3VUfWdxz gYbg== X-Gm-Message-State: AOJu0YyoLq3HuMAmxh5cdT3t4ZzsSi8J5mSIVqAclt804Hj3rzs8zU1C 6YTRG7jFm7ZtMMXnHXcr7Pzo9gXX//PJgPJYssO3yqsBZYHPw4gkgPFlwYbkCkrwId/0LGVFTg/ V X-Google-Smtp-Source: AGHT+IEWesqoAAo3sX2bA7Clerqd327iPQ5JhX8BTOxXQjcvZ3repDP9WJYn/VfAYNn8JGXilqpsdg== X-Received: by 2002:a17:90b:3847:b0:2e2:e159:8f7b with SMTP id 98e67ed59e1d1-2e9b16e6415mr21149876a91.3.1731443883349; Tue, 12 Nov 2024 12:38:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 2/6] linux-user: Drop image_info.alignment Date: Tue, 12 Nov 2024 12:37:53 -0800 Message-ID: <20241112203757.804320-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241112203757.804320-1-richard.henderson@linaro.org> References: <20241112203757.804320-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1731443999387116600 Content-Type: text/plain; charset="utf-8" This field is write-only. Use only the function-local variable within load_elf_image. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/qemu.h | 1 - linux-user/elfload.c | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 895bdd722a..67bc81b149 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -44,7 +44,6 @@ struct image_info { abi_ulong file_string; uint32_t elf_flags; int personality; - abi_ulong alignment; bool exec_stack; =20 /* Generic semihosting knows about these pointers. */ diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 90e79a01b4..ef9cffbe4a 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3220,7 +3220,7 @@ static void load_elf_image(const char *image_name, co= nst ImageSource *src, * amount of memory to handle that. Locate the interpreter, if any. */ loaddr =3D -1, hiaddr =3D 0; - info->alignment =3D 0; + align =3D 0; info->exec_stack =3D EXSTACK_DEFAULT; for (i =3D 0; i < ehdr->e_phnum; ++i) { struct elf_phdr *eppnt =3D phdr + i; @@ -3234,7 +3234,7 @@ static void load_elf_image(const char *image_name, co= nst ImageSource *src, hiaddr =3D a; } ++info->nsegs; - info->alignment |=3D eppnt->p_align; + align |=3D eppnt->p_align; } else if (eppnt->p_type =3D=3D PT_INTERP && pinterp_name) { g_autofree char *interp_name =3D NULL; =20 @@ -3264,8 +3264,7 @@ static void load_elf_image(const char *image_name, co= nst ImageSource *src, =20 load_addr =3D loaddr; =20 - align =3D pow2ceil(info->alignment); - info->alignment =3D align; + align =3D pow2ceil(align); =20 if (pinterp_name !=3D NULL) { if (ehdr->e_type =3D=3D ET_EXEC) { --=20 2.43.0