public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] how compilor know where .text section starts from?
@ 2008-12-03  6:35 hank.peng
  2008-12-03 11:49 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: hank.peng @ 2008-12-03  6:35 UTC (permalink / raw)
  To: u-boot

Hi, everybody:
I am new to uboot and reading source code, I have a question: how does
compilor know where .text section starts from?
For example, I am using MPC8548CDS, document says .text section begins
from 0xfff8000, but I haven't find this value in u-boot.lds?
So it must be specified in some other place, right?

-- 
The simplest is not all best but the best is surely the simplest!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] how compilor know where .text section starts from?
  2008-12-03  6:35 [U-Boot] how compilor know where .text section starts from? hank.peng
@ 2008-12-03 11:49 ` Wolfgang Denk
  2008-12-03 12:26   ` hank peng
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-12-03 11:49 UTC (permalink / raw)
  To: u-boot

Dear hank.peng <pengxihan@gmail.com>,

repl: bad addresses:
	hank.peng <pengxihan@gmail.com> -- no at-sign after local-part (<)

Please fix the mail address you provide in your headers as return
address. Either get rid of the dot, or add quotes.

In message <389deec70812022235v3f7ebedav57a62bcca04a19f0@mail.gmail.com> you wrote:
>
> I am new to uboot and reading source code, I have a question: how does
> compilor know where .text section starts from?

It doesn't. The compiler knows not much about the location of
segments. That's a matter the linker deals with.

> For example, I am using MPC8548CDS, document says .text section begins
> from 0xfff8000, but I haven't find this value in u-boot.lds?
> So it must be specified in some other place, right?

See board/<name>/config.mk

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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
You can love it, change it, or leave it.    There is NO other option.
But do not complain - it is your own choice...                  -- wd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] how compilor know where .text section starts from?
  2008-12-03 11:49 ` Wolfgang Denk
@ 2008-12-03 12:26   ` hank peng
  2008-12-05  1:30     ` chen gong
  0 siblings, 1 reply; 4+ messages in thread
From: hank peng @ 2008-12-03 12:26 UTC (permalink / raw)
  To: u-boot

2008/12/3 Wolfgang Denk <wd@denx.de>:
> Dear hank.peng <pengxihan@gmail.com>,
>
> repl: bad addresses:
>        hank.peng <pengxihan@gmail.com> -- no at-sign after local-part (<)
>
> Please fix the mail address you provide in your headers as return
> address. Either get rid of the dot, or add quotes.
>
Fixed, :)
> In message <389deec70812022235v3f7ebedav57a62bcca04a19f0@mail.gmail.com> you wrote:
>>
>> I am new to uboot and reading source code, I have a question: how does
>> compilor know where .text section starts from?
>
> It doesn't. The compiler knows not much about the location of
> segments. That's a matter the linker deals with.
>
>> For example, I am using MPC8548CDS, document says .text section begins
>> from 0xfff8000, but I haven't find this value in u-boot.lds?
>> So it must be specified in some other place, right?
>
> See board/<name>/config.mk
>
I see that, so you mean linker will read TEXT_BASE from config.mk.
Can I specify its value in u-boot.lds?
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> 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
> You can love it, change it, or leave it.    There is NO other option.
> But do not complain - it is your own choice...                  -- wd
>



-- 
The simplest is not all best but the best is surely the simplest!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] how compilor know where .text section starts from?
  2008-12-03 12:26   ` hank peng
@ 2008-12-05  1:30     ` chen gong
  0 siblings, 0 replies; 4+ messages in thread
From: chen gong @ 2008-12-05  1:30 UTC (permalink / raw)
  To: u-boot

hank peng ??:
> 2008/12/3 Wolfgang Denk <wd@denx.de>:
>> Dear hank.peng <pengxihan@gmail.com>,
>>
>> repl: bad addresses:
>>        hank.peng <pengxihan@gmail.com> -- no at-sign after local-part (<)
>>
>> Please fix the mail address you provide in your headers as return
>> address. Either get rid of the dot, or add quotes.
>>
> Fixed, :)
>> In message <389deec70812022235v3f7ebedav57a62bcca04a19f0@mail.gmail.com> you wrote:
>>> I am new to uboot and reading source code, I have a question: how does
>>> compilor know where .text section starts from?
>> It doesn't. The compiler knows not much about the location of
>> segments. That's a matter the linker deals with.
>>
>>> For example, I am using MPC8548CDS, document says .text section begins
>>> from 0xfff8000, but I haven't find this value in u-boot.lds?
>>> So it must be specified in some other place, right?
>> See board/<name>/config.mk
>>
> I see that, so you mean linker will read TEXT_BASE from config.mk.
> Can I specify its value in u-boot.lds?
Sure, of course you can. But you must ensure when CPU boots up, it can
find the correct entrance.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-05  1:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03  6:35 [U-Boot] how compilor know where .text section starts from? hank.peng
2008-12-03 11:49 ` Wolfgang Denk
2008-12-03 12:26   ` hank peng
2008-12-05  1:30     ` chen gong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox