patch to libc/sys/arm/crt0.S

Tue Jun 27 09:29:00 GMT 2000

The following is a patch to libc/sys/arm/crt0.S.
The #AngleSWI_Reason_GetCmdLine call is
expecting r1 to contain a pointer to a 2 word
data block for returning the result.....

word1 is a pointer to a null-terminated string.
word2 is the length of the string.

This patch adds the 2nd word required by the call
which is currently missing.     Without this the
1st word in the code segment of the module linked
after crt0.o is corrupted when the code runs.

[Note this means that the SWI will alter word2 which
is in the code area .... maybe this result block
should be moved into the data area?]


RCS file: /cvs/src/src/newlib/libc/sys/arm/crt0.S,v
retrieving revision
diff -c -r1.1.1.1 crt0.S
*** crt0.S      2000/02/17 19:39:49
--- crt0.S      2000/06/27 16:13:01
*** 226,231 ****
--- 226,232 ----
  .LC30:        .word   CommandLine
+       .word   0
  /*  Workspace for Angel calls. */

Keith Walker		Tel:+44 (1628) 427732

More information about the Newlib mailing list