From: David George <dgeorge@rapitasystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Possible bug in u-boot standalone examples
Date: Thu, 15 Jan 2015 14:48:42 +0000 [thread overview]
Message-ID: <54B7D34A.6090501@rapitasystems.com> (raw)
In-Reply-To: <20150115143000.886A53808CF@gemini.denx.de>
Hey Wolfgang,
Hmm, I think I might not have made my point clear enough ... my
apologies! Either that or I have a fundamental misunderstanding of the
issue (more likely).
> No. See the FAQ entry. The entry point address really depends on te
> code. If you add code, it can be basically anywehre - there may other
> functions preceed the entry point, etc.
I had a look at this FAQ entry, and I think it's addressing a different
point than the issue I'm seeing here. This part of the FAQ tells the
user that the load point of their standalone function may differ due to
the particular linker or link map they're using. This is totally fine
and I understand that this is subject to change, and naturally if you're
attempting to run a standalone application from an address other than
its base address defined at link time, then the application won't
execute correctly.
In my situation, I specifically told my linker to set my example
application's start address to to be the same as the hello_world example
(0x40000). Presumably the same problems would have occurred regardless
of where I loaded it due to the fact that I was beginning execution four
bytes into the code, thus skipping the first instruction (as outlined in
the examples).
Of course, I understand that the situation becomes very different when
alternative compilers and linkers are thrown into the mix.
I'd be very interested to know which incidents in the past had caused
the standalone examples to fail to execute correctly from their base
address yet work correctly from a 4 byte offset, because as a relative
newcomer to development at this level of abstraction, this threw me a
massive red herring until I realised that actually, for my example, the
first instruction is -crucial- (stack frame allocation), and I can't
work out in my head how the example actually works correctly when loaded
at a 4 byte offset.
Thanks!
Dave George
Stay informed by joining the Rapita Systems mailing list
http://www.rapitasystems.com/contact/mailing_list
For real-time verifications issues and discussion, follow the Rapita Systems blog
http://www.rapitasystems.com/blog
next parent reply other threads:[~2015-01-15 14:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54B7C286.9080906@rapitasystems.com>
[not found] ` <20150115140401.ADF003808CF@gemini.denx.de>
[not found] ` <54B7CA19.1060109@rapitasystems.com>
[not found] ` <20150115143000.886A53808CF@gemini.denx.de>
2015-01-15 14:48 ` David George [this message]
2015-01-15 19:19 ` [U-Boot] Possible bug in u-boot standalone examples Wolfgang Denk
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=54B7D34A.6090501@rapitasystems.com \
--to=dgeorge@rapitasystems.com \
--cc=u-boot@lists.denx.de \
/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