newlib/libgloss/arm
Matthew Malcomson 6dbd190111 Enable return code with semi-hosting SYS_EXIT_EXTENDED
The _exit function currently passes -1 as a "sig" to the _kill function as an
invalid signal number so that _kill can distinguish between an abort and a
standard exit.

For boards using the SYS_EXIT_EXTENDED semi-hosting operation to return a
status code, this means that the "status" paramter to _exit is ignored and the
return code is always -1.
https://developer.arm.com/docs/100863/latest/semihosting-operations/sys_exit_extended-0x20

This patch puts shared code between _kill and _exit into a new function
_kill_shared that takes the semi-hosting "reason" to use (if semi-hosting is
available) as an argument.

For semi-hosting _kill_shared provides that "reason".

Without the "sig" argument being used to distinguish between a normal and
abnormal exit, the _exit function can provide the return code to be used if the
SYS_EXIT_EXTENDED operation is available.

Hence the exit code can be returned.
2018-11-19 13:46:19 +01:00
..
cpu-init Initializing TTBR0 to inner/outer WB 2016-03-26 12:45:07 +01:00
Makefile.in Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
_exit.c Enable return code with semi-hosting SYS_EXIT_EXTENDED 2018-11-19 13:46:19 +01:00
_kill.c Enable return code with semi-hosting SYS_EXIT_EXTENDED 2018-11-19 13:46:19 +01:00
aclocal.m4 2006-04-19 Jeff Johnston <jjohnstn@redhat.com> 2006-04-19 19:44:05 +00:00
arm.h Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
coff-iq80310.specs
coff-pid.specs
coff-rdimon-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
coff-rdimon.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
coff-rdpmon.specs
coff-redboot.ld
coff-redboot.specs
configure libgloss/arm: fix discovery of "eabihf" toolchains 2017-04-18 12:24:42 +02:00
configure.in libgloss/arm: fix discovery of "eabihf" toolchains 2017-04-18 12:24:42 +02:00
crt0.S ARM/AArch64: Fix GetCmdLine semihosting directives 2017-05-19 15:45:58 -04:00
elf-aprofile-validation-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-aprofile-validation.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-aprofile-ve-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-aprofile-ve.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-iq80310.specs
elf-linux.specs 2006-06-23 Shaun Jackman <sjackman@gmail.com> 2006-06-23 16:27:34 +00:00
elf-nano.specs Fix elf-nano.specs to work without -save-temps 2017-02-15 16:31:16 +01:00
elf-pid.specs
elf-rdimon-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-rdimon.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-rdpmon.specs
elf-redboot.ld * arm/elf-redboot.ld, iq2000/sim.ld, m68hc11/sim-valid-m68hc11.ld, 2005-05-20 15:45:45 +00:00
elf-redboot.specs
ftruncate.c [ARM] set errno in ftruncate and truncate stubs. 2013-11-21 15:49:05 +00:00
libcfunc.c * arm/licfunc.c (do_AngelSWI): Remove. 2006-12-25 23:05:24 +00:00
linux-crt0.c add forward declaration to main() to prevent warnings 2018-02-16 12:16:08 +01:00
linux-syscall.h 2006-05-30 Shaun Jackman <sjackman@gmail.com> 2006-05-30 17:40:47 +00:00
linux-syscalls0.S * arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4): 2009-10-26 10:00:41 +00:00
linux-syscalls1.c 2006-06-05 Shaun Jackman <sjackman@gmail.com> 2006-06-05 20:15:23 +00:00
redboot-crt0.S Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
redboot-syscalls.c 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:38:31 +00:00
swi.h ansification: remove _PARAMS 2018-01-17 11:47:13 -06:00
syscall.h libgloss: arm: fix copy & paste in syscall.h 2015-04-23 22:03:45 +02:00
syscalls.c adapt prototypes arm/syscalls.c to usual prototypes, and do not rely on implicit conversions 2018-02-16 12:16:07 +01:00
trap.S Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
truncate.c [ARM] set errno in ftruncate and truncate stubs. 2013-11-21 15:49:05 +00:00