It's not really a question but a request to Nordic. Could you change the #ifdef lines in gcc_startup_nrf51.s to .ifdef. So:
.ifdef __STACK_SIZE
.else
.endif
and
.ifdef __HEAP_SIZE
.else
.endif
With this I can use -Wa,--defsym,__HEAP_SIZE=0 when I invoke gcc to compile the assembler. #ifdef does not work and I can't find it in the documentation of GNU as.
Thanks