summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-15 15:51:51 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-15 15:51:51 +0100
commit51392ac0df59cc62746495b5b0db9bc5affb2c04 (patch)
treef866f6f5312f061b5a39ca39c53b90eddc6d0a82
parentc-user: Document linker set content (diff)
downloadrtems-docs-51392ac0df59cc62746495b5b0db9bc5affb2c04.tar.bz2
c-user: Fix linker set code blocks
-rw-r--r--c-user/linker_sets.rst25
1 files changed, 13 insertions, 12 deletions
diff --git a/c-user/linker_sets.rst b/c-user/linker_sets.rst
index 9405c75..f6f250e 100644
--- a/c-user/linker_sets.rst
+++ b/c-user/linker_sets.rst
@@ -92,11 +92,11 @@ section descriptions.
/* To be placed in a read-only memory region */
.rtemsroset : {
- KEEP (*(SORT(.rtemsroset.*)))
+ KEEP (*(SORT(.rtemsroset.*)))
}
/* To be placed in a read-write memory region */
.rtemsrwset : {
- KEEP (*(SORT(.rtemsrwset.*)))
+ KEEP (*(SORT(.rtemsrwset.*)))
}
The ``KEEP()`` ensures that a garbage collection by the linker will not discard
@@ -436,7 +436,7 @@ NOTES:
#include <rtems/linkersets.h>
typedef struct {
- int foo;
+ int foo;
} xyz_item;
/* The XYZ-order defines */
@@ -445,10 +445,10 @@ NOTES:
/* Defines an ordered XYZ-item */
#define XYZ_ITEM( item, order ) \
- enum { xyz_##item = order - order }; \
- RTEMS_LINKER_ROSET_ITEM_ORDERED( \
- xyz, const xyz_item *, item, order \
- ) = { &item }
+ enum { xyz_##item = order }; \
+ RTEMS_LINKER_ROSET_ITEM_ORDERED( \
+ xyz, const xyz_item *, item, order \
+ ) = { &item }
/* Example item */
static const xyz_item some_item = { 123 };
@@ -636,7 +636,7 @@ NOTES:
#include <rtems/linkersets.h>
typedef struct {
- int foo;
+ int foo;
} xyz_item;
/* The XYZ-order defines */
@@ -645,10 +645,11 @@ NOTES:
/* Defines an ordered XYZ-item */
#define XYZ_ITEM( item, order ) \
- enum { xyz_##item = order - order }; \
- RTEMS_LINKER_RWSET_ITEM_ORDERED( \
- xyz, const xyz_item *, item, order \
- ) = { &item }
+ enum { xyz_##item = order }; \
+ RTEMS_LINKER_RWSET_ITEM_ORDERED( \
+ xyz, const xyz_item *, item, order \
+ ) = { &item }
+
/* Example item */
static const xyz_item some_item = { 123 };
XYZ_ITEM( some_item, XYZ_ORDER_FIRST );