diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-25 10:39:19 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-25 11:32:18 +0100 |
commit | 234d155e879d7ca72fa5dd9d29a8347fa294676e (patch) | |
tree | 4425e4ab2a490e6789d63fc8af6f1e3158191d39 /cpukit/include | |
parent | Document RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION() (diff) | |
download | rtems-234d155e879d7ca72fa5dd9d29a8347fa294676e.tar.bz2 |
linkersets: Revert to zero-length arrays
This partially reverts commit 7ec08391fee73d7a25855089f4996f3c4f448007.
Since the RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION() cannot control the
alignment of the symbol it cannot be used to define the begin of a
linker set. File scope basic __asm__ statements cannot have operands,
so there is no way to specify the desired alignment.
Diffstat (limited to '')
-rw-r--r-- | cpukit/include/rtems/linkersets.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/cpukit/include/rtems/linkersets.h b/cpukit/include/rtems/linkersets.h index 4a23d7a696..614670338c 100644 --- a/cpukit/include/rtems/linkersets.h +++ b/cpukit/include/rtems/linkersets.h @@ -32,15 +32,10 @@ extern "C" { extern type const RTEMS_LINKER_SET_END( set )[] #define RTEMS_LINKER_ROSET( set, type ) \ - RTEMS_LINKER_ROSET_DECLARE( set, type ); \ - RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( \ - RTEMS_LINKER_SET_BEGIN( set ), \ - ".rtemsroset." #set ".begin" \ - ); \ - RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( \ - RTEMS_LINKER_SET_END( set ), \ - ".rtemsroset." #set ".end" \ - ) + type const RTEMS_LINKER_SET_BEGIN( set )[ 0 ] \ + RTEMS_SECTION( ".rtemsroset." #set ".begin" ) RTEMS_USED; \ + type const RTEMS_LINKER_SET_END( set )[ 0 ] \ + RTEMS_SECTION( ".rtemsroset." #set ".end" ) RTEMS_USED #define RTEMS_LINKER_ROSET_ITEM_DECLARE( set, type, item ) \ extern type const _Linker_set_##set##_##item @@ -68,15 +63,10 @@ extern "C" { extern type RTEMS_LINKER_SET_END( set )[] #define RTEMS_LINKER_RWSET( set, type ) \ - RTEMS_LINKER_RWSET_DECLARE( set, type ); \ - RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( \ - RTEMS_LINKER_SET_BEGIN( set ), \ - ".rtemsrwset." #set ".begin" \ - ); \ - RTEMS_DEFINE_GLOBAL_SYMBOL_IN_SECTION( \ - RTEMS_LINKER_SET_END( set ), \ - ".rtemsrwset." #set ".end" \ - ) + type RTEMS_LINKER_SET_BEGIN( set )[ 0 ] \ + RTEMS_SECTION( ".rtemsrwset." #set ".begin" ) RTEMS_USED; \ + type RTEMS_LINKER_SET_END( set )[ 0 ] \ + RTEMS_SECTION( ".rtemsrwset." #set ".end" ) RTEMS_USED #define RTEMS_LINKER_RWSET_ITEM_DECLARE( set, type, item ) \ extern type _Linker_set_##set##_##item |