#4683 closed defect (invalid)

Leaked BSP section flags in Makefile.inc breaks EPICS

Reported by: Chris Johns Owned by:
Priority: normal Milestone: 5.2
Component: build Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Chris Johns)

RTEMS 5 added -ffunction-sections -fdata-sections to the target flags for BSPs in an architecture that supports code and data sections.

Some EPICS code such as the NTP have code the linker does not link into the final executable. The data sections means the done variable is not linked into the executable when a function in the module is referenced.

RTEMS 6 only exports the ABI flags and any internal build flags are not exported.

EPICS should also review this type of code because it excludes potential optimizations.

Change History (3)

comment:1 Changed on 07/21/22 at 05:52:08 by Chris Johns

Description: modified (diff)

comment:2 Changed on 07/21/22 at 14:26:42 by Joel Sherrill

This is not a good code pattern to use if per item sectioning is used. There is no reference to the variable done at all and no reason for it to be included. Why not just call an explicit initialization method?

comment:3 Changed on 11/09/22 at 22:39:30 by Chris Johns

Resolution: invalid
Status: newclosed

This topic has been discussed in an EPICS github issue #288 and Michael thinks the flags are fine. Further testing has shown no real issue. I will set this ticket to invalid and close it. It can be reopened if it is a problem.

Note: See TracTickets for help on using tickets.