From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Wed, 04 Jun 2008 08:49:34 -0400 Subject: [U-Boot-Users] Question About how the CPU find the right string address in U-boot binary file ? In-Reply-To: <6f6a960f0806032104h145d2dc3me9a1201cb70c5605@mail.gmail.com> References: <6f6a960f0806032104h145d2dc3me9a1201cb70c5605@mail.gmail.com> Message-ID: <48468F5E.2080600@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. 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