newlib-cygwin/libgloss/aarch64
Laurent ALFONSI 9b1167219a ARM/AArch64: Fix GetCmdLine semihosting directives
When simulating arm code, the target program startup code (crt0) uses
semihosting invocations to get the command line from the simulator. The
simulator returns the command line and its size into the area passed in
parameter. (ARM 32-bit specifications :
http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf
chapter "5.4.19 SYS_GET_CMDLINE").

The memory area pointed by the semihosting register argument is located
in .text section (usually not writtable (RX)).

If we run this code on a simulator that respects this rights properties
(qemu user-mode for instance), the command line will not be written to
the .text program memory, in particular the length of the string. The
program runs with an empty command line. This problem hasn't been seen
earlier probably because qemu user-mode is not so much used, but this can
happen with another simulator that refuse to write in a read-only segment.

With this modification, the command line can be correctly passed to the
target program.

Changes:
- libgloss/arm/crt0.S : Arguments passed to the AngelSWI_Reason_GetCmdLine
  semihosting invocation are placed into .data section instead of .text
- libgloss/aarch64/crt0.S : Idem for aarch64 AngelSVC_Reason_GetCmdLine
  semihosting.
2017-05-19 15:45:58 -04:00
..
cpu-init * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Use bic-immediate 2014-01-28 11:16:19 +00:00
Makefile.in * aarch64/Makefile.in (RDIMON_SCRIPTS): Rule to build in-tree copies 2014-02-03 10:30:34 +00:00
_exit.c
_kill.c
aclocal.m4
configure * aarch64/configure.in: Replace the direct generation of 2012-11-23 10:43:31 +00:00
configure.in * aarch64/configure.in: Replace the direct generation of 2012-11-23 10:43:31 +00:00
crt0.S ARM/AArch64: Fix GetCmdLine semihosting directives 2017-05-19 15:45:58 -04:00
elf-aem-validation.specs Correcting my previous commit. 2013-01-22 09:49:27 +00:00
elf-aem-ve.specs Correcting my previous commit. 2013-01-22 09:49:27 +00:00
elf-rdimon.specs
ftruncate.c [AArch64] Set errno in ftruncate() and truncate(). 2013-11-21 15:53:52 +00:00
libcfunc.c
svc.h
syscalls.c * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__ 2013-07-04 10:21:52 +00:00
truncate.c [AArch64] Set errno in ftruncate() and truncate(). 2013-11-21 15:53:52 +00:00