From nobody Sat Nov 15 09:08:47 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1754176680600848.20109906645; Sat, 2 Aug 2025 16:18:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uiLPC-0005mo-4H; Sat, 02 Aug 2025 19:12:46 -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 1uiLP1-00050f-OD for qemu-devel@nongnu.org; Sat, 02 Aug 2025 19:12:35 -0400 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uiLOz-0001uF-LI for qemu-devel@nongnu.org; Sat, 02 Aug 2025 19:12:35 -0400 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-61585dfc8f8so1028124eaf.0 for ; Sat, 02 Aug 2025 16:12:33 -0700 (PDT) Received: from stoup.. ([172.58.111.133]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-61970693ed9sm1084454eaf.20.2025.08.02.16.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Aug 2025 16:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1754176352; x=1754781152; darn=nongnu.org; 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=bKhldYKs1QSuxD/L/nGAckx4xf1pBRHHNxpQtiRND84=; b=uuL3Z8pw6vIcWTxllj1NADBH2cPgLVFgqJSykp1G/2YUs2wYOV51B7pua1mrypYiYW vo9oyWqKb0h9V4QcaRppP2M7Ku9Dn56tGLmDzf3BC/94yO6pYlKHFvv49YaPCCmsdkLv W3XEhtrmNc9Ynh0alRCqF7XjWWo3kYs/PJWl7bFNIXe5kCjFt76DqO1hjgpPOXAjoNHv 9r7jEZQdW7qJzU8zF/YtvhUKExvx69ga2cggf6oU4BGh78yHkrWra1sFA8larJZHQ+Cu S8OufyNxufpS3omaXNsF8rPOH/nkrylCMTNkGiEthmLf3IGr5GfsjA6kQdJXVKghXN0D Rl4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754176352; x=1754781152; 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=bKhldYKs1QSuxD/L/nGAckx4xf1pBRHHNxpQtiRND84=; b=PdBfPQEta/6EQqYM1tl5yRfIlig+FSDQjDihmnw1nLjSiE/o3+CGdYfpJYK75yNAL+ nBorfjGlMu2OD6W1b09RJSAcWW4P7eS+trL0uFTVOa+NPZNUEVn3SErJCglRv0yRBaHC b2h+NpnYgZP2oZeaoKXwLpwZYGWyFlK+Bwk4Bpkj1xAMmHhNqXgu2W7WbFS17XDJDMoG r7cedCAmb2J/KUpHWmXR4SMCVOXstq2NGQyTzyQKV/4KsinbobzWCdLyapQYuyAAWb57 PHHmGWGh1KIKPQ4QNtJ2swL1pOcQppB9iuRdoHINmGiQoKnsjGxjRTlZgj6yCu8SXye0 nzTg== X-Gm-Message-State: AOJu0Yw8S63eQO/SNA5W8S40pC8J9jYwqdhYUQqtL27npoVCX3Ab3ZYQ 0eta+48AxW3IXNy8UIQ6NbGku4I5znhFOtfeCAy6RpzKDDvBbU5/htwtNSIxAHCgAhyTiUQblpv ix5kM5hg= X-Gm-Gg: ASbGncvEORWRNJJEYhV4N+Fi2WpTce3+/5mt2p/qFp51t9+enc5RQxAs3Rwg63nz/Eb 1p+Yt1wlDM/sL8zcFX2+VO+7k9p+ASqCGWyaMw3w4YPXr1/IVkkoTPeNfUls99dJOItlB3OQSAi 7SJTL5QEGjG6jeXc380g0ffIR6qe5FuQ8XLRV1XseLYkP3VbnvCQSZrya8HeqnBQSMWoFWw0Vs3 MMwKfBrXqgVNwKWLLcDFdK6PDaksPWXsjB3W8UXvveEqDeDnukFIMUDQyXw9oW6hLCXSkjS0Y9w KmKMy164Xqvs86z1aqDuGW58E+mEqvItfvcF8T+/0JsoLGrtxY4qd5TWCW/cu8OxKzoo+s1IgN/ QC21C2CCfyPlsc5K3yTfV1b7NnDivBSuWSoGqf57Kg2+5Oh2SwVW9 X-Google-Smtp-Source: AGHT+IGaiPwR84YarFsF8mTRwWpak7D12KdyeVtvDD/5RqSqRy0fcZhBLvuBV6EV4p0tsnnhjSJimA== X-Received: by 2002:a05:6820:1e10:b0:619:a8f7:dfa6 with SMTP id 006d021491bc7-619a8f7e0b7mr82595eaf.0.1754176352489; Sat, 02 Aug 2025 16:12:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PATCH v2 74/95] linux-user: Move elf parameters to {mips, mips64}/target_elf.h Date: Sun, 3 Aug 2025 09:04:38 +1000 Message-ID: <20250802230459.412251-75-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250802230459.412251-1-richard.henderson@linaro.org> References: <20250802230459.412251-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::c2c; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc2c.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: fail (Header signature does not verify) X-ZM-MESSAGEID: 1754176682637116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/mips/target_elf.h | 4 ++++ linux-user/mips64/target_elf.h | 10 ++++++++++ linux-user/elfload.c | 18 ------------------ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index a36ca5a83f..0433de4529 100644 --- a/linux-user/mips/target_elf.h +++ b/linux-user/mips/target_elf.h @@ -8,6 +8,10 @@ #ifndef MIPS_TARGET_ELF_H #define MIPS_TARGET_ELF_H =20 +#define ELF_CLASS ELFCLASS32 +#define ELF_ARCH EM_MIPS +#define EXSTACK_DEFAULT true + #define HAVE_ELF_HWCAP 1 #define HAVE_ELF_BASE_PLATFORM 1 =20 diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index ebfd62348f..60ecb4d0ae 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -8,6 +8,16 @@ #ifndef MIPS64_TARGET_ELF_H #define MIPS64_TARGET_ELF_H =20 +#define ELF_CLASS ELFCLASS64 +#define ELF_ARCH EM_MIPS +#define EXSTACK_DEFAULT true + +#ifdef TARGET_ABI_MIPSN32 +#define elf_check_abi(x) ((x) & EF_MIPS_ABI2) +#else +#define elf_check_abi(x) (!((x) & EF_MIPS_ABI2)) +#endif + #define HAVE_ELF_HWCAP 1 #define HAVE_ELF_BASE_PLATFORM 1 =20 diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 6b0d73a6f7..4173a8d619 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -130,24 +130,6 @@ typedef abi_uint target_gid_t; #endif typedef abi_int target_pid_t; =20 -#ifdef TARGET_MIPS - -#ifdef TARGET_MIPS64 -#define ELF_CLASS ELFCLASS64 -#else -#define ELF_CLASS ELFCLASS32 -#endif -#define ELF_ARCH EM_MIPS -#define EXSTACK_DEFAULT true - -#ifdef TARGET_ABI_MIPSN32 -#define elf_check_abi(x) ((x) & EF_MIPS_ABI2) -#else -#define elf_check_abi(x) (!((x) & EF_MIPS_ABI2)) -#endif - -#endif /* TARGET_MIPS */ - #ifdef TARGET_MICROBLAZE =20 #define elf_check_arch(x) ( (x) =3D=3D EM_MICROBLAZE || (x) =3D=3D EM_MICR= OBLAZE_OLD) --=20 2.43.0