On 09/12/15 13:48, Sebastian Huber wrote:


On 08/12/15 21:10, Sebastian Huber wrote:


----- 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 already identified some problems. I will fix this tomorrow since building all BSPs takes some time (I rebuilt the 4.12 tool chains for all targets today).

I built all BSPs with the attached patch to check if the RTEMS linker set descriptions in the linker command file are all right. I am now quite confident that all issues are fixed and no BSP is broken due to this change.

Some BSPs (e.g. bfin) place the read-write data before the read-only data. I checked them by hand.

Some PowerPCs have a general linker error unrelated to the linker sets.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

>From 7f651c745a7a3f558a3ccae58352fb9430b3e703 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..fe27939 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 | sed 's%__Linker%_Linker%' | 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
-- 
1.8.4.5

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to