From patchwork Wed Mar 22 14:29:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 665894 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp183224wrt; Wed, 22 Mar 2023 07:29:21 -0700 (PDT) X-Google-Smtp-Source: AK7set+9FV3v73pvMRnj3Mg3pR990nCfIi6cVs0YysTGHf5qS4OwAqaLHDxLEtc/2BR0A6tmILjz X-Received: by 2002:a05:6214:1bcb:b0:5cd:8bee:cf with SMTP id m11-20020a0562141bcb00b005cd8bee00cfmr6314294qvc.20.1679495361572; Wed, 22 Mar 2023 07:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679495361; cv=none; d=google.com; s=arc-20160816; b=r5jHIHzfWltvZMWQ5RgEmGMFlQu+/dBwy+/TXRAMfVj653LR7NE72klzu8QfpTIPRc lLcLZV108IX75TZ1X9OSJZXd6zIOl7iX/iW0B2LjB0q6M/3379aG4O7h9kX6efbJXkje hFoaDeY5h0vWxyTPSLM0cHy45TOW5jN0FLc5AKDVgcAnBT+j2X6cywrjn2ymVcGcCZB+ Xf1giyx1X0Cx5fhO02MwxBOMd6bzbY3ba9NPyGxplzYDC/524TlX22SFJkWJRv9/sC4t YdfhGphwV9cWntWbQT30HqyIp0ZXN1xx08UAtwJB1DZa/l+G4zJY1bjNUrMLl2TcjJPk QpaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pLFkci5O5POjG1PMHDhT+XDLlH/l0geR+447mWScQDk=; b=cHktVOhqwE1cYiO/A6DQnCNLbWKLDWljSUGwNTYXle94udowocgWUDwrhS+4irwqBt ow+67j4M21ZIny6PoP8KvIPD4DatjtGEHYo3skEqpcTm3zlunqZVFXREXfjBAVoHGIAQ 4HjxTWn2cF3uQrVati70yjwYPsi8bHpUj76IQiX/I/M4YQacwnrIjLwkUR/oEwUrmZj7 6nYRfnKknrBZ1rNenrqluQejrNEtgpiZz6rsIpyol4hMiGWFzsVW6XClxoTI0s7AEPB8 /tY6DdPmTV0Uje6KnWZFKauIa4gu/PJnOn3VoZRdZdnsd6h42+N6cIOnA2BkUu7/nu0W MyCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=alSKek3L; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u9-20020a0562141c0900b005cf2cd1d2d1si6105512qvc.384.2023.03.22.07.29.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Mar 2023 07:29:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=alSKek3L; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pezSk-0003v2-N9; Wed, 22 Mar 2023 10:29:14 -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 1pezSi-0003u4-Ps for qemu-devel@nongnu.org; Wed, 22 Mar 2023 10:29:12 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pezSh-0001yc-7V for qemu-devel@nongnu.org; Wed, 22 Mar 2023 10:29:12 -0400 Received: by mail-wm1-x332.google.com with SMTP id o32so5282731wms.1 for ; Wed, 22 Mar 2023 07:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679495349; 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=pLFkci5O5POjG1PMHDhT+XDLlH/l0geR+447mWScQDk=; b=alSKek3LPWOHgay97/CzlKC9spc9UixiqfVKFDxE9Ka6LmHCazYLWjy0u2WArnjy4A snSEs9KGeo5jYiNnu/bvA1gt/PIeFeKSRC8g80SYgv6jz8AM1+VgBkApwrLJxTHP1EDc D/ohryWMFhmMrh8AroCKLY1A00qVDc6q8UxUYvzJmCddnUZRbekBC4FpdVWIHBuB6k4k Z4+OR0Ea7yMgHHpTsB38k5zumExdMqV7+xRHocWR/8Qz+htUIjQ6V8gqzSRlDziE0R6b encIMQl3NUN+RlqG+eOGco1r3cwmzDYn2Cmsu5XXoH6tyAkRbeOv8lhStQDaL8Iuxifg PHoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679495349; 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=pLFkci5O5POjG1PMHDhT+XDLlH/l0geR+447mWScQDk=; b=uNMNJ6pGoCLIJAq9RMO5EkSL4dccIicvJf/oRePK4RtPlUIz1/kJrG2XCZY9R/O0Nv 6gE/wdaYHtnV83LJCXjFfkdLibkURcnL6YW52bxk1Hh25L7P/tELgjU2O4zAUfVl5hhj vq9IM1GAyYQWpbUmtniy8zYh96q9/Hqz02F0NlEjFm31V4xH23Lxrf1pjx7uSTp6Nx/E QHbOIMK1orSyveP1joqWY9IUx/CPgbLaNnwgM9yFjlnoT/4Af1wcRisjzUrBdAfQB4pi Agu/dVmI3jxqtdo3JXatjfcg4IuAV3PUDRrN2z9P5ssOYdrJj/dK2hAM5FBWXNcILePc 1jZw== X-Gm-Message-State: AO0yUKUttgQ6uVkfAQeumRgzH4t+vp8TwzBFMYxTmWm+HUFSbdGyGO3V wC0ybjiTpWvqRCx4L7dte/WkBKKdkUHnnBxIq8oXew== X-Received: by 2002:a1c:c901:0:b0:3e2:201a:5bcc with SMTP id f1-20020a1cc901000000b003e2201a5bccmr5565990wmb.33.1679495349629; Wed, 22 Mar 2023 07:29:09 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t20-20020a1c7714000000b003ee10fb56ebsm7663702wmi.9.2023.03.22.07.29.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Mar 2023 07:29:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: Peter Maydell , Fabiano Rosas , Claudio Fontana , qemu-arm@nongnu.org, =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 1/2] target/arm/gdbstub: Restrict aarch64_gdb_get_pauth_reg() to CONFIG_TCG Date: Wed, 22 Mar 2023 15:29:01 +0100 Message-Id: <20230322142902.69511-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230322142902.69511-1-philmd@linaro.org> References: <20230322142902.69511-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org aarch64_gdb_get_pauth_reg() -- although disabled since commit 5787d17a42 ("target/arm: Don't advertise aarch64-pauth.xml to gdb") is still compiled in. It calls pauth_ptr_mask() which is located in target/arm/tcg/pauth_helper.c, a TCG specific helper. Restrict aarch64_gdb_get_pauth_reg() to TCG to avoid a linking error when TCG is not enabled: Undefined symbols for architecture arm64: "_pauth_ptr_mask", referenced from: _aarch64_gdb_get_pauth_reg in target_arm_gdbstub64.c.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: e995d5cce4 ("target/arm: Implement gdbstub pauth extension") Signed-off-by: Philippe Mathieu-Daudé --- target/arm/gdbstub.c | 3 ++- target/arm/gdbstub64.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 3bd86cee97..655369dc74 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/gdbstub.h" #include "gdbstub/helpers.h" +#include "sysemu/tcg.h" #include "internals.h" #include "cpregs.h" @@ -526,7 +527,7 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) * crash if they see this XML from QEMU; disable it for the 8.0 * release, pending a better solution. */ - if (isar_feature_aa64_pauth(&cpu->isar)) { + if (isar_feature_aa64_pauth(&cpu->isar) && tcg_enabled()) { gdb_register_coprocessor(cs, aarch64_gdb_get_pauth_reg, aarch64_gdb_set_pauth_reg, 4, "aarch64-pauth.xml", 0); diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index ec1e07f139..3bb0923cbf 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -210,6 +210,8 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg) return 0; } +#ifdef CONFIG_TCG + int aarch64_gdb_get_pauth_reg(CPUARMState *env, GByteArray *buf, int reg) { switch (reg) { @@ -244,6 +246,8 @@ int aarch64_gdb_set_pauth_reg(CPUARMState *env, uint8_t *buf, int reg) return 0; } +#endif + static void output_vector_union_type(GString *s, int reg_width, const char *name) { From patchwork Wed Mar 22 14:29:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 665896 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp183438wrt; Wed, 22 Mar 2023 07:29:49 -0700 (PDT) X-Google-Smtp-Source: AK7set8e/tA31G0vJ7k02/IPTMJswOZtn6WjJDrhNIH5sH3RBba/9HsXfZ2Buwwz7aJw2ZYWyQLo X-Received: by 2002:a05:622a:1042:b0:3bf:c86b:3d2f with SMTP id f2-20020a05622a104200b003bfc86b3d2fmr6323256qte.51.1679495389669; Wed, 22 Mar 2023 07:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679495389; cv=none; d=google.com; s=arc-20160816; b=aw9SfVhytfwOR1pITwVun4fT4jdhZV/uyMr57rdWvnrIY5GotsbZM++KAR0bdwjcv2 8uETSkofytaXhlm7bbGGjwzJTsCnklUQ4r4qG6Bq/287v+azkyRDD1uttMGK2zF2hVxF v57Sr0ZQEdGar5xvpeo6Cp6IE2tQJB6KzqcFf0PWKxX8di9/lPW88C6prvLwRsme5wv4 mqvYJjjzw5kHBtCsbtj2uebLAPfpY5EplPDICI/lvoixP89LjqZ+XW/xwX/+QPB7vvjd AF0BUOBPsW8+NkrLW3VZuAqRUTkPbajxrjz7hAI2R8Wr8xrHUJ16irttyrRQstH+VruJ oVcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZgolkMT8PMDnGL6LNTapds6VAVWk4DJsX2jjIB/I6WQ=; b=H5vL1kv0wFFXq4DYLd8daipdX46ffFCP81WEMcdgoqPO71GwSoiB7KOrFa8QXqs7gB Hal5aZbahwmqzIEw6JxIvBJTaNIOMk9VFaEHV+/7t0gX5FKHyMs8/FRnXNnyM97aYDV1 4CHezo89mg1GcV1l56lpZnLsF4AEgWpWUI70kxw6TnPx6OVPE9sLMlqqe23g7kOROXty KGCKILxLzEbl6WWwKmuKez0z+C6O/b11KB2fC5+xScmqnHi39naZ8rv6tDJsQ5F/srlf YR8mO0ayXha+UpWnOjBO1VOFNHgZZ5swRNRhpXouT8ONR7JhfDZ2dssHMsELpI6wvLS9 kHeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LP2p3qVf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z70-20020a376549000000b0074695ed789esi4353548qkb.589.2023.03.22.07.29.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Mar 2023 07:29:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LP2p3qVf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pezSp-0003yB-Cq; Wed, 22 Mar 2023 10:29:19 -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 1pezSn-0003wc-Tf for qemu-devel@nongnu.org; Wed, 22 Mar 2023 10:29:17 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pezSm-00020A-4p for qemu-devel@nongnu.org; Wed, 22 Mar 2023 10:29:17 -0400 Received: by mail-wm1-x333.google.com with SMTP id m35so11670597wms.4 for ; Wed, 22 Mar 2023 07:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679495354; 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=ZgolkMT8PMDnGL6LNTapds6VAVWk4DJsX2jjIB/I6WQ=; b=LP2p3qVfMxVxXcZIq+YLF5GKgjZAUvfQyvARZOAVyhjsi5tPB4A+DRnxBT0+qEgDds /AJ470NbnOrs2wnTkRIoEtuE68VWkK0hpVU1/zzmsP0HZrNTVqLMQAUCqf52vKeWtrje IKfQC9yhLeKdog0/ztD4YDQa17Vk3gN+ECaDUEWPeMLCxLNLsCSg9nFLVYwN0mDD6L8Q gMDGzQgo0SNpm/3VEscyXsrpXQCVirxP9LsJQvg20VR/KhRFk8yHl385l3kTdbYk2srS Im2O9yGKTp/b3R2M3SEr2oVSYleGlrvsCJrU3AG0HpzSOmOW4xwIjcSPuRlvf3l4PwgD IbIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679495354; 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=ZgolkMT8PMDnGL6LNTapds6VAVWk4DJsX2jjIB/I6WQ=; b=AvVYoN2yxmpmvIpW/0YPOp++3ZVZcBkzl7JoC2zt4isKBY0zfKmKhzJ5sjsFDR8A3g 24jyX4gsTLJyXAeLRnNcPU0BvK9HMxsd79pZWZVyHWbgx09iVqr4TLHKD394weqfNkmO UjEXgCClMeYp1E60Zak5RjSKziFQpysarnkUdSshgciedU6gH0Yw24/BiniTPhpRbAZA gKkbEnPqpIZlkUesH27y3wJVbHzaVlyTPjKx4ONeSasqUevsRfX3LXiVuGc42atcl25G kOvIUIjdbi2wG/4cHqR3GqiBa3xzkkT3sEC+cs/axZ0LjzUtdZjqP18PgppzAhH34Fem aOag== X-Gm-Message-State: AO0yUKV2JqzkUub5tHGJuXrFDYVHepqCjPF+cVf9c7K2t+rZsqxD11QX vISGwQ1yrBaNl+M6TBVioTHSHvAMaHaIUCfY/Y9KSQ== X-Received: by 2002:a05:600c:cc5:b0:3ed:2346:44bd with SMTP id fk5-20020a05600c0cc500b003ed234644bdmr1893510wmb.19.1679495354633; Wed, 22 Mar 2023 07:29:14 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p13-20020a7bcc8d000000b003ee1acdb036sm6775207wma.17.2023.03.22.07.29.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Mar 2023 07:29:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Richard Henderson Cc: Peter Maydell , Fabiano Rosas , Claudio Fontana , qemu-arm@nongnu.org, =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 2/2] target/arm/gdbstub: Only advertise M-profile features if TCG available Date: Wed, 22 Mar 2023 15:29:02 +0100 Message-Id: <20230322142902.69511-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230322142902.69511-1-philmd@linaro.org> References: <20230322142902.69511-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Cortex-M profile is only emulable from TCG accelerator. Restrict the GDBstub features to its availability in order to avoid a link error when TCG is not enabled: Undefined symbols for architecture arm64: "_arm_v7m_get_sp_ptr", referenced from: _m_sysreg_get in target_arm_gdbstub.c.o "_arm_v7m_mrs_control", referenced from: _arm_gdb_get_m_systemreg in target_arm_gdbstub.c.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 7d8b28b8b5 ("target/arm: Implement gdbstub m-profile systemreg and secext") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- target/arm/gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 655369dc74..2986ed6fc8 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -554,7 +554,7 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) 2, "arm-vfp-sysregs.xml", 0); } } - if (cpu_isar_feature(aa32_mve, cpu)) { + if (cpu_isar_feature(aa32_mve, cpu) && tcg_enabled()) { gdb_register_coprocessor(cs, mve_gdb_get_reg, mve_gdb_set_reg, 1, "arm-m-profile-mve.xml", 0); } @@ -562,7 +562,7 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) arm_gen_dynamic_sysreg_xml(cs, cs->gdb_num_regs), "system-registers.xml", 0); - if (arm_feature(env, ARM_FEATURE_M)) { + if (arm_feature(env, ARM_FEATURE_M) && tcg_enabled()) { gdb_register_coprocessor(cs, arm_gdb_get_m_systemreg, arm_gdb_set_m_systemreg, arm_gen_dynamic_m_systemreg_xml(cs, cs->gdb_num_regs),