#2979 assigned defect

Load rap files failure with zeroed sections

Reported by: Serg Kruglov Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: lib/dl Version:
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 (7)

comment:1 Changed on 04/05/17 at 08:44:28 by Serg Kruglov

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

comment:2 Changed on 05/11/17 at 07:31:02 by Sebastian Huber


comment:3 Changed on 11/09/17 at 06:27:14 by Sebastian Huber


Milestone renamed

comment:4 Changed on 10/14/18 at 20:28:22 by Chris Johns

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

comment:5 Changed on 11/13/18 at 06:08:34 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 12/12/19 at 23:31:32 by Chris Johns

Milestone: 5.16.1

comment:7 Changed on 11/29/22 at 21:33:55 by Chris Johns

Milestone: 6.1Indefinite
Owner: changed from Chris Johns to Needs Funding
Status: acceptedassigned
Version: 5
Note: See TracTickets for help on using tickets.