#2979 accepted defect

Load rap files failure with zeroed sections

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

Description

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 (5)

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

Milestone: 4.124.12.0

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

Milestone: 4.12.05.1

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.

Note: See TracTickets for help on using tickets.