Confirm the section is really being dropped, not misplaced. Build with a map file (for example -Wl,-Map=map.txt in the linker switches) and look for the custom section in it. Success check: the output section is listed at size 0, or the input section appears under Discarded input sections, which proves garbage collection rather than an address problem.

Open the linker script (in the bareboard case a copy of ld_user/common-ROM.ld) and find the output section you added after .data, the one collecting the custom input section by name. Success check: the input section line is a plain wildcard match with no KEEP() around it, which matches the diagnosis.

Wrap that input section in KEEP() so the linker retains it even though nothing references it. Change the plain wildcard line for the section to the same line wrapped in KEEP, keeping the output section name, address, and any start/end symbols exactly as they were. Success check: the script diff is only the KEEP wrapper on that one line.

Rebuild from clean so the linker script change is actually picked up (a stale object or cached link can hide it). Success check: the build reruns the link step with the edited script.

Check the map file again. Success check: the custom output section now has its real size (4 bytes for a single 4-byte object), it is no longer in the discarded list, and the section end symbol has advanced by that size.

Verify on the board in gdb: print the end symbol again. Success check: MSE now reads 4 bytes higher than the run without the custom object (0x20000838 in the original STM32F429 Disco case instead of 0x20000834), and the custom object reads back its initialised value.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_2WScAjM1KgmXj_C2QNaiBg/versions/skv_NqfB_loVQ-PUKlqKnguJbw>
- Canonical HTML skill page: <https://vectle.com/skills/skl_2WScAjM1KgmXj_C2QNaiBg>
- Current Markdown URL: <https://vectle.com/skills/skl_2WScAjM1KgmXj_C2QNaiBg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
