All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Question About how the CPU find the right string address in U-boot binary file ?
Date: Wed, 04 Jun 2008 08:49:34 -0400	[thread overview]
Message-ID: <48468F5E.2080600@ge.com> (raw)
In-Reply-To: <6f6a960f0806032104h145d2dc3me9a1201cb70c5605@mail.gmail.com>

wang baohua wrote:
> Dear all,
>  I study the U-boot.bin file using the objdump command, I don't know how 
> the CPU can find the right string address when puts() string.
>  For example, In my binary file, the string "Call backtrace: " in func 
> "print_backtrace()" address is :0x0002b280, the func address is
>  0xfff03564, How the CPU can find the 0x0002b280 when call  puts ("Call 
> backtrace: "); ?  I find the SMC serial driver
>  "serial_putc()" but cannot know how to find the char address in binary 
> file.
>  
> Below is the objdump result, can anyone explain to me ? thanks!

Please don't post HTML, use plain text.

I don't understand your question, why are you asking it?  Are you trying 
to figure out a problem or are you just trying to understand the linking 
processes?

Using objdump on u-boot.bin is not valid.  U-boot.bin is a binary file, 
objdump works on ELF (linker formatted) files.

<http://en.wikipedia.org/wiki/Executable_and_Linkable_Format>

When you link the ELF files, the linker fixes up all the addresses so 
the linker sets the proper address in the instruction that the CPU 
ultimately executes.  The u-boot.bin file is a raw binary dump of the 
result.

Was that your question???

Best regards,
gvb

  reply	other threads:[~2008-06-04 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-04  4:04 [U-Boot-Users] Question About how the CPU find the right string address in U-boot binary file ? wang baohua
2008-06-04 12:49 ` Jerry Van Baren [this message]
2008-06-05  2:07   ` wang baohua
2008-06-04 14:51 ` Kenneth Johansson
     [not found] ` <1212589540.6922.26.camel@localhost.localdomain>
     [not found]   ` <6f6a960f0806041850l68abb1b3s31709aef8e76c70f@mail.gmail.com>
2008-06-05  9:53     ` Kenneth Johansson
2008-06-05 12:31       ` Jerry Van Baren
     [not found]       ` <6f6a960f0806050517x2418e5c0m4dd88f251e2d93f4@mail.gmail.com>
2008-06-05 15:39         ` Kenneth Johansson
2008-06-05 16:00           ` 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=48468F5E.2080600@ge.com \
    --to=gerald.vanbaren@ge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.