----- Am 8. Dez 2015 um 16:03 schrieb Joel Sherrill <j...@rtems.org>:
> What BSPs/architectures have you tested? I will test the with the attached patch tomorrow on all BSPs. This patch adds a link time test to ticker. This test verifies that the linker command file modifications for the RTEMS linker sets are all right. I verified by hand that it detects a missing KEEP(), SORT() or section description. I think the linker set based initialization is very beneficial. For example with it we no longer need a build time option to disable/enable the POSIX API. We can enable it all the time with virtually no overhead for applications which don't use it.
From b9f91864e72418409e27c3a59704c47516a5b886 Mon Sep 17 00:00:00 2001 From: Sebastian Huber <sebastian.hu...@embedded-brains.de> Date: Tue, 8 Dec 2015 21:01:55 +0100 Subject: [PATCH] Hack: Link time test for linker sets --- testsuites/samples/ticker/Makefile.am | 2 ++ testsuites/samples/ticker/init.c | 8 ++++++++ testsuites/samples/ticker/linkersets.txt | 8 ++++++++ 3 files changed, 18 insertions(+) create mode 100644 testsuites/samples/ticker/linkersets.txt diff --git a/testsuites/samples/ticker/Makefile.am b/testsuites/samples/ticker/Makefile.am index 25c3764..c0b030a 100644 --- a/testsuites/samples/ticker/Makefile.am +++ b/testsuites/samples/ticker/Makefile.am @@ -18,5 +18,7 @@ LINK_LIBS = $(ticker_LDLIBS) ticker$(EXEEXT): $(ticker_OBJECTS) $(ticker_DEPENDENCIES) @rm -f ticker$(EXEEXT) $(make-exe) + $(NM) ticker$(EXEEXT) | grep _Linker_set | sort | cut -d ' ' -f 3 > actual-linkersets.txt + diff $(srcdir)/linkersets.txt actual-linkersets.txt include $(top_srcdir)/../automake/local.am diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c index 3f3cbd8..80f2fb4 100644 --- a/testsuites/samples/ticker/init.c +++ b/testsuites/samples/ticker/init.c @@ -6,6 +6,14 @@ * found in the file LICENSE in this distribution or at * http://www.rtems.org/license/LICENSE. */ +#include <rtems/linkersets.h> + +RTEMS_LINKER_ROSET_ITEM_ORDERED(test_ro, const int *, roo, 0); +RTEMS_LINKER_RWSET_ITEM_ORDERED(test_rw, const int *, rwo, 0); +RTEMS_LINKER_ROSET_ITEM(test_ro, const int *, rou); +RTEMS_LINKER_RWSET_ITEM(test_rw, const int *, rwu); +RTEMS_LINKER_RWSET(test_rw, const int *); +RTEMS_LINKER_ROSET(test_ro, const int *); #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/testsuites/samples/ticker/linkersets.txt b/testsuites/samples/ticker/linkersets.txt new file mode 100644 index 0000000..5f7dfb5 --- /dev/null +++ b/testsuites/samples/ticker/linkersets.txt @@ -0,0 +1,8 @@ +_Linker_set_test_ro_begin +_Linker_set_test_ro_roo +_Linker_set_test_ro_rou +_Linker_set_test_ro_end +_Linker_set_test_rw_begin +_Linker_set_test_rw_rwo +_Linker_set_test_rw_rwu +_Linker_set_test_rw_end -- 2.1.4
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel