]> sourceware.org Git - newlib-cygwin.git/commitdiff
* arm/crt0.s: Support 0 heap base response from HeapInfo syscall.
authorNick Clifton <nickc@redhat.com>
Thu, 29 Sep 2011 11:23:29 +0000 (11:23 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 29 Sep 2011 11:23:29 +0000 (11:23 +0000)
libgloss/ChangeLog
libgloss/arm/crt0.S

index afea6bb467d55e3dcd05ca84caed263d094f9927..ff129e66c1080954666a65b86269c5f8362c6f62 100644 (file)
@@ -1,3 +1,7 @@
+2011-09-29  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+
+       * arm/crt0.s: Support 0 heap base response from HeapInfo syscall.
+
 2011-09-29  Bin Cheng  <bin.cheng@arm.com>
 
        * arm/arm.h (HAVE_CALL_INDIRECT): Define.
index 7489850704a88dd9fde6ec165a92fb64dbc2af44..101041e048ef90b972111586b99738e823179f7a 100644 (file)
        AngelSWIAsm     AngelSWI_ARM
 #endif
        ldr     r0, .LC0        /*  point at values read */
+
+       ldr     r1, [r0, #0]
+       cmp     r1, #0
+       bne     .LC32
+       /* If the heap base value [r0, #0] is 0 then the heap base is actually 
+          at the end of program data (i.e. __end__). See:
+           http://infocenter.arm.com/help/topic/com.arm.doc.dui0471-/Bacbefaa.html
+          for more information.  */
+       ldr     r1, .LC31
+       str     r1, [r0, #0]
+.LC32: 
        ldr     r1, [r0, #8]
        ldr     r2, [r0, #12]
        /*  We skip setting sp/sl if 0 returned from semihosting. 
@@ -437,6 +448,8 @@ change_back:
 .LC30:
        .word   CommandLine
        .word   255
+.LC31:
+       .word   __end__
 
 /*  Workspace for Angel calls.  */
        .data
This page took 0.0363 seconds and 5 git commands to generate.