This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Placing section at end of memory region

Hello list,

I'm currently stuggling with a linker script on arm-none-eabi with
binutils 2.21.1. I'm trying to place an array at the end of a memory
region, specifically I want to align the ".stack" section to the end of
SRAM my target offers.

The problem is "skipping" memory, which doesn't yield the results I
expect it to yield. After my data and bss segment definitions, I have:

. = __ramend - 256;
.stack (NOLOAD) : {
	__stacktop = .;
	. = ALIGN(4);
	. = ALIGN(4);*/
	__stack = .;

The "__ramend" (absolute) definition is placed where I expect it to be.
However, __stacktop in my case is not at the end of SRAM, but right
after .bss (i.e. __bss_end__ == __stacktop and __stacktop + 256 ==

The statement ". = __ramend - 256;" doesn't seem to have the effect that
I'd expect it to have (i.e. advancing the current location to 256 bytes
before the end of the SRAM region). Results are exactly the same, no
matter if I have it in or comment it out.

Can you please give me clues on how to modify the script to do what I
want it to do?

Thanks in advance,
Best regards,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]