This is the mail archive of the newlib@sourceware.cygnus.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch to libc/sys/arm/crt0.S


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?]

Keith



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

Keith Walker		keith.walker@arm.com		Tel:+44 (1628) 427732
ARM Ltd		http://www.arm.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]