Hello ,
I was just going through some linker scripts and could do with some
clarifications.
1 | .bss (NOLOAD) :
|
2 | {
|
3 | __bss_start = . ;
|
4 | __bss_start__ = . ;
|
5 | *(.bss)
|
6 | *(.bss.*)
|
7 | *(.gnu.linkonce.b*)
|
8 | *(COMMON)
|
9 | . = ALIGN(4);
|
10 | } > RAM
|
11 |
|
12 | . = ALIGN(4);
|
13 | __bss_end__ = . ;
|
14 | PROVIDE (__bss_end = .);
|
1).bss (NOLOAD) : is this strictly necessary ? I think just tells the
linker not to place this in ROM ? But if there is no >AT ROM , the
linker would not do it anyway.Is this redundant ,or is it required by
the gcc linker ?
2) __bss_start = . ;
_bss_start_ = . ;
Why are there 2 "labels" for the same location ? _bss_start_ is used
in the startup asm to zero the contents of .bss ,but I could not find
__bss_start used anywhere.
1 | .arm
|
2 | .section .STACK, "w"
|
3 | .align 3
|
4 | Stack_Mem:
|
5 | .space Stack_Size
|
6 | .equ Stack_Top, Stack_Mem + Stack_Size
|
4).align 3
Should it be .align 4 ? Align on a word boundary ?
TIA
Thomas