[PATCH] score: Fix linker sets on small data area targets
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Feb 5 07:47:28 UTC 2020
Update #3865.
---
cpukit/include/rtems/linkersets.h | 16 +++++++++++++---
cpukit/include/rtems/score/percpudata.h | 3 +--
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/cpukit/include/rtems/linkersets.h b/cpukit/include/rtems/linkersets.h
index 614670338c..844130f0d4 100644
--- a/cpukit/include/rtems/linkersets.h
+++ b/cpukit/include/rtems/linkersets.h
@@ -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
diff --git a/cpukit/include/rtems/score/percpudata.h b/cpukit/include/rtems/score/percpudata.h
index 1961c323d4..ff6e517d0a 100644
--- a/cpukit/include/rtems/score/percpudata.h
+++ b/cpukit/include/rtems/score/percpudata.h
@@ -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.
--
2.16.4
More information about the devel
mailing list