A combined qemu-system binary cannot export the same C symbol from two targets.
This revision addresses the review of the original series.

Generated TCG helper symbols are namespaced centrally in the DEF_HELPER
expansions. C helper names remain generic, while target linker symbols and
metadata get a prefix; core helpers keep their existing linker names.

- Set TCG_HELPER_PREFIX per target and use it to namespace generated helper
  linker symbols and metadata
- Retain explicit i386 and ARM raise_exception implementation prefixes, with
  static inline wrappers preserving the short names
- Prefix virt_acpi_setup and virt_is_acpi_enabled on ARM, RISC-V, and LoongArch
  virt. Leave the ARM trace event virt_acpi_setup unchanged

v1: https://patchew.org/QEMU/[email protected]/
branch: 
https://gitlab.com/lygstate-qemu/qemu/-/tree/global_symbol_conflict_resolve?ref_type=heads

Changes v1 -> v2:

- Drop individual helper_wait renames on RX, Hexagon, and MIPS and RISC-V
  crc32, crc32c, and wfi renames; generated helpers are namespaced centrally
- Add target-prefixed linker symbols and metadata in DEF_HELPER expansions,
  with TCG_HELPER_PREFIX; common helpers keep their existing linker names

Yonggang Luo (6):
  hw/arm/virt: prefix ACPI helpers with arm_virt_
  hw/riscv/virt: prefix ACPI helpers with riscv_virt_
  hw/loongarch/virt: prefix ACPI helper with loongarch_virt_
  tcg: namespace target helper symbols for combined builds
  target/i386: prefix exception helper implementations
  target/arm: rename raise_exception to arm_raise_exception

 hw/arm/virt-acpi-build.c           |  4 +--
 hw/arm/virt.c                      | 12 ++++----
 hw/loongarch/virt-acpi-build.c     |  6 ++--
 hw/loongarch/virt.c                |  2 +-
 hw/riscv/virt-acpi-build.c         |  2 +-
 hw/riscv/virt.c                    |  6 ++--
 include/exec/helper-gen-common.h   | 26 ++++++++++++++++
 include/exec/helper-gen.h.inc      | 48 +++++++++++++++---------------
 include/exec/helper-head.h.inc     | 25 ++++++++++++++++
 include/exec/helper-info.c.inc     | 24 ++++++++++-----
 include/exec/helper-proto-common.h | 26 ++++++++++++++++
 include/exec/helper-proto.h.inc    | 18 ++++++-----
 include/hw/arm/virt.h              |  4 +--
 include/hw/loongarch/virt.h        |  2 +-
 include/hw/riscv/virt.h            |  4 +--
 meson.build                        |  6 +++-
 target/arm/internals.h             | 27 ++++++++++++-----
 target/arm/tcg-stubs.c             |  4 +--
 target/arm/tcg/op_helper.c         | 10 +++----
 target/i386/tcg/excp_helper.c      | 17 ++++++-----
 target/i386/tcg/helper-tcg.h       | 42 +++++++++++++++++++++-----
 21 files changed, 224 insertions(+), 91 deletions(-)

-- 
2.55.0.windows.3


Reply via email to