#2979 accepted defect

Load rap files failure with zeroed sections

Reported by: Serg Kruglov Owned by: Chris Johns
Priority: normal Milestone: 6.1
Component: lib/dl Version: 5
Severity: major Keywords:
Cc: Blocked By:


After patch "libdl: Add C++ exception support to loaded modules." (ticket 2767 Chris Johns <chrisj@…> 2016-12-13 22:07:16 (UTC))
in function rtems_rtl_obj_add_section sections with size == 0 not added to sections list for relocate. In function rtems_rtl_rap_relocate for this sectiions generate error "no target section found".
The introduction of the condition "size > 0" in rtems_rtl_obj_add_section was a mistake.
I use rap files and plain C (.ctor and .dtor have size == 0).

Change History (6)

comment:1 Changed on Apr 5, 2017 at 8:44:28 AM by Serg Kruglov

Component: Generallibdl
Owner: set to chrisj@…
Severity: normalmajor

comment:2 Changed on May 11, 2017 at 7:31:02 AM by Sebastian Huber


comment:3 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber


Milestone renamed

comment:4 Changed on Oct 14, 2018 at 8:28:22 PM by Chris Johns

Owner: changed from chrisj@… to Chris Johns
Status: newaccepted

comment:5 Changed on Nov 13, 2018 at 6:08:34 AM by Chris Johns

The size > 0 in rtems_rtl_obj_add_section is correct and will not reverted. An empty section serves no purpose other than using memory.

If the code is built with separate text and data section then this is a separate issue.

comment:6 Changed on Dec 12, 2019 at 11:31:32 PM by Chris Johns

Milestone: 5.16.1
Note: See TracTickets for help on using tickets.