Hello
In the linker file, what does the ABS below mean? It seems to be an absolute address, but please explain in detail.
linker_flash_s32K312.ld
.ramcode ABS ALIGN(4) : > .
.data ALIGN(4) : > .
.mcal_data ALIGN(4) : > .
Thank you!
Solved! Go to Solution.
Hi @kjy106906
As said before, ABS indicates that section address cannot be relocated once it has been loaded to memory.
As the sections are mapped and aligned to a previously defined region, they should not overlap or interfere with each other.
Hi @kjy106906
ABS stands for absolute: not adjusted to any section address's relocation.
The absolute (un-moveable) symbols are there to support embedded development, where locating elements at absolute addresses in memory is required. Normally, such symbols would be produced only when cross-compiling for an embedded system, using C language extensions that allow the absolute address to be specified.
BR, VaneB
Thank you
I don't understand.
Ram code has ABS attached,
but can't the address change depending on the size of the bss above?
.standby_data ABS MAX_SIZE(0x8000) ALIGN(8) : > int_sram
.bss (NOLOAD) ALIGN(16) : > .
.mcal_bss (NOLOAD) ALIGN(16) : > .
__BSS_SRAM_END = align(4);
.ramcode ABS ALIGN(4) : > .
.data ALIGN(4) : > .
.mcal_data ALIGN(4) : > .
Hi @kjy106906
The ALIGN(n) instructs the compiler to align a variable on an n-byte boundary starting from the ORIGIN address. This just limits the location of a memory region to a certain n-byte size, this should not interfere with other memory regions as the memory region size does not exceed the n-byte boundary.
Thank you
I didn't understand.
As the bss variable is added,
doesn't the ramcode address get pushed out?
I wonder what the effect of ABS is here.
Hi @kjy106906
bss id defined as NOLOAD. The NOLOAD defines a section that is required to link the program properly but must not be loaded to memory. For example you may need to link your program with some code located in ROM, so you tell the linker to mark the code in ROM as NOLOAD. Then the tool that will load the program (a debugger, an OS or whatever) will not load this part of the code.
Sorry. I didn't understand.
Explaining with an example of .map file
case 1. standbyram size 0, bss size 16, mcal_bss size 0 -> ramcode address = 0x20400010
case 1. standbyram size 0, bss size 32, mcal_bss size 0 -> ramcode address = 0x20400020
In this case, the ramcode address changes, but I don't know what role ABS plays.
.standby_data ABS MAX_SIZE(0x8000) ALIGN(8) : > int_sram
.bss (NOLOAD) ALIGN(16) : > .
.mcal_bss (NOLOAD) ALIGN(16) : > .
__BSS_SRAM_END = align(4);
.ramcode ABS ALIGN(4) : > .
.data ALIGN(4) : > .
.mcal_data ALIGN(4) : > .
Hi @kjy106906
As said before, ABS indicates that section address cannot be relocated once it has been loaded to memory.
As the sections are mapped and aligned to a previously defined region, they should not overlap or interfere with each other.