# Custom linker entry in bareboard runtime

**URL:** <https://forum.ada-lang.io/t/custom-linker-entry-in-bareboard-runtime/4932>\
**Category:** General\
**Created:** [November 10, 2026, 10:43pm UTC](https://forum.ada-lang.io/t/custom-linker-entry-in-bareboard-runtime/4932 "2026-11-10T22:43:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidisyom](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/s/5fc32e/32.png) [@sidisyom](https://forum.ada-lang.io/u/sidisyom)\
**Post date:** [November 10, 2026, 10:43pm UTC](https://forum.ada-lang.io/t/custom-linker-entry-in-bareboard-runtime/4932/1 "2026-11-10T22:43:39Z")

</div>

Entirely out of curiosity (no real use case) I am trying to declare and use a custom section in a `embedded-stm32f429disco` runtime (specifically a debug version of it) and am struggling a bit to have that custom section collected by the linker.

So, I have declared my new section (called `.my_section_data`) after the `.data` section in the existing linker script (specifically a copy of it inside `ld_user/common-ROM.ld`) as so:

 ![section_ld](https://forum.ada-lang.io/uploads/default/original/2X/e/e699adebeb66f0deab231ab2c2d21800c9f0b457.png)

Then taking some inspiration from the late Simon’s [work](https://github.com/simonjwright/FreeRTOS-Ada/blob/57a6d07dd033621adbd8117513c39f578c7e2027/esp32h2/adainclude/startup.adb#L39), I declared the following:

 ![driver_sub](https://forum.ada-lang.io/uploads/default/original/2X/1/17fce30afe2577d59d808e223df06dc55644b092.png)

with `Linker_Package_1` being:

 ![section_package](https://forum.ada-lang.io/uploads/default/original/2X/7/74859294177c822f69082aa85e70b521c7bd4db3.png)

When I run this on the board though it looks like my new section isn’t getting picked-up:

 ![gdb](https://forum.ada-lang.io/uploads/default/original/2X/8/80ed11cc6551578c454091b0e509fa21ea72c1b4.png)

where the new symbols have been exported ok and point to RAM but given the above linker script, I’d expect `MSE` to be bumped by 4 bytes after including `MySection_Data` in `Linker_Package_1`?

Am I largely missing something here? Is my new section getting garbage-collected? (i.e. do I need to `KEEP` it for some reason?)

Any thoughts?

Thanks!
