From nobody Sat Nov 15 08:35:00 2025 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=1753835080; cv=none; d=zohomail.com; s=zohoarc; b=N6LB53doqSENxl9p+1YLV0KtvgHf81cB9uIHPGdUzBSRBaH1A7dPZ7PBLKW9/sPUlroNAXYXKQupq2g3YZPQvLtkjFR8hDsyZC1/kaCMNpxEqa8xf6hjzfGdJnnHDODToAhBJlxiTT08x4mnI02mGtRQersbDEqTJpn97YsmNB4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753835080; 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=GrjBl0Kcx4MIhJLsQeiAbiQaN6olXKLDYOGwMaev97Q=; b=Im/5SCtMWH4S59Ym3Vd9czcMlaX/iQxJcuIYor0oCLkzw7bpRsY9tdMaOPXiVpKrm7mr3ckT+7oOQBrGivgE2T9E7eWUfYgzML7qSpI1hq18oZa/trbnPUaHi8hsrUbI8XOyY/SNIcypKpi9xz4NrYp1MTdx8/KOSJtNLJDRmrM= 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 1753835080615298.3404929891277; Tue, 29 Jul 2025 17:24:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugucO-0006u6-8T; Tue, 29 Jul 2025 20:24:29 -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 1uguIn-0004Pu-92 for qemu-devel@nongnu.org; Tue, 29 Jul 2025 20:04:13 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uguIl-0004ac-EN for qemu-devel@nongnu.org; Tue, 29 Jul 2025 20:04:13 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-748d982e97cso5675030b3a.1 for ; Tue, 29 Jul 2025 17:04:11 -0700 (PDT) Received: from localhost.localdomain (syn-098-150-199-049.res.spectrum.com. [98.150.199.49]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7640ad06762sm9101302b3a.80.2025.07.29.17.04.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jul 2025 17:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1753833850; x=1754438650; 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=GrjBl0Kcx4MIhJLsQeiAbiQaN6olXKLDYOGwMaev97Q=; b=VSaWPOip9q9zbTzFHS+prcyZWuuIrt1PS7x0YzKbpjHFpxnq63Wl7iAF6VgLUBWPRm l7jLsDQ6MSnnBV96Aoox7pdhZNyHao+72fCVKg9k4Hi5CNNZWsVEN8o0DNHZMYDaNVtl nSbRTLmo2iIB7BGobgxuegfqH/1/8GR+TrF+TL+ax5C3UOykL2r82axPGLdNOPBIvGsV RiNCtGmGJThAdPMuldkomFpeELmSPcaRI3EgqO4QzG4iWOj07JpqfxtOJZb+0pYBtBud jQvFZLw0T8jb4jRe4QnM7p5wX26NgE3HNoMPXb6hqgKUrXdkyVRhl3j3MIQm7+JbOWG8 JupQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753833850; x=1754438650; 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=GrjBl0Kcx4MIhJLsQeiAbiQaN6olXKLDYOGwMaev97Q=; b=S5QpIS38PTWwFuKZO8f1AbMRAhBn6calJpsr4V0QEAN3V1ybhxnihA0koRn2uSdcV1 qsS/tDbLMtaCwYOGphttqGO3aTVEEzDUWCbqa44p3SQzdchMQjrj7bl+TkADtat+Vz/O 04oYaiiZwzfCDm1FMyZ0vvQEaNMEifdUUd9o7xE1Wukg90Evs70UV0fWLbtBnmWcueWN 5w9pZwvWu37Jbv7t538OHbuGwZTTz8WqqSWSqg62J7kb9yARGg19mgfSDkTg0nikaxMc qYqWE48HBeGDwrw/s4AkyrSTWMICH45RlHnHWHygFZglU2BkNv9BzyPeZigBWsbwTiT5 pT6A== X-Gm-Message-State: AOJu0YyHaOb35HSZHzpIF7kFMKHc3Qm9+rpwvTQFKOB+tvhs9WJiIZcH zMDig1Voz83X64qZK75KNmi+hE2IpQCc9UvEjovwftOZde+neDmZlyPUp4A42FhFHMkG3X/FW0k 7WQEK X-Gm-Gg: ASbGncublKFPYeHylr8S1gRtRNqidwnKWwymuP5p/zScOjiF0iwa2tCwDUlFgxz+eLP hWYumeG7O1vyWCu68qOooapfmdt7P2d47hNR53cXgFcdx2JawYJT+dcapewg8c4a+G4XDLxxOVY 6/3UM5QY9dn3Xzl1mL8jw+j4+cJURZAlDGRdtwXHJZfAzbxVLpzTGvQqYD8IqXvI2/3k/JS7VV3 nRJT1W3d+UORcGf8Sx37N4fo1mrLz5G2ZOFddEZW69eXB30ORvTBaLiiXXmlbisVdMQS3oKLW9G 3z2uSpKeyz4PwpPM1wc5o64E4kWQto3gKL05VYUUQHp8EXGOwWK6MEWEjfqtIGzMlP7SKdsC5t2 IHIglO5ZASaEvJNjKc8+cJamGQUQbIhHJBzWT7Tfm2PivYHfcU/VuwGfvc+pBsNIq4OFWp5MK/P xeFxeZZTxLhg== X-Google-Smtp-Source: AGHT+IGTzCDc2Q6uIuQGOJGTn62AAckmemzic/y+krAOlJEUPKO3maO9TQZr4jzc+/+uYEAYblFt0w== X-Received: by 2002:a05:6a00:21d5:b0:76a:6b76:3aa4 with SMTP id d2e1a72fcca58-76ab333a5a4mr2260873b3a.24.1753833849979; Tue, 29 Jul 2025 17:04:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 43/89] linux-user/arm: Split out target_coredump.c.inc Date: Tue, 29 Jul 2025 13:59:16 -1000 Message-ID: <20250730000003.599084-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250730000003.599084-1-richard.henderson@linaro.org> References: <20250730000003.599084-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::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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: 1753835081123116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- linux-user/elfload.c | 27 +-------------------------- linux-user/arm/target_coredump.c.inc | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 linux-user/arm/target_coredump.c.inc diff --git a/linux-user/elfload.c b/linux-user/elfload.c index b315a5a243..b35f35b2a6 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -229,32 +229,7 @@ static bool init_guest_commpage(void) #define ELF_CLASS ELFCLASS32 #define EXSTACK_DEFAULT true =20 -#define ELF_NREG 18 -typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG]; - -static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUARMSta= te *env) -{ - (*regs)[0] =3D tswapreg(env->regs[0]); - (*regs)[1] =3D tswapreg(env->regs[1]); - (*regs)[2] =3D tswapreg(env->regs[2]); - (*regs)[3] =3D tswapreg(env->regs[3]); - (*regs)[4] =3D tswapreg(env->regs[4]); - (*regs)[5] =3D tswapreg(env->regs[5]); - (*regs)[6] =3D tswapreg(env->regs[6]); - (*regs)[7] =3D tswapreg(env->regs[7]); - (*regs)[8] =3D tswapreg(env->regs[8]); - (*regs)[9] =3D tswapreg(env->regs[9]); - (*regs)[10] =3D tswapreg(env->regs[10]); - (*regs)[11] =3D tswapreg(env->regs[11]); - (*regs)[12] =3D tswapreg(env->regs[12]); - (*regs)[13] =3D tswapreg(env->regs[13]); - (*regs)[14] =3D tswapreg(env->regs[14]); - (*regs)[15] =3D tswapreg(env->regs[15]); - - (*regs)[16] =3D tswapreg(cpsr_read((CPUARMState *)env)); - (*regs)[17] =3D tswapreg(env->regs[0]); /* XXX */ -} - +#include "target_coredump.c.inc" #define USE_ELF_CORE_DUMP #define ELF_EXEC_PAGESIZE 4096 =20 diff --git a/linux-user/arm/target_coredump.c.inc b/linux-user/arm/target_c= oredump.c.inc new file mode 100644 index 0000000000..e3cb51b145 --- /dev/null +++ b/linux-user/arm/target_coredump.c.inc @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#define ELF_NREG 18 +typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG]; + +static void elf_core_copy_regs(target_elf_gregset_t *regs, + const CPUARMState *env) +{ + (*regs)[0] =3D tswapreg(env->regs[0]); + (*regs)[1] =3D tswapreg(env->regs[1]); + (*regs)[2] =3D tswapreg(env->regs[2]); + (*regs)[3] =3D tswapreg(env->regs[3]); + (*regs)[4] =3D tswapreg(env->regs[4]); + (*regs)[5] =3D tswapreg(env->regs[5]); + (*regs)[6] =3D tswapreg(env->regs[6]); + (*regs)[7] =3D tswapreg(env->regs[7]); + (*regs)[8] =3D tswapreg(env->regs[8]); + (*regs)[9] =3D tswapreg(env->regs[9]); + (*regs)[10] =3D tswapreg(env->regs[10]); + (*regs)[11] =3D tswapreg(env->regs[11]); + (*regs)[12] =3D tswapreg(env->regs[12]); + (*regs)[13] =3D tswapreg(env->regs[13]); + (*regs)[14] =3D tswapreg(env->regs[14]); + (*regs)[15] =3D tswapreg(env->regs[15]); + + (*regs)[16] =3D tswapreg(cpsr_read((CPUARMState *)env)); + (*regs)[17] =3D tswapreg(env->regs[0]); /* XXX */ +} --=20 2.43.0