RTEMS | Draft: Support for building RTEMS with LLVM toolchains (!1539)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Fri Oct 16 05:36:53 UTC 2026
Sebastian Huber commented on a discussion on cpukit/libdl/rtl-allocator.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1539#note_161208
> }
>
> if (eh_size != 0) {
> - *eh_base = rtems_rtl_alloc_new(rtems_rtl_alloc_eh_tag(), eh_size, false);
> + *eh_base = rtems_rtl_alloc_new(rtems_rtl_alloc_eh_tag(), eh_size, true);
I think this is a bug on `main` as well. `__register_frame()` reads the records until it finds a length of zero. The `.eh_frame` section of an object file has no such end record.
With `true`, the allocator clears the memory, so zero bytes follow the last record. These bytes exist only because `rtems_rtl_obj_set_sizes()` adds the alignment of the section to its size. Please add the 4 bytes of the end record to the size, so that the fix does not depend on the alignment.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1539#note_161208
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/6-du3zskzji4sikr5pt0fvt7hzw-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/20261016/f96e25d6/attachment.htm>
More information about the bugs
mailing list