newlib-cygwin/libgloss
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
..
aarch64 ARM/AArch64: Fix GetCmdLine semihosting directives 2017-05-19 15:45:58 -04:00
arc arc: Add align keyword. 2016-08-11 10:59:54 +02:00
arm ARM/AArch64: Fix GetCmdLine semihosting directives 2017-05-19 15:45:58 -04:00
bfin * configure.in: Remove config_libnosys=false 2014-09-22 15:26:46 +00:00
config libgloss: change 'q' flag to 'r' in ar call 2012-03-13 01:47:40 +00:00
cr16 libgloss: cr16: add custom syscall list 2012-08-30 07:04:42 +00:00
cris Committed, libgloss: hook up cris-elf to the initfini-array support. 2017-01-29 21:23:32 +01:00
crx [newlib] 2008-04-04 21:52:01 +00:00
d30v 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-21 16:42:17 +00:00
doc Fix html build with makeinfo 5.2 2016-08-19 10:32:23 +02:00
epiphany 2012-03-09 Jeff Johnston <jjohnstn@redhat.com> 2012-03-09 20:28:57 +00:00
fr30 Remove GPL licencsing 2010-12-17 10:13:31 +00:00
frv * frv/crt0.S (__frv_fix_usrptrs): Fix .size directive. 2011-03-24 16:24:36 +00:00
ft32 libgloss/ft32: fix whitespace in Makefile 2016-05-20 10:10:08 -05:00
hp74x [newlib] 2008-04-04 21:52:01 +00:00
i386 [newlib] 2008-04-04 21:52:01 +00:00
i960 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-21 16:42:17 +00:00
iq2000 2012-03-09 Jeff Johnston <jjohnstn@redhat.com> 2012-03-09 20:28:57 +00:00
libnosys * arm/elf-nano.specs: New file. 2014-08-14 15:00:33 +00:00
lm32 2015-01-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> 2015-01-05 17:36:34 +00:00
m32c * m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int. 2009-07-08 20:54:19 +00:00
m32r 2009-03-16 Jeff Johnston <jjohnstn@redhat.com> 2009-03-16 19:26:59 +00:00
m68hc11 [newlib] 2008-04-04 21:52:01 +00:00
m68k 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-21 16:42:17 +00:00
mcore libgloss: mcore: add custom syscall header 2015-04-23 22:03:45 +02:00
mep 2015-01-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> 2015-01-05 17:36:34 +00:00
microblaze * microblaze/_exception_handler.S: Adjust to be weak. 2013-07-23 09:11:18 +00:00
mips * mips/crt0.S: Configure processor based on .MIPS.abiflags. 2014-11-28 08:51:03 +00:00
mn10200 2012-03-09 Jeff Johnston <jjohnstn@redhat.com> 2012-03-09 20:28:57 +00:00
mn10300 2012-03-09 Jeff Johnston <jjohnstn@redhat.com> 2012-03-09 20:28:57 +00:00
moxie The moxie sub.l instruction is now just sub. 2014-12-27 12:18:56 +00:00
msp430 Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory model is used 2017-04-19 15:04:31 +02:00
mt 2015-01-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> 2015-01-05 17:36:34 +00:00
nds32 * libgloss/nds32/_exit.S: Finish with an infinite loop in _exit. 2014-12-15 13:30:07 +00:00
or1k libgloss: Remove duplicate definition of environ 2017-02-13 09:16:51 +01:00
pa [newlib] 2008-04-04 21:52:01 +00:00
rl78 rl78: Don't output CR when LF is encountered in write(). 2015-12-16 13:38:38 -07:00
rs6000 2013-05-30 Jeff Johnston <jjohnstn@redhat.com> 2013-05-30 22:44:04 +00:00
rx Add a check that the data area does not overrun the stack. 2015-05-27 13:30:19 +02:00
sh * arm/elf-redboot.ld, iq2000/sim.ld, m68hc11/sim-valid-m68hc11.ld, 2005-05-20 15:45:45 +00:00
sparc * sparc/crt0.S: Declare use of system registers. 2015-01-22 17:38:39 +00:00
sparc_leon 2011-12-15 Konrad Eisele <konrad@gaisler.com> 2011-12-15 22:58:40 +00:00
spu 2013-11-21 Daniel Ramirez <javamonn@gmail.com> 2013-11-21 16:42:17 +00:00
testsuite
tic6x 2010-11-17 Bernd Schmidt <bernds@codesourcery.com> 2010-11-17 21:45:58 +00:00
v850 Add comment in the v850's crt0.S file noting that separate LMA and VMA addresses for data sections are not currently supported. 2016-05-26 12:08:47 +01:00
visium * COPYING.LIBGLOSS: Add Controls and Data Services copyright. 2015-01-21 18:27:47 +00:00
wince [newlib] 2008-04-04 21:52:01 +00:00
xc16x Fix location of this file to be where it was initially intended. 2010-08-23 15:51:27 +00:00
xstormy16 * xstormy16/crt0.s (_hwint): Fix .size directive. 2011-03-24 16:29:11 +00:00
ChangeLog Deprecate newlib and winsup ChangeLog files 2016-01-28 11:15:33 +01:00
ChangeLog-2015 Deprecate newlib and winsup ChangeLog files 2016-01-28 11:15:33 +01:00
Makefile.in * Makefile.in (stmp-bsp): Exit when subdirs fail. 2011-01-10 12:08:35 +00:00
README 2014-12-15 Stefan Wallentowitz <stefan.wallentowitz@tum.de> 2014-12-15 20:09:28 +00:00
acinclude.m4 2006-04-19 Jeff Johnston <jjohnstn@redhat.com> 2006-04-19 19:44:05 +00:00
aclocal.m4 2006-04-19 Jeff Johnston <jjohnstn@redhat.com> 2006-04-19 19:44:05 +00:00
close.c
configure Build msp430-specific libnosys 2015-12-17 16:51:41 -05:00
configure.in Build msp430-specific libnosys 2015-12-17 16:51:41 -05:00
debug.c
debug.h 2002-04-17 Joel Sherrill <joel@OARcorp.com> 2002-04-17 19:10:37 +00:00
fstat.c
getpid.c
glue.h
isatty.c
kill.c
lseek.c
open.c
print.c
putnum.c
read.c 2002-07-18 Chris Demetriou <cgd@broadcom.com> 2002-07-18 20:04:59 +00:00
sbrk.c
stat.c
syscall.h 2007-11-06 Dave Brolley <brolley@redhat.com> 2007-11-06 23:07:06 +00:00
unlink.c
write.c

README

bfin	- Analog Devices Blackfin processor.
sparc	- Fujitsu Sparclite board. Works on the ex930, ex931, ex933
hp74x	- Hewlett Packard HP742 board. Also some support for the hp743.
m68hc11 - Motorola 68HC11 or 68HC12 support.
m68k	- Motorola MVME135 and IDP board. For CPU32 systems.
mep	- Toshiba Media Processor.
pa	- WinBond and Oki boards with a PA.
mips	- R3000 support. Array Tech LSI33k based RAID disk controller.
lm32    - Lattice Mico32 simulator.
epiphany - Adapteva Epiphany multicore processor.
or1k	- OpenRISC 1000 processor.