#3865 closed defect (fixed)

Fix linker set item declarations for small data area targets

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: score Version: 5
Severity: normal Keywords:
Cc: Blocked By:


Some targets (e.g. 32-bit PowerPC) have a small-data area. Linker set items are not in the small data area. We have to tell this the compiler, otherwise linker error may occur due to a mismatch of relocations. There are two options to do this.

  1. We can declare items as an array of unspecified size and define items as an array with one element. The problem with this is that it breaks existing code, e.g. an item initializer would have to change.
  1. We add the section to the declaration. The problem is that in this case we need a dedicated declaration macro for the ordered items.

Since item declarations are rarely used, we select option 2.

Change History (2)

comment:1 Changed on Feb 6, 2020 at 2:22:17 PM by Sebastian Huber <sebastian.huber@…>

In 9fac9f9/rtems:

score: Fix linker sets on small data area targets

Update #3865.

comment:2 Changed on Feb 6, 2020 at 2:24:21 PM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In a4b23d9/rtems-docs:

c-user: Document new linker set macros

Adjust copyright. Linker sets were introduced in 2015.

Update #2408.
Close #3865.

Note: See TracTickets for help on using tickets.