[RFA/libgloss/arm] Handle zero heap base from semihosting
Matthew Gretton-Dann
matthew.gretton-dann@arm.com
Wed Sep 28 03:14:00 GMT 2011
On 27/09/11 02:44, Can Finner wrote:
> On Mon, Sep 26, 2011 at 11:27 PM, Matthew Gretton-Dann
> <matthew.gretton-dann@arm.com> wrote:
>
>>
>> libgloss/ChangeLog:
>>
>> 2011-09-02 Matthew Gretton-Dann<matthew.gretton-dann@arm.com>
>>
>> * arm/crt0.s: support 0 heap base response from semihosting.
>>
>
> Hi,
>
> For the symbol "__end__".
> .word CommandLine
> .word 255
> +.LC31:
> + .word __end__
>
> Is there any story why not using "__bss_end__"? In case the program
> can not assuming
> the bss end lies at last of data segment?
>
> Thanks
The default linker script for arm-none-eabi (installed as
../lib/ldscripts/armelf.x has the following in it:
> _bss_end__ = . ; __bss_end__ = . ;
> . = ALIGN(32 / 8);
> . = ALIGN(32 / 8);
> __end__ = . ;
> _end = .; PROVIDE (end = .);
So I'm using __end__ as it is aligned to a 4-byte boundary which the
heap requires - whereas __bss_end__ may not be.
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer, PD Software - Tools, ARM Ltd
More information about the Newlib
mailing list