summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/linkersets.h
diff options
context:
space:
mode:
Diffstat (limited to 'rtemsbsd/include/rtems/linkersets.h')
-rw-r--r--rtemsbsd/include/rtems/linkersets.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/rtemsbsd/include/rtems/linkersets.h b/rtemsbsd/include/rtems/linkersets.h
index 47c210db..c4f76122 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