aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-11-12 13:25:30 +0100
committerRon Evans <[email protected]>2019-11-12 17:10:13 +0100
commitc6255e4d0a9f72b3094b3f34eecf036680b95874 (patch)
treed9f8a8de3e5277934b55100ae329426388a82682
parent8e6cb89ceb47ec031863b8edb0cc4002215acc43 (diff)
downloadtinygo-c6255e4d0a9f72b3094b3f34eecf036680b95874.tar.gz
tinygo-c6255e4d0a9f72b3094b3f34eecf036680b95874.zip
targets: explicitly mark the stack as NOLOAD
This prevents it from being of type PROGBITS in lld 9, it should always be NOBITS. It should fix the following error in lld 9: ROM segments are non-contiguous
-rw-r--r--targets/arm.ld2
-rw-r--r--targets/avr.ld2
-rw-r--r--targets/gameboy-advance.ld2
-rw-r--r--targets/riscv.ld2
4 files changed, 4 insertions, 4 deletions
diff --git a/targets/arm.ld b/targets/arm.ld
index 0d5c12f16..f1e82c570 100644
--- a/targets/arm.ld
+++ b/targets/arm.ld
@@ -19,7 +19,7 @@ SECTIONS
/* Put the stack at the bottom of RAM, so that the application will
* crash on stack overflow instead of silently corrupting memory.
* See: http://blog.japaric.io/stack-overflow-protection/ */
- .stack :
+ .stack (NOLOAD) :
{
. = ALIGN(4);
. += _stack_size;
diff --git a/targets/avr.ld b/targets/avr.ld
index 34c881f90..179267df3 100644
--- a/targets/avr.ld
+++ b/targets/avr.ld
@@ -17,7 +17,7 @@ SECTIONS
*(.rodata.*)
}
- .stack :
+ .stack (NOLOAD) :
{
. += _stack_size;
_stack_top = .;
diff --git a/targets/gameboy-advance.ld b/targets/gameboy-advance.ld
index 490f81920..5fd516964 100644
--- a/targets/gameboy-advance.ld
+++ b/targets/gameboy-advance.ld
@@ -32,7 +32,7 @@ SECTIONS
/* Put the stack at the bottom of RAM, so that the application will
* crash on stack overflow instead of silently corrupting memory.
* See: http://blog.japaric.io/stack-overflow-protection/ */
- .stack :
+ .stack (NOLOAD) :
{
. = ALIGN(4);
. += _stack_size;
diff --git a/targets/riscv.ld b/targets/riscv.ld
index 857d2ee48..1e086e537 100644
--- a/targets/riscv.ld
+++ b/targets/riscv.ld
@@ -13,7 +13,7 @@ SECTIONS
/* Put the stack at the bottom of RAM, so that the application will
* crash on stack overflow instead of silently corrupting memory.
* See: http://blog.japaric.io/stack-overflow-protection/ */
- .stack :
+ .stack (NOLOAD) :
{
. = ALIGN(4);
. += _stack_size;