From patchwork Fri Jan 3 23:17:32 2025 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: 854878 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp8479123wrq; Fri, 3 Jan 2025 15:18:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXbX5/q+AqCeBtj0NxSAEZGDN7d2Q/hS15UaZsR9wGyF8kvOedfiQBs023U+JaM5x8XqVAnzg==@linaro.org X-Google-Smtp-Source: AGHT+IFLj+jwfWslyX86Qw1lTt5TUxeFvhdzNBjNfMb+NQpq9gFO2PblPlqR/qFv75Z1BeITrrvA X-Received: by 2002:a05:6214:761:b0:6d4:3437:d858 with SMTP id 6a1803df08f44-6dd233574eamr1022774906d6.25.1735946328584; Fri, 03 Jan 2025 15:18:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735946328; cv=none; d=google.com; s=arc-20240605; b=AuFPzivnpUIToKKcFaUK/t3yZ4rocfJIiqPC/r4fXTSu/eD/TIWlgzKwWPns7tNMPM LD7eSwXp4vwtrbW9miZlvugC3pzUgL1qE763cCaxieCCvzq0lPmyRSUZaRq44ep3w1eW tD4WKbSIDo1w8xmJSbPcKabV2aNs5Mwt5Y0vx90iM2pzCe4rwrEhxtMtB7vTHabofAtp dwr92KHw6HrgvbzqRiImIfBQIviHJJz7ruBVZtPYuBDY4DEnK7esU+e3Z9lJIAxjz6OC V7aYzLN4FJ1CufXaIiMjhz+gLsgKxajHPQtAk4SNqtvLHjWKmpv+s4VnRg7/38311aqQ w+Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=szkGz0WM5rxmvwHK12PmnZs8QzF1mTZhvs0Jlss6M8Y=; fh=LruyahbjVMIdbB+JnKKCVZ8zocnkkp/6SVOzQ20og/0=; b=j4K373Ig672BrFpXTnS6CWHRXYkYSl/wg3gRvnwUNCzilhxlTYoVMRMX2UzEPgqsnS 9MOphm1rf53Wd4VE8u/uS0aELk9sPrMAUxjq7F84tcFvsml+/Nx3jUFvavBSjJ9n/DzD ma0jjR5X84rFguW6IVS/Wvfiz55K7hZyYmbbqUmILL2Cp2iHZTkHGpFqxi1E4mmh/Duj CFB/A0mD17ThbNscn2hOt20iApeFn1xsLlXnDppNkP84Q6d85smp1FprqAXd7YJMuig0 8aufB8WVsd4n7ajR6JV6+7/FmBeeXn+tDFZ+SSvusOIQbVqJ7Lf1dXdmlGSE65SS9+0v vP9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mPoZ+uA4; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd18370e84si367065476d6.562.2025.01.03.15.18.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Jan 2025 15:18:48 -0800 (PST) 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=mPoZ+uA4; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTqvN-0007f7-UN; Fri, 03 Jan 2025 18:17:49 -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 1tTqvM-0007el-EG for qemu-devel@nongnu.org; Fri, 03 Jan 2025 18:17:48 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTqvK-0004IC-Cj for qemu-devel@nongnu.org; Fri, 03 Jan 2025 18:17:48 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43618283d48so92160235e9.1 for ; Fri, 03 Jan 2025 15:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735946264; x=1736551064; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=szkGz0WM5rxmvwHK12PmnZs8QzF1mTZhvs0Jlss6M8Y=; b=mPoZ+uA487w3eDj0mD8pSvDuGMGwGD4kXtou72T0AW+tlBrkhb59Ba2iT+9WOa5FfI bjbd5E/Qy82Ydy077q9I93TsAogk90okpSW4OUmpImZvY7LOh6U8AT+L/gmvb6b5uEen TJgINs9hg5GhDtgkq8IUGfBcctkyNsNpAOA9k3nv/o5G0z5demSoJdGfhNNpkykq4fWf DtBMkIrMU3Y9t6DXMlVnRtfpOSctvfrnrXfaIPlvrTNbH6kYwT/go7DjlikvdxtLgfmF GhrSW8W5DTr/F8hLD6sl6fOAmQns8KL76GI/DK6JwW3GihRs599ilma4T06YsyOuBVcI O/UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735946264; x=1736551064; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=szkGz0WM5rxmvwHK12PmnZs8QzF1mTZhvs0Jlss6M8Y=; b=b5Di5mLozKTslDdEN3g3E3D8/2s2bsZBA4cgKjBzIAWZMrfcxaRCNrmMK03xyNbjC/ deX6EQYxCgR8JBmRYKsO4iGiSjWXY7K+vUyEinE4UGacy36fP0e066+0h7SzxC6trb35 PWVdoQxToOUlHKYkckQQBF4Ya71NKanRN9akBG+U+mFA9j0cHZZsQf5BHEt/OSa60DtW 44BbsXm+IDLOlglAmx4pvSW+FWbajJfpFj4uwT/UNBb4pAIN1H8IAY+DyGgVD6LfvMju i0SEaqIowYGgAGmYxsr93OudEY9CIGmSOHpymAxwnVxJab3xmyKS/E8fW9/pww2qCVUg VV0Q== X-Gm-Message-State: AOJu0Yzf4vHLgEaBw6TxClIL8nD96xdiS5nPpLbazaG3O8Z8Xdqc/Vfv VDNKVJJoXAKkKHxfhES47pFctH0KQI4c19OmVjiPOHWnBIOlsjUo3U5NGkF98ckR8mKgIG+uFd9 DZOw= X-Gm-Gg: ASbGncu8u5OMGMNaBx28i5me0aMMNcPXaO8HrJx8Xk+59sKoK+9cOyhJNcR+1F9i6rY JoEcUUwIi7DPBAuxu9BrMwMzSBNei7yWREC5CTmems9gmYYYDtUYfnHRH5QTNQyDdTJ9fqJTB+v RK91+m+tWEaO4PdncGoe7HGa7ltLt/8xWCNnKmEZ3yI/NBNHhSzstYZlNlRw8OEziAZJ0nF8Pgo JamEQ+N9q3cRlzHENNstbkL4lzlBORUq6DzgPrg95mszBq1KGOAPJc5VoXsrWrm1s8iP6pIHNfF X-Received: by 2002:a05:6000:186e:b0:386:378c:b7ec with SMTP id ffacd0b85a97d-38a22405d3emr44439572f8f.58.1735946263892; Fri, 03 Jan 2025 15:17:43 -0800 (PST) Received: from localhost.localdomain ([88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c4b0sm496588385e9.35.2025.01.03.15.17.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 15:17:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Brian Cain , Anton Johansson , Daniel Henrique Barboza , Thomas Huth , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [RFC PATCH 0/6] disas: Allow linking multiple disassemblers in a heterogeneous binary Date: Sat, 4 Jan 2025 00:17:32 +0100 Message-ID: <20250103231738.65413-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 Hi, This series is an experiment to link multiple disassembler in the same system binary. At least in my prototype I wanted to get 3: x86 host and microblaze/xtensa targets. Instead of having meson.build select one pair of host+target, we let targets to be selected by Kconfig. By default each target keeps selecting its disassembler, so there is no change in current uses of 1 target per binary. Unfortunately I couldn't generalize to user emulation because we don't use Kconfig there. Philippe Mathieu-Daudé (6): target: Only link capstone to targets requiring it target/hexagon: Add Kconfig file target/xtensa: Move xtensa-isa.c to common_ss[] disas: Have each system target select its disassembler Kconfig: Expose host CONFIG_CAPSTONE definition disas: Select capstone targets by default meson.build | 4 ++- Kconfig | 1 + Kconfig.host | 3 ++ disas/Kconfig | 60 +++++++++++++++++++++++++++++++++++++++ disas/meson.build | 1 - target/Kconfig | 1 + target/alpha/Kconfig | 1 + target/arm/meson.build | 1 + target/avr/Kconfig | 1 + target/hexagon/Kconfig | 3 ++ target/hppa/Kconfig | 1 + target/i386/Kconfig | 1 + target/i386/meson.build | 1 + target/loongarch/Kconfig | 1 + target/m68k/Kconfig | 1 + target/microblaze/Kconfig | 1 + target/mips/Kconfig | 1 + target/openrisc/Kconfig | 1 + target/ppc/Kconfig | 1 + target/ppc/meson.build | 1 + target/riscv/Kconfig | 2 ++ target/rx/Kconfig | 1 + target/s390x/Kconfig | 1 + target/s390x/meson.build | 1 + target/sh4/Kconfig | 1 + target/sparc/Kconfig | 2 ++ target/tricore/Kconfig | 1 + target/xtensa/Kconfig | 1 + target/xtensa/meson.build | 3 +- 29 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 disas/Kconfig create mode 100644 target/hexagon/Kconfig