With the new 2.0 ARM semihosting ABI, there is an optional extension SYS_EXIT_EXTENDED which can be used to implement returning a non-zero exit code for 32-bit ARM programs:
https://developer.arm.com/docs/100863/latest/semihosting-operations/sys_exit_extended-0x20#sh-ext-exit-extended
QEMU should implement this.
With the new 2.0 ARM semihosting ABI, there is an optional extension SYS_EXIT_EXTENDED which can be used to implement returning a non-zero exit code for 32-bit ARM programs:
https:/ /developer. arm.com/ docs/100863/ latest/ semihosting- operations/ sys_exit_ extended- 0x20#sh- ext-exit- extended
QEMU should implement this.