[RTEMS Project] #4683: Leaked BSP section flags in Makefile.inc breaks EPICS

RTEMS trac trac at rtems.org
Thu Jul 21 05:52:08 UTC 2022


#4683: Leaked BSP section flags in Makefile.inc breaks EPICS
-------------------------+---------------------
 Reporter:  Chris Johns  |       Owner:  (none)
     Type:  defect       |      Status:  new
 Priority:  normal       |   Milestone:  5.2
Component:  build        |     Version:  5
 Severity:  normal       |  Resolution:
 Keywords:               |  Blocked By:
 Blocking:               |
-------------------------+---------------------
Description changed by Chris Johns:

Old description:

> 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 [https://github.com/epics-base/epics-
> base/blob/7.0/modules/libcom/src/osi/os/RTEMS-score/osdTime.cpp#L148 NTP
> have code]. 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.

New description:

 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 [https://github.com/epics-base/epics-
 base/blob/7.0/modules/libcom/src/osi/os/RTEMS-score/osdTime.cpp#L148 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.

--

--
Ticket URL: <http://devel.rtems.org/ticket/4683#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list