score: Fix linker sets on small data area targets

Update #3865.
This commit is contained in:
Sebastian Huber
2020-02-06 15:19:35 +01:00
parent bba1475bc5
commit 9fac9f93a5
2 changed files with 14 additions and 5 deletions
+13 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
* Copyright (c) 2015, 2020 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Dornierstr. 4
@@ -37,8 +37,13 @@ extern "C" {
type const RTEMS_LINKER_SET_END( set )[ 0 ] \
RTEMS_SECTION( ".rtemsroset." #set ".end" ) RTEMS_USED
#define RTEMS_LINKER_ROSET_ITEM_ORDERED_DECLARE( set, type, item, order ) \
type const _Linker_set_##set##_##item \
RTEMS_SECTION( ".rtemsroset." #set ".content.0." RTEMS_XSTRING( order ) )
#define RTEMS_LINKER_ROSET_ITEM_DECLARE( set, type, item ) \
extern type const _Linker_set_##set##_##item
extern type const _Linker_set_##set##_##item \
RTEMS_SECTION( ".rtemsroset." #set ".content.1" )
#define RTEMS_LINKER_ROSET_ITEM_REFERENCE( set, type, item ) \
static type const * const _Set_reference_##set##_##item \
@@ -68,8 +73,13 @@ extern "C" {
type RTEMS_LINKER_SET_END( set )[ 0 ] \
RTEMS_SECTION( ".rtemsrwset." #set ".end" ) RTEMS_USED
#define RTEMS_LINKER_RWSET_ITEM_ORDERED_DECLARE( set, type, item, order ) \
extern type _Linker_set_##set##_##item \
RTEMS_SECTION( ".rtemsrwset." #set ".content.0." RTEMS_XSTRING( order ) )
#define RTEMS_LINKER_RWSET_ITEM_DECLARE( set, type, item ) \
extern type _Linker_set_##set##_##item
extern type _Linker_set_##set##_##item \
RTEMS_SECTION( ".rtemsrwset." #set ".content.1" )
/*
* The .rtemsroset is here not a typo. We must ensure that the references are
+1 -2
View File
@@ -57,8 +57,7 @@ RTEMS_LINKER_RWSET_DECLARE( _Per_CPU_Data, char );
* @param item The designator of the item.
*/
#define PER_CPU_DATA_ITEM_DECLARE( type, item ) \
RTEMS_LINKER_RWSET_ITEM_DECLARE( _Per_CPU_Data, type, item ) \
RTEMS_SECTION( ".rtemsrwset._Per_CPU_Data.content.1" )
RTEMS_LINKER_RWSET_ITEM_DECLARE( _Per_CPU_Data, type, item )
/**
* @brief Defines a per-CPU item of the specified type.