From c6255e4d0a9f72b3094b3f34eecf036680b95874 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Tue, 12 Nov 2019 13:25:30 +0100 Subject: [PATCH] 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 --- targets/arm.ld | 2 +- targets/avr.ld | 2 +- targets/gameboy-advance.ld | 2 +- targets/riscv.ld | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/arm.ld b/targets/arm.ld index 0d5c12f1..f1e82c57 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 34c881f9..179267df 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 490f8192..5fd51696 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 857d2ee4..1e086e53 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;