# HG changeset patch # User Mychaela Falconia # Date 1532115385 0 # Node ID 32bcc299ef5524f63d0cae66ca8dd1c32ad69b74 # Parent 92fde62400ef677235cc358834653c23c446f575 gcc/ld-script.src: additional polish diff -r 92fde62400ef -r 32bcc299ef55 gcc/ld-script.src --- a/gcc/ld-script.src Fri Jul 20 18:21:46 2018 +0000 +++ b/gcc/ld-script.src Fri Jul 20 19:36:25 2018 +0000 @@ -39,8 +39,11 @@ __romswitch_size = SIZEOF(bootrom.switch); ')dnl +define(`INTTEXT_BASE_ADDR', + ifelse(Buildmem,FLASH,FLASHIMAGE_BASE_ADDR,`/* no fixed address */'))dnl + /* boot entry code, going into flash or XRAM emulating flash */ - .inttext : { + .inttext INTTEXT_BASE_ADDR : { *(.inttext) } > Buildmem @@ -118,22 +121,24 @@ __extbss_start = ADDR(ext.bss); __extbss_size = SIZEOF(ext.bss); - .stack (NOLOAD) : { - /* Leave 20 32bit words for register pushes. */ - . = ALIGN(8); - . += 20 * 4; + int.stack (NOLOAD) : ALIGN(8) { + /* Beginning of stacks and heap area - 2.75 kbytes (int.s) */ + _Stack_segment_start = .; + . += 0xB00; + _Stack_segment_end = .; + _iram_end = .; + } > IRAM + + ext.stack (NOLOAD) : ALIGN(8) { /* Stack for abort and/or undefined modes. */ + . += 512; _Except_Stack_SP = .; /* Leave 38 32bit words for state saving on exceptions. */ xdump_buffer = .; . += 38 * 4; - . = ALIGN(8); - /* Beginning of stacks and heap area - 2.75 kbytes (int.s) */ - _Stack_segment_start = .; - . += 0xB00; - _Stack_segment_end = .; + _xram_end = .; } > XRAM }