RTEMS | bsps/powerpc: The sbrk policy default and the exception frames (#5702)

Sebastian Huber (@sebhub) gitlab at rtems.org
Mon Aug 17 02:23:43 UTC 2026



Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5702



`BSP_sbrk_policy` is an optional symbol which an application may define. No
application in the tree defines it, so the weak symbol resolves to address zero
and the unconditional dereference reads whatever resides there. On `psim` that
is the relocation word of the start code, which selects a policy of 139332
instead of the documented default.

The link scripts of the PowerPC BSPs which do not include the shared base
collect the exception frames without `KEEP()`, so `--gc-sections` removes the
terminating zero word and every throw ends in a fatal exception. `spfatal31`
also assumes a fatal source which does not apply to this architecture.

Found while running the full test suite on the PSIM simulator. This description
was created with Claude Code assistance.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5702
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-1el62np1erquycq80f4x9ehzv-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260817/947a2cce/attachment-0001.htm>


More information about the bugs mailing list