Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Problem with __bss_start in linker-script file

Problem with __bss_start in linker-script file

2005-09-13 by quantis02

Hello,
I have a problem with the __bss_start and __bss_end adresses. In the 
map-file from the linker the __bss_start exists twice. Here the 
mapfile: 


.bss            0x400002e0       0x64
                0x400002e0                __bss_start = .
                0x400002e0                __bss_start__ = .
 *(.bss)
 *(COMMON)
 COMMON         0x400002e0       0x64 blinky.o
                                  0x0 (size before relaxing)
                0x400002e0                timeval
                0x40000300                gamma
                0x40000320                beta
                0x40000340                alpha
                0x40000344                . = ALIGN (0x4)
                0x40000344                __bss_start = .
                0x40000344                __bss_start__ = .
 *(.bss)
 *(COMMON)
                0x40000344                . = ALIGN (0x4)
                0x40000344                . = ALIGN (0x4)
                0x40000344                __bss_end__ = .
                0x40000344                PROVIDE (__bss_end, .)

the four variables are global variables in blinky.c which should be 
set to zero in an assembler-routine. This routine uses the __bss_start 
 and __bss_end value, but it don't work, because __bss_start and 
__bss_end are the same.

Here is the linker-script of the .bss section:

    .bss :
  {
    __bss_start = . ;
    __bss_start__ = . ;
    *(.bss)
    *(COMMON)
    . = ALIGN(4);
  } > RAM

  . = ALIGN(4);
  __bss_end__ = . ;
  PROVIDE (__bss_end = .);

Thanks for your help,

Philipp

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.