[U-Boot-Users] How is av_[] referenced after relocation?

Hi u-boot buddies, I'm working on booting my little toy board based on mpc8248 with u-boot. When debugging the startup code, I found that u-boot-1.1.6/common/dlmalloc.c::av_[] is relocated during calling to relocate_code. The question is, how can the code after the relocation, says malloc_bin_reloc, reference av_[]? I suppose that av_[] is "static" and the symbol will be stripped when u-boot.bin is generated.
Thanks a lot.

In message Pine.LNX.4.64.0709191703480.3390@localhost.localdomain you wrote:
I'm working on booting my little toy board based on mpc8248 with u-boot. When debugging the startup code, I found that u-boot-1.1.6/common/dlmalloc.c::av_[] is relocated during calling to
Why are you using such ancient code?
relocate_code. The question is, how can the code after the relocation, says malloc_bin_reloc, reference av_[]?
Just as it was before. Kust thatthe addresses are now relocated.
I suppose that av_[] is "static" and the symbol will be stripped when u-boot.bin is generated.
Don't suppose things. Verify them.
Best regards,
Wolfgang Denk
participants (2)
-
Chen Xi
-
Wolfgang Denk