[PATCH 00/10] single-binary: compile once semihosting

Pierrick Bouvier posted 10 patches 2 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250730220621.1142496-1-pierrick.bouvier@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
There is a newer version of this series
include/semihosting/common-semi.h             |  5 ++
include/semihosting/guestfd.h                 |  7 --
include/semihosting/semihost.h                |  2 +
include/semihosting/syscalls.h                | 29 +++---
semihosting/arm-compat-semi-stub.c            | 19 ++++
semihosting/arm-compat-semi.c                 | 61 +++++++++----
semihosting/guestfd.c                         | 26 ++----
semihosting/syscalls.c                        | 89 +++++++++----------
...mon-semi-target.h => common-semi-target.c} | 23 ++---
...mon-semi-target.h => common-semi-target.c} | 22 ++---
semihosting/meson.build                       | 18 ++--
target/arm/meson.build                        |  4 +
target/riscv/meson.build                      |  4 +
13 files changed, 168 insertions(+), 141 deletions(-)
create mode 100644 semihosting/arm-compat-semi-stub.c
rename target/arm/{common-semi-target.h => common-semi-target.c} (58%)
rename target/riscv/{common-semi-target.h => common-semi-target.c} (52%)
[PATCH 00/10] single-binary: compile once semihosting
Posted by Pierrick Bouvier 2 months, 2 weeks ago
This series compiles once semihosting files in system mode.
The most complicated file was semihosting/arm-compat-semi.c, which was carefully
cleaned in easy to understand steps.

Pierrick Bouvier (10):
  semihosting/syscalls: compile once in system and per target for user
    mode
  semihosting/guestfd: compile once for system/user
  semihosting/arm-compat-semi: remove common_semi_sys_exit_extended
  target/{arm,riscv}/common-semi-target: eradicate target_ulong
  include/semihosting/common-semi: extract common_semi API
  semihosting/arm-compat-semi: eradicate sizeof(target_ulong)
  semihosting/arm-compat-semi: replace target_ulong with uint64_t
  semihosting/arm-compat-semi: replace target_long with int64_t
  semihosting/arm-compat-semi: remove dependency on cpu.h
  semihosting/arm-compat-semi: compile once in system and per target for
    user mode

 include/semihosting/common-semi.h             |  5 ++
 include/semihosting/guestfd.h                 |  7 --
 include/semihosting/semihost.h                |  2 +
 include/semihosting/syscalls.h                | 29 +++---
 semihosting/arm-compat-semi-stub.c            | 19 ++++
 semihosting/arm-compat-semi.c                 | 61 +++++++++----
 semihosting/guestfd.c                         | 26 ++----
 semihosting/syscalls.c                        | 89 +++++++++----------
 ...mon-semi-target.h => common-semi-target.c} | 23 ++---
 ...mon-semi-target.h => common-semi-target.c} | 22 ++---
 semihosting/meson.build                       | 18 ++--
 target/arm/meson.build                        |  4 +
 target/riscv/meson.build                      |  4 +
 13 files changed, 168 insertions(+), 141 deletions(-)
 create mode 100644 semihosting/arm-compat-semi-stub.c
 rename target/arm/{common-semi-target.h => common-semi-target.c} (58%)
 rename target/riscv/{common-semi-target.h => common-semi-target.c} (52%)

-- 
2.47.2