diff options
| author | Ian McIntyre <ianpmcintyre@gmail.com> | 2023-02-11 16:35:32 -0500 |
|---|---|---|
| committer | Ian McIntyre <ianpmcintyre@gmail.com> | 2023-03-25 14:51:08 -0400 |
| commit | e1fddd5b3b678c43ee59835d7b57bbc063a22d28 (patch) | |
| tree | 405cbe80197d44234fbdced32698c3f849a9408f /src/host | |
| parent | 83a3ff31a0c7078fb090f9e767e0a3b050f74542 (diff) | |
Generate one linker script; add unit tests
We can still maintain individual linker script components, then write
them into one, larger linker script. We're effectively implementing the
same behavior as INCLUDE while disallowing overrides of the linker
search path to find the INCLUDEd files.
Once we have one linker script, we can refactor for easier unit testing.
This commit adds simple unit tests for the default builder, and some of
the expected errors.
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/imxrt-boot-header.x | 5 | ||||
| -rw-r--r-- | src/host/imxrt-link.x | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/host/imxrt-boot-header.x b/src/host/imxrt-boot-header.x index 67355a2..296eff5 100644 --- a/src/host/imxrt-boot-header.x +++ b/src/host/imxrt-boot-header.x @@ -1,4 +1,5 @@ -/* This extra file is injected into imxrt-memory.x depending on the +/* ===--- Begin imxrt-boot-header.x ---=== + * This extra content is injected into the linker script depending on the * runtime configuration. */ @@ -71,3 +72,5 @@ SECTIONS . = ORIGIN(FLASH) + 0x2000; /* Reserve the remaining 8K as a convenience for a non-XIP boot. */ } > FLASH } + +/* ===--- End imxrt-boot-header.x ---=== */ diff --git a/src/host/imxrt-link.x b/src/host/imxrt-link.x index 272ffd8..d02a170 100644 --- a/src/host/imxrt-link.x +++ b/src/host/imxrt-link.x @@ -1,12 +1,8 @@ -/* - * This linker script is a fork of the default linker script provided by +/* ===--- Begin imxrt-link.x ---=== + * This section of the linker script is a fork of the default linker script provided by * imxrt-rt, version 0.7.1. It's modified to support the needs of imxrt-rt. */ -/* Provides information about the memory layout of the device */ -/* This will be provided by the build script that uses imxrt-rt. */ -INCLUDE imxrt-memory.x - /* # Entry point = reset vector */ EXTERN(__RESET_VECTOR); EXTERN(Reset); @@ -196,3 +192,5 @@ Dynamic relocations are not supported. If you are linking to C code compiled usi the 'cc' crate then modify your build script to compile the C code _without_ the -fPIC flag. See the documentation of the `cc::Build.pic` method for details."); /* Do not exceed this mark in the error messages above | */ + +/* ===--- End imxrt-link.x ---=== */ |
