summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-10 08:41:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-10 08:43:28 +0200
commit2769554243c43eee9fd5066a5cd770ab89ec47a3 (patch)
tree45c291a750db0aa19a4a56b44a614ba9eb5bb85c /testsuites
parent93afcff7b5360fa71616d789c4d34279309a24e9 (diff)
downloadrtems-2769554243c43eee9fd5066a5cd770ab89ec47a3.tar.bz2
splinkersets01: Test linker sets in library
Make sure that the linker sets work if placed in a library (this is how they are used in RTEMS).
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/Makefile.am4
-rw-r--r--testsuites/sptests/splinkersets01/content.c (renamed from testsuites/sptests/splinkersets01/items.c)4
-rw-r--r--testsuites/sptests/splinkersets01/item-a.c21
-rw-r--r--testsuites/sptests/splinkersets01/item-ca.c21
4 files changed, 45 insertions, 5 deletions
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 8813d43513..8a9d968925 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -1943,7 +1943,9 @@ endif
if TEST_splinkersets01
sp_libs += libsplinkersets01.a
libsplinkersets01_a_SOURCES = splinkersets01/sets.c \
- splinkersets01/items.c
+ splinkersets01/content.c \
+ splinkersets01/item-a.c \
+ splinkersets01/item-ca.c
endif
noinst_PROGRAMS = $(sp_tests)
diff --git a/testsuites/sptests/splinkersets01/items.c b/testsuites/sptests/splinkersets01/content.c
index 3072c64a7a..4de2827575 100644
--- a/testsuites/sptests/splinkersets01/items.c
+++ b/testsuites/sptests/splinkersets01/content.c
@@ -18,10 +18,6 @@
#include "splinkersets01.h"
-RTEMS_LINKER_RWSET_ITEM_ORDERED(test_rw, const int *, a1, 1) = &a[1];
-
-RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, ca2, OC) = &ca[2];
-
int content_rw_1;
char content_rw_2;
char content_rw_3;
diff --git a/testsuites/sptests/splinkersets01/item-a.c b/testsuites/sptests/splinkersets01/item-a.c
new file mode 100644
index 0000000000..30f81bf776
--- /dev/null
+++ b/testsuites/sptests/splinkersets01/item-a.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "splinkersets01.h"
+
+RTEMS_LINKER_RWSET_ITEM_ORDERED(test_rw, const int *, a1, 1) = &a[1];
diff --git a/testsuites/sptests/splinkersets01/item-ca.c b/testsuites/sptests/splinkersets01/item-ca.c
new file mode 100644
index 0000000000..23937db925
--- /dev/null
+++ b/testsuites/sptests/splinkersets01/item-ca.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2015, 2016 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "splinkersets01.h"
+
+RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, ca2, OC) = &ca[2];