LLD vs LD section type: PROGBITS vs NOBITS

Sadly this is an area of linker scripts that isn’t really covered by the documentation. The script says increase the location counter. Was the intent to have those padding bytes be read-only, read-write, bss? I’m not sure if there is enough information to know for sure.

From the information available in the script I think both GNU ld and LLD’s interpretations of increase the loction counter are reasonable. I think you can force LLD to use NOBITS by adding (NOLOAD)
For example:

    .stack (NOLOAD) : {
        . = 0x100;
    } > SRAM

My first post on discourse, so hopefully it formats OK.

Peter