public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jens Gehrlein <sew_s@tqs.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] How to specify the starting function of a U-boot standalone application.
Date: Wed, 25 Jun 2008 07:44:02 +0200	[thread overview]
Message-ID: <4861DB22.9090201@tqs.de> (raw)
In-Reply-To: <48616AED.50205@ruggedcom.com>

Hi all,

richardretanubun schrieb:
> When I go go <start addr>, the execution jumps straight to 
> do_func_info() and the application finishes. (which is just a bunch of 
> printf).
> 
> How do I ensure that when compiled, the my_test.bin places the main 
> function at the "go" point?
> 
> I have tried re-ordering the function bodies around, moving main as the 
> last function and thus removing all the function prototypes.
> I tried name matching the "main" function to the file name, none seems 
> to help.

I have the same problem. When I modify the source code the compiler may 
or may not rearrange the functions. It is not guaranteed, that the main 
function always starts at the same address.

How can this be solved? Is it possible/meaningful to put the main 
function into a separate linker segment? Any suggestions?

My temporary solution:
Because I had to patch the U-Boot code, especially the API, anyway for 
my purposes, I decided to implement my test function as U-Boot command 
instead as standalone application.

Best Regards,
Jens

  reply	other threads:[~2008-06-25  5:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 21:45 [U-Boot-Users] How to specify the starting function of a U-boot standalone application richardretanubun
2008-06-25  5:44 ` Jens Gehrlein [this message]
2008-06-25 13:42   ` [U-Boot-Users] How to specify the starting function of aU-boot " McMullan, Jason
2008-06-25 13:57     ` Jens Gehrlein
2008-06-27 16:08       ` richardretanubun

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=4861DB22.9090201@tqs.de \
    --to=sew_s@tqs.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