newlib-cygwin/libgloss/arm
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 Initializing TTBR0 to inner/outer WB 2016-03-26 12:45:07 +01:00
Makefile.in Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
_exit.c 2006-01-03 Kazu Hirata <kazu@codesourcery.com> 2007-01-03 16:55:25 +00:00
_kill.c 2006-01-03 Kazu Hirata <kazu@codesourcery.com> 2007-01-03 16:55:25 +00: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 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> 2002-11-07 00:25:57 +00:00
coff-pid.specs 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> 2002-11-07 00:25:57 +00:00
coff-rdimon.specs 2004-06-09 Toralf Lund <toralf@procaptura.com> 2004-06-09 19:06:50 +00:00
coff-rdpmon.specs 2004-06-09 Toralf Lund <toralf@procaptura.com> 2004-06-09 19:06:50 +00:00
coff-redboot.ld 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> 2002-11-07 00:25:57 +00:00
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.specs * arm/elf-aprofile-validation.specs (*link): Make text segment 2014-07-16 11:53:34 +00:00
elf-aprofile-ve.specs * arm/elf-aprofile-validation.specs (*link): Make text segment 2014-07-16 11:53:34 +00:00
elf-iq80310.specs 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> 2002-11-07 00:25:57 +00:00
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 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> 2002-11-07 00:25:57 +00:00
elf-rdimon.specs * arm/elf-nano.specs: New file. 2014-08-14 15:00:33 +00:00
elf-rdpmon.specs 2004-06-09 Toralf Lund <toralf@procaptura.com> 2004-06-09 19:06:50 +00:00
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 2002-11-08 Jeff Johnston <jjohnstn@redhat.com> 2002-11-07 00:25:57 +00:00
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 Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +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 Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
syscall.h libgloss: arm: fix copy & paste in syscall.h 2015-04-23 22:03:45 +02:00
syscalls.c * arm/crt0.S: Initialise __heap_limit when ARM_RDI_MONITOR is defined. 2015-02-17 09:30:52 +00: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