Notice: We have migrated to GitLab launching 2024-05-01 see here:

#4439 closed defect (fixed)

Open of /dev/console should only be in SysInit List if Console Enabled

Reported by: Joel Sherrill Owned by: Joel Sherrill <joel@…>
Priority: normal Milestone: 6.1
Component: rtems Version: 6
Severity: normal Keywords:
Cc: Blocked By:


The current code implicitly requires that the code to open /dev/console be included in the system initialization set anytime a dependency exists on the newlib reentrancy structure. This means that referencing errno pulls in at least open(), libio code, close(), atexit(), and unmount support.

This was shown to result in about 20K of text an 5K of data being included in powerpc/psim minimum.exe. A similar impact would happen on all BSPs.

Change History (1)

comment:1 Changed on 05/25/21 at 13:33:57 by Joel Sherrill <joel@…>

Owner: set to Joel Sherrill <joel@…>
Resolution: fixed
Status: newclosed

In [changeset:"76d5722b4a1adba2aa52043a83c7fa0fcff2a0d4/rtems" 76d5722b/rtems]:

sysinit: Do not open console when just referencing reentrancy structure.

This change eliminates a system initialization dependentcy which resulted
in an application without a file system or console referencing errno being
forced to include the code to open(/dev/console), close(), atexit(),
and the unmount infrastructure.

Closes #4439.

Note: See TracTickets for help on using tickets.