From 51392ac0df59cc62746495b5b0db9bc5affb2c04 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 15 Feb 2017 15:51:51 +0100 Subject: 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 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 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 ); -- cgit v1.2.3