Commit e9b7412
committed
ld: Reset linker '.' value after .ER_CODE_SRAM section
When processing the .ER_CODE_SRAM section, the location counter is set
to the VMA of that section, so after processing the next section will
use that VMA instead of the next available address in the FLASH
region.
Reset the location counter to the next available FLASH address after
processing this section will ensure that any subsequent FLASH data
is placed in the correct location.
This test fails without this patch:
$ west build -p -b lpcxpresso55s69/lpc55s69/cpu0/ns \
samples/synchronization -T sample.kernel.synchronization
.../ld: address 0x14003e84 of bin/tfm_s.axf section `.ER_TFM_CODE'
is not within region `FLASH'
.../ld: address 0x14005c20 of bin/tfm_s.axf section `.TFM_UNPRIV_CODE'
is not within region `FLASH'
.../ld: bin/tfm_s.axf section `.TFM_PSA_ROT_LINKER_DATA'
will not fit in region `FLASH'
.../ld: address 0x14003e84 of bin/tfm_s.axf section `.ER_TFM_CODE'
is not within region `FLASH'
.../ld: address 0x14005c20 of bin/tfm_s.axf section `.TFM_UNPRIV_CODE'
is not within region `FLASH'
.../ld: ERROR: CMSE stub (.gnu.sgstubs section) too far (0x10008540)
from destination (0x14003ee4)
Note that the linker is generating addresses within the CODE_RAM
memory region rather than the FLASH region.
Signed-off-by: Keith Packard <[email protected]>1 parent 8d8f341 commit e9b7412
File tree
6 files changed
+20
-0
lines changed- platform/ext
- common
- gcc
- llvm
- target
- arm/musca_b1/Device/Source
- gcc
- llvm
- rpi/rp2350
6 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
340 | 343 | | |
341 | 344 | | |
342 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
0 commit comments