From nobody Thu Nov 28 15:55:37 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=1691293181; cv=none; d=zohomail.com; s=zohoarc; b=nqoUWhB40Gn4YjKOYUdajSrU0FIw740Qbi3nhBmNzMaaqNnKj8nRsfOht3o2MROwOsgLYxcvMRPZa37ztlS2OPKySft3g5AJBrPz1YQf9uHBvofSBdh/kxaOVs98hboYznGYGqdFFHLzU8pxdFK8lwRoxssuZYPEYn/ps1wy/LU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691293181; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4+a1ntD1nPZIq5/3BuYdNWBqjL6H8GnZs4Nnik5eIQQ=; b=NgYN1NHFPOA8IMJilMr5gJDDOrKPSVxdR/5pAXwSp7a+Hm1c+VOKpUN09dHp0CUgB0UIx+KeoGRQHbFrnOK6K5MZCA/eVLbu6Pu3shA5TFwjflqHyW+mFtROngkqZqw00iPLMKkEETxYEUvU57ZIQl8zmsSw3jTuw+Zqz9qohR0= 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 169129318170821.763594611236385; Sat, 5 Aug 2023 20:39:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSUaG-0003j5-Er; Sat, 05 Aug 2023 23:37:36 -0400 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 1qSUaE-0003hu-SH for qemu-devel@nongnu.org; Sat, 05 Aug 2023 23:37:34 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSUaD-0007aR-Aj for qemu-devel@nongnu.org; Sat, 05 Aug 2023 23:37:34 -0400 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so2445778a12.1 for ; Sat, 05 Aug 2023 20:37:32 -0700 (PDT) Received: from stoup.. ([2602:47:d490:6901:9454:a46f:1c22:a7c6]) by smtp.gmail.com with ESMTPSA id a5-20020a17090a740500b00262e604724dsm6306451pjg.50.2023.08.05.20.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Aug 2023 20:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691293052; x=1691897852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4+a1ntD1nPZIq5/3BuYdNWBqjL6H8GnZs4Nnik5eIQQ=; b=VtfJ3gn6ABglBbG23wqawv3eaDnP34LqhXTaK431QvWp4niDYCuo/Ee8fQSRhChIUy p8+PhimpmvkbpQOUsvGCbDOAR+yMpEOShzJArBm5THNoto1AKpKOkGDpse187DfTZ7e4 epSI1plzAFXXp1TIDAPUvCjK84hDD8Zd0Jh9gx7tRH9vzY23SeM2DdJ3Dybiwmb/YhHW aBvR+FSOXtGxg9h5JkjxnVoa//PhYClcZsTm2Hh632OsObwwoYRv3AnwKXYFmc0u9ArT hA7rkhAS0eZZU/F460t9oCSmJ/xaZ49fyk2v6jSse/ko1kRYJeV51lpmq7PVP0jPq/Vo A/Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691293052; x=1691897852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4+a1ntD1nPZIq5/3BuYdNWBqjL6H8GnZs4Nnik5eIQQ=; b=Jqh/VNsMq8HmVHlkvGOD2CgYdMjy6pEKFSDkVNi6Ab4fG2aw6UKGAgQdYVFwFJrgOc 87BnCVL9/sf5TKRziGXs1Ck2mh1oGVxBlX61CMxISAvv763iRNlEx0pxdp928gLVq/oO pdOOUMO1Lo/14t6+MUhJ6v1mk4w0sXTb4JlEa9xYKHBSTJhJS3T6Bo7juBTJKOp8Efn1 hY0MEtNNcYnlKB4XqASo6U689di/y6XumWkTm+CGhF8fsIS9NCL6toMZBVQQjjPet48l J/RQ5Isaz/LxmqCsowLgHxSxnq20JyOpE0Sm9PNaXWhprfFqjhx0ImXJ7exTb9ri5+9T ZEfw== X-Gm-Message-State: AOJu0YzE9M/W4M7pRhiyM8NL0aVHS9Pxc9fukohxRXRSRhFra50GJ8cm 92nV2PjL7QCrQKAT/SiiQkP0IwuKcGCuBGzCKM4= X-Google-Smtp-Source: AGHT+IHOOwKlKVJZVGJOTFvyBYxO/JI901TtyStPf61DBnITZSDSQ+st6Jlksuy3VrQqNHiM6xuPIw== X-Received: by 2002:a17:90a:8043:b0:269:46d7:f1db with SMTP id e3-20020a17090a804300b0026946d7f1dbmr1912631pjw.32.1691293052017; Sat, 05 Aug 2023 20:37:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller , Akihiko Odaki Subject: [PULL 19/24] linux-user: Properly set image_info.brk in flatload Date: Sat, 5 Aug 2023 20:37:10 -0700 Message-Id: <20230806033715.244648-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230806033715.244648-1-richard.henderson@linaro.org> References: <20230806033715.244648-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::534; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x534.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: 1691293182615100003 Content-Type: text/plain; charset="utf-8" The heap starts at "brk" not "start_brk". With this fixed, image_info.start_brk is unused and may be removed. Tested-by: Helge Deller Reviewed-by: Helge Deller Reviewed-by: Akihiko Odaki Signed-off-by: Richard Henderson --- linux-user/qemu.h | 1 - linux-user/flatload.c | 2 +- linux-user/main.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 4b0c9da0dc..4f8b55e2fb 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -29,7 +29,6 @@ struct image_info { abi_ulong end_code; abi_ulong start_data; abi_ulong end_data; - abi_ulong start_brk; abi_ulong brk; abi_ulong start_mmap; abi_ulong start_stack; diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 5efec2630e..8f5e9f489b 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -811,7 +811,7 @@ int load_flt_binary(struct linux_binprm *bprm, struct i= mage_info *info) info->end_code =3D libinfo[0].start_code + libinfo[0].text_len; info->start_data =3D libinfo[0].start_data; info->end_data =3D libinfo[0].end_data; - info->start_brk =3D libinfo[0].start_brk; + info->brk =3D libinfo[0].start_brk; info->start_stack =3D sp; info->stack_limit =3D libinfo[0].start_brk; info->entry =3D start_addr; diff --git a/linux-user/main.c b/linux-user/main.c index cb5e80612b..96be354897 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -963,8 +963,6 @@ int main(int argc, char **argv, char **envp) fprintf(f, "page layout changed following binary load\n"); page_dump(f); =20 - fprintf(f, "start_brk 0x" TARGET_ABI_FMT_lx "\n", - info->start_brk); fprintf(f, "end_code 0x" TARGET_ABI_FMT_lx "\n", info->end_code); fprintf(f, "start_code 0x" TARGET_ABI_FMT_lx "\n", --=20 2.34.1