[rtems commit] score: Fix linker sets on small data area targets
Sebastian Huber
sebh at rtems.org
Thu Feb 6 14:22:13 UTC 2020
Module: rtems
Branch: master
Commit: 9fac9f93a5c6371f992e974c56a29da19149d9ae
Changeset: http://git.rtems.org/rtems/commit/?id=9fac9f93a5c6371f992e974c56a29da19149d9ae
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Feb 5 08:42:03 2020 +0100
score: Fix linker sets on small data area targets
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 6146703..844130f 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 1961c32..ff6e517 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.
More information about the vc
mailing list