mbox series

[RFC,0/6] disas: Allow linking multiple disassemblers in a heterogeneous binary

Message ID 20250103231738.65413-1-philmd@linaro.org
Headers show
Series disas: Allow linking multiple disassemblers in a heterogeneous binary | expand

Message

Philippe Mathieu-Daudé Jan. 3, 2025, 11:17 p.m. UTC
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