How to get the size of an input section (to place it at the end of memory)
Not exactly kosher, but after digging through the source code for GNU ld it looks like you can specify the address of section after it is defined. The following linker script should give you the desired behavior: MEMORY { ram (rwx) : ORIGIN = 0x10000, LENGTH = 0x0002000 } SECTIONS { .bss (NOLOAD) : { … Read more