[U-Boot] [PATCH 12/26] ARM: add relocation support

Albert ARIBAUD albert.aribaud at free.fr
Sat Sep 18 01:25:57 CEST 2010


Le 18/09/2010 00:42, Wolfgang Denk a écrit :
> Dear Albert ARIBAUD,
>
> In message<4C93E978.9010508 at free.fr>  you wrote:
>>
>>> u-boot.map for this board shows:
>>>
>>> ...
>>>    arch/powerpc/lib/cache.o(.text)
>>>    .text          0x40007c20       0x64 arch/powerpc/lib/cache.o
>>>                   0x40007c20                flush_cache
>>>                   0x00008000                . = DEFINED (env_offset)?env_offset:.
>>>    *fill*         0x40007c84      0x37c 00
>>>    common/env_embedded.o(.ppcenv)
>>>    .ppcenv        0x40008000     0x8000 common/env_embedded.o
>>>                   0x40008000                environment
>>>                   0x4000c000                redundand_environment
>>>    *(.text)
>>>    .text          0x40010000        0x4 common/env_embedded.o
>>>                   0x40010000                env_size
>>>    .text          0x40010004        0x0 lib/libgeneric.a(ctype.o)
>>> ...
>>>
>>> So we are "wasting" 0x37c = 892 bytes of memory for an unused gap.
>>> The last changes where the object placing had to be changed due to
>>> code size etc. were commit 32482be6 (Feb 19, 2009), and before that
>>> fe57bb19 (Sep 18, 2002). Having to tweak this file every 7 years or
>>> so is something I'm considering to be acceptable.  YMMV...
>>
>> This is a simple alignment. I do not need to align code, I need to map
>> *one* symbol, namely _start, at a given location, here 0xffff0000, so
>> that the 64 KB sector which contains start is not wasted and the image
>> resides in as few sectors as possible.
>
> And I map *one* symbol, namely environment, at a given location, here
> 0x40008000.
>
> It seems you are not willing or trying or able to understand. I give
> up here.

I *am* willing to understand, and *able* I think too; I believe I never 
expressed any doubt on your own will or ability to understand, and I 
would appreciate if you kept your doubts about me to yourself.

I still fail to see a mapping of _start at a given here, at least I fail 
to see a manual action to get there. Are we both talking about the 
boards/tqc/tqm8xx/u-boot.lds linker file? If so, then it places _start 
right at the beginning of the .text section (line 58 of the linker file) 
-- just like all linker files I saw so far -- and does the alignment 
trick on the location pointer later, at line 67, which aligns the 
location of env_embedded, not of _start.

Maybe the intent was to move env_embedded out of the sector where 
start.o et al. are put; but then, that is not what I am look for. I do 
not want to isolate _start within a given sector; I want to make sure it 
gets flashed at a given location, where it cannot end up if it was 
mapped at the beginning of the iagem, because the image is bigger than 
the space from the reset vector location to the end of the addressable 
space.

> Viele Grüße,
>
> Wolfgang Denk

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list