[U-Boot] How/Where does "_start" get assigned a value ?

Djoker thelonejoker at gmail.com
Sat Oct 12 02:30:07 CEST 2013


I am sorry Gerhard, I am newbie to the list.
I will keep in mind the etiquette of the list.
Thanks for the help.

On Thu, Oct 10, 2013 at 8:37 AM, Gerhard Sittig <gsi at denx.de> wrote:
> On Wed, Oct 09, 2013 at 09:07 -0700, djoker wrote:
>>
>> Hi Everyone,
>
> Why do you "re-send" your request without giving readers time to
> respond (first message at 17:00 and second on 09:00 the very next
> morning)?
>
> This unnecessarily splits the same subject across several
> threads, hinders discussion and prevents easy lookup in archives
> (and reduces your score and thus the willingness to help such a
> "demanding" person) ...
>
>> I have a armv7 board and am looking at the "_start" symbol address, using
>> the following command:
>> *nm u-boot | grep -w _start*
>>
>> It returned the following:
>> *67000020 T _start*
>>
>> I couldn't help notice that the the _start value is very "close" in vlaue to
>> the value of CONFIG_SYS_TEXT_BASE defined in my board file:
>> *#define CONFIG_SYS_TEXT_BASE 0x67000004*
>
> As with any ARM based CPU, I'd expect the "executable" to start
> with a vector table, before the actual body of the start()
> routine follows.
>
> The "reset vector" only has a few bytes in the vector table, and
> should consist of a branch to the actual initialization code.
>
> So I'd rather be baffled if the _start symbol would reside at the
> very start of the binary, since it then would clobber all the
> vectors.
>
>> But, I have searched through the source code, but not found where _start
>> gets assigned a value.. Could someone please help me understand this ?
>
> The linker (sometimes referred to as the loader) is the entity to
> assign addresses to symbols.  So check the linker command line
> and control files when in doubt.
>
> Optionally tell the compiler to "save temp files", and/or check
> whether the resulting *.o files or executables match what you'd
> expect from looking at the C/assembly source.
>
>
> virtually yours
> Gerhard Sittig
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the U-Boot mailing list