[rtems-libbsd commit] linkersets.h: Add necessary macros from rtems 4.12.

Sebastian Huber sebh at rtems.org
Wed Aug 3 12:44:14 UTC 2016


Module:    rtems-libbsd
Branch:    4.11
Commit:    881135bd640ee2df918b57003d693afa56aebb52
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=881135bd640ee2df918b57003d693afa56aebb52

Author:    Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date:      Wed Aug  3 08:41:09 2016 +0200

linkersets.h: Add necessary macros from rtems 4.12.

---

 rtemsbsd/include/rtems/linkersets.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/rtemsbsd/include/rtems/linkersets.h b/rtemsbsd/include/rtems/linkersets.h
index 47c210d..c4f7612 100644
--- a/rtemsbsd/include/rtems/linkersets.h
+++ b/rtemsbsd/include/rtems/linkersets.h
@@ -21,6 +21,25 @@
 extern "C" {
 #endif /* __cplusplus */
 
+/**
+ * @brief Instructs the compiler to place a specific variable or function in
+ * the specified section.
+ */
+#if defined(__GNUC__)
+  #define RTEMS_SECTION( _section ) __attribute__((__section__(_section)))
+#else
+  #define RTEMS_SECTION( _section )
+#endif
+
+/**
+ * @brief Instructs the compiler that a specific variable or function is used.
+ */
+#if defined(__GNUC__)
+  #define RTEMS_USED __attribute__((__used__))
+#else
+  #define RTEMS_USED
+#endif
+
 #define RTEMS_LINKER_SET_BEGIN( set ) \
   _Linker_set_##set##_begin
 



More information about the vc mailing list