aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cortex-m-rt/Cargo.toml2
-rw-r--r--cortex-m-rt/link.x42
2 files changed, 4 insertions, 40 deletions
diff --git a/cortex-m-rt/Cargo.toml b/cortex-m-rt/Cargo.toml
index 1b61917..5086034 100644
--- a/cortex-m-rt/Cargo.toml
+++ b/cortex-m-rt/Cargo.toml
@@ -7,7 +7,7 @@ keywords = ["arm", "cortex-m", "runtime", "startup"]
license = "MIT OR Apache-2.0"
name = "cortex-m-rt"
repository = "https://github.com/japaric/cortex-m-rt"
-version = "0.3.15"
+version = "0.4.0"
[dependencies]
cortex-m = "0.3.0"
diff --git a/cortex-m-rt/link.x b/cortex-m-rt/link.x
index 4eaa8be..a87a880 100644
--- a/cortex-m-rt/link.x
+++ b/cortex-m-rt/link.x
@@ -12,7 +12,7 @@ EXTERN(EXCEPTIONS);
object file that's passed to the linker *before* this crate */
EXTERN(INTERRUPTS);
-PROVIDE(_stack_start = ORIGIN(RAM) + LENGTH(RAM));
+_stack_start = ORIGIN(RAM) + LENGTH(RAM);
SECTIONS
{
@@ -48,20 +48,6 @@ SECTIONS
. = ALIGN(4);
} > FLASH
- /* limits of the .stack region */
- _estack = _stack_start;
- /* HACK the `true` case indicates that two RAM regions are being used and
- /* that the stack was placed in the second region. In that case we don't know
- /* the size of the second RAM region, or its start address, so we just assume
- /* its zero sized */
- _sstack = _stack_start < ORIGIN(RAM)? _stack_start : ORIGIN(RAM);
-
- /* fictitious region that represents the memory available for the stack */
- .stack _sstack (INFO) : ALIGN(4)
- {
- . += (_estack - _sstack);
- }
-
PROVIDE(_sbss = ORIGIN(RAM));
.bss _sbss : ALIGN(4)
{
@@ -81,15 +67,10 @@ SECTIONS
PROVIDE(_heap_size = 0);
+ /* The heap starts right after the .bss + .data section ends */
_sheap = _edata;
_eheap = _sheap + _heap_size;
- /* fictitious region that represents the memory available for the heap */
- .heap _sheap (INFO) : ALIGN(4)
- {
- . += _heap_size;
- }
-
/* fake output .got section */
/* Dynamic relocations are unsupported. This section is only used to detect
relocatable code in the input files and raise an error if relocatable code
@@ -101,26 +82,9 @@ SECTIONS
_egot = .;
} > RAM AT > FLASH
- /* The heap starts right after the .bss + .data section ends */
- _sheap = _edata;
-
- /* Due to an unfortunate combination of legacy concerns,
- toolchain drawbacks, and insufficient attention to detail,
- rustc has no choice but to mark .debug_gdb_scripts as allocatable.
- We really do not want to upload it to our target, so we
- remove the allocatable bit. Unfortunately, it appears
- that the only way to do this in a linker script is
- the extremely obscure "INFO" output section type specifier. */
- /* a rustc hack will force the program to read the first byte of this section,
- so we'll set the (fake) start address of this section to something we're
- sure can be read at runtime: the start of the .text section */
- .debug_gdb_scripts _stext (INFO) : {
- KEEP(*(.debug_gdb_scripts))
- }
-
/DISCARD/ :
{
- *(.ARM.exidx.*)
+ *(.ARM.exidx.*);
}
}