From: Dave Nadler <drn@nadler.com>
To: Tamar Christina <Tamar.Christina@arm.com>,
"newlib@sourceware.org" <newlib@sourceware.org>
Cc: nd <nd@arm.com>
Subject: Re: [Newlib][libgloss]ARM - semihosting use of __end__symbol in crt0.S
Date: Wed, 05 Jul 2017 18:19:00 -0000 [thread overview]
Message-ID: <91886142-6bd1-54cd-6bc7-3f00569a3e60@nadler.com> (raw)
In-Reply-To: <VI1PR0801MB20318E2F91DD54BDF838E0CDFFD40@VI1PR0801MB2031.eurprd08.prod.outlook.com>
Thanks Tamar - but, what is the heap base address _used_ for in semihosting?
The heap storage is allocated starting during early start-up;
so hopefully it is not trying to use this memory...
Thanks!
Best Regards, Dave
On 7/5/2017 11:16 AM, Tamar Christina wrote:
> Hi Dave,
>
> The use of __end__ relates to the semihosting call SYS_HEAPINFO.
> Likely the link originally pointed tohttp://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471f/Bacbefaa.html.
>
> Basically at the startup r0 will contain the given 4 byte structure, where the first entry is the heap_base.
> If this is 0 it means the system was unable to calculate it.
> __end__ is then used as a fall back for this.
> The reason __end__ is used instead of __bss_end___ has to do with the alignment requirements.
>
> The same question was asked on the bug-fix patch that introduced it:
> http://newlib.sourceware.narkive.com/bcyUamAh/rfa-libgloss-arm-handle-zero-heap-base-from-semihosting
>
> I am not completely certain, but this seems to indicate that not all of semihosting is supported on systems with multiple stacks.
>
> Cheers,
> Tamar
> ________________________________________
> From: Dave Nadler<drn@nadler.com>
> Sent: Wednesday, July 5, 2017 2:32:18 PM
> To: Tamar Christina;newlib@sourceware.org
> Cc: nd
> Subject: [Newlib][libgloss]ARM - semihosting use of __end__symbol in crt0.S
>
> Hi Tamar - Perhaps as you are working on ARM crt0 and semihosting, you
> can help
> with a question regarding crt0's use of the symbol __end__ for semihosting.
> I read the code but I'm not expert at ARM assembly and do not understand
> what __end__ is being used for, and the comments do not explain the
> intent/purpose...
>
> I am concerned that there is an assumption within semihosting about
> available memory or memory boundaries that may be incorrect in systems where
> heap and stack are not contiguous, for example embedded systems with multiple
> stacks.
>
> I asked the question on stack exchange but (surprise) didn't get any
> useful response:
> https://stackoverflow.com/questions/44853442/meaning-of-gnu-symbol-end-especially-arm-embedded
>
> Thanks in advance for any clarification,
> Best Regards, Dave
--
Dave Nadler, USA East Coast voice (978) 263-0097,drn@nadler.com, Skype
Dave.Nadler1
next prev parent reply other threads:[~2017-07-05 18:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 16:53 [PATCH][Newlib][libgloss] - Semihosting v2 general build changes (1 / 5) Tamar Christina
2017-07-05 8:36 ` Corinna Vinschen
2017-07-05 8:44 ` Tamar Christina
2017-07-05 12:13 ` Tamar Christina
2017-07-05 12:42 ` Corinna Vinschen
2017-07-05 13:32 ` [Newlib][libgloss]ARM - semihosting use of __end__symbol in crt0.S Dave Nadler
2017-07-05 15:16 ` Tamar Christina
2017-07-05 18:19 ` Dave Nadler [this message]
2017-07-06 4:42 ` Senthil Kumar Selvaraj
2017-07-06 14:22 ` Tamar Christina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91886142-6bd1-54cd-6bc7-3f00569a3e60@nadler.com \
--to=drn@nadler.com \
--cc=Tamar.Christina@arm.com \
--cc=nd@arm.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).