From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] hello_world.c: fix entry point in case of arm thumb binary
Date: Sat, 12 Aug 2017 20:39:30 +0200 [thread overview]
Message-ID: <20170812183930.23BBC120207@gemini.denx.de> (raw)
In-Reply-To: <20170812090346.7887-3-max.krummenacher@toradex.com>
Dear Max,
In message <20170812090346.7887-3-max.krummenacher@toradex.com> you wrote:
> If compiling for thumb the U-Boot 'go' command can not jump to the entry
> point, as the jump will be done in the assumption that the code jumped to
> is using the arm instruction set.
>
> So add add a simple forwarder in arm instruction set which then jumps
> to the 'real' entry.
This description makes no sense to me. Whatever you do, the address
where the image starts executuin is what is called the entry point.
Whether this is needs special code to swutch to thumb mode or not
does not make any difference. Whichever address you use with the
"go" command is the "entry point".
Also, can the mode switching not be done inside the body of the
regular hello_world() function? This would be much better as it
wuld allow to always use the same method to determine the entry
point address (line running "nm" on the binary and grepping for the
name "hello_world"). With your code, you would have to fix all
documentation and explain that the entry pooint name is suddenly
domething totally different (and an unexpected, unusal name like
"dummy2" as well) for thumb images.
Sorry, but this does not seem a good idea to me.
Naked-by: Wolfgang Denk <wd@denx.de>
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The use of anthropomorphic terminology when dealing with computing
systems is a symptom of professional immaturity. -- Edsger Dijkstra
next prev parent reply other threads:[~2017-08-12 18:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-12 9:03 [U-Boot] [PATCH 0/2] improve hello_world standalone application for arm Max Krummenacher
2017-08-12 9:03 ` [U-Boot] [PATCH 1/2] arm: use $loadaddr as the standalone entry point Max Krummenacher
2017-08-12 18:29 ` Wolfgang Denk
2017-08-12 21:21 ` Max Krummenacher
2017-08-14 19:36 ` Wolfgang Denk
2017-08-14 21:13 ` Tom Rini
2017-08-15 7:32 ` Wolfgang Denk
2017-08-15 11:39 ` Tom Rini
2017-08-15 12:22 ` Max Krummenacher
2017-08-15 13:31 ` Wolfgang Denk
2017-08-15 13:21 ` Wolfgang Denk
2017-08-19 1:35 ` Tom Rini
2017-08-12 9:03 ` [U-Boot] [PATCH 2/2] hello_world.c: fix entry point in case of arm thumb binary Max Krummenacher
2017-08-12 18:39 ` Wolfgang Denk [this message]
2017-08-12 21:31 ` Max Krummenacher
2017-08-14 19:46 ` Wolfgang Denk
2017-08-14 21:15 ` Tom Rini
2017-08-15 12:24 ` Max Krummenacher
2017-08-12 18:32 ` [U-Boot] [PATCH 0/2] improve hello_world standalone application for arm Wolfgang Denk
2017-08-12 21:21 ` Max Krummenacher
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=20170812183930.23BBC120207@gemini.denx.de \
--to=wd@denx.de \
--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