Skip to contentSkip to conversation

coldfire, bss.variable offset greater than __bss_end

U-Boot Angelo Dureghello 1 participant 1 message Sep 9, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

after a recent update and compiling u-boot, bootloader get locked trying to set a global variable, just after sdram relocation.

Exactly, the program lock here:

1529 void mem_malloc_init(ulong start, ulong size) 1530 {
1531 mem_malloc_start = start; <<<---program paralize here

Tracing the variable offset in memory, i have seen this variable is located a little bit outside (higher address) of the total 16M SDRAM memory size.

Investigating further, in the map file, the issue seems to be that u-boot assign a memory space that is:

len = (ulong)&__bss_end__ - CONFIG_SYS_MONITOR_BASE;

But from the map file the variable seems to have an offset greater than __bss_end :

.bss.mem_malloc_start

                0xffc159c8        0x4
 .bss.mem_malloc_start
                0xffc159c8        0x4 common/libcommon.o
                0xffc159c8                mem_malloc_start

.....

.bss 0xffc13e00 0x1544

                0xffc13e00                _sbss = .
 *(.sbss)
 *(.bss)
 *(COMMON)
 COMMON         0xffc13e00        0x4 arch/m68k/lib/libm68k.o
                0xffc13e00                monitor_flash_len

u-boot.lds has been checked many times, i don't see any issue on it.

I am using this compiler:

m68k-elf-gcc --version
m68k-elf-gcc (GCC) 4.2.4
Copyright (C) 2007 Free Software Foundation, Inc.

Any help is really appreciated.

regards,
angelo