[rtems-docs commit] c-user: Fix linker set code blocks

Sebastian Huber sebh at rtems.org
Wed Feb 15 14:52:08 UTC 2017


Module:    rtems-docs
Branch:    master
Commit:    51392ac0df59cc62746495b5b0db9bc5affb2c04
Changeset: http://git.rtems.org/rtems-docs/commit/?id=51392ac0df59cc62746495b5b0db9bc5affb2c04

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Feb 15 15:51:51 2017 +0100

c-user: Fix linker set code blocks

---

 c-user/linker_sets.rst | 25 +++++++++++++------------
 1 file 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 );



More information about the vc mailing list