source: rtems/testsuites/sptests/spsysinit01/Makefile.am @ d0c39838

5
Last change on this file since d0c39838 was d0c39838, checked in by Sebastian Huber <sebastian.huber@…>, on 09/22/15 at 14:21:12

Use linker set for system initialization

Make rtems_initialize_data_structures(),
rtems_initialize_before_drivers() and rtems_initialize_device_drivers()
static. Rename rtems_initialize_start_multitasking() to
rtems_initialize_executive() and call the registered system
initialization handlers in this function. Add system initialization API
available via #include <rtems/sysinit.h>. Update the documentation
accordingly.

This is no functional change, only the method to call the existing
initialization routines changes. Instead of direct function calls a
table of function pointers contained in the new RTEMS system
initialization linker set is used. This table looks like this (the
actual addresses depend on the target).

nm *.exe | grep _Linker | sort
0201a2d0 D _Linker_setSysinit_begin
0201a2d0 D _Linker_set
Sysinit_bsp_work_area_initialize
0201a2d4 D _Linker_setSysinit_bsp_start
0201a2d8 D _Linker_set
Sysinit_rtems_initialize_data_structures
0201a2dc D _Linker_setSysinit_bsp_libc_init
0201a2e0 D _Linker_set
Sysinit_rtems_initialize_before_drivers
0201a2e4 D _Linker_setSysinit_bsp_predriver_hook
0201a2e8 D _Linker_set
Sysinit_rtems_initialize_device_drivers
0201a2ec D _Linker_setSysinit_bsp_postdriver_hook
0201a2f0 D _Linker_set
Sysinit_end

Add test sptests/spsysinit01.

Update #2408.

  • Property mode set to 100644
File size: 540 bytes
Line 
1rtems_tests_PROGRAMS = spsysinit01
2spsysinit01_SOURCES = init.c
3
4dist_rtems_tests_DATA = spsysinit01.scn spsysinit01.doc
5
6include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
7include $(top_srcdir)/../automake/compile.am
8include $(top_srcdir)/../automake/leaf.am
9
10AM_CPPFLAGS += -I$(top_srcdir)/../support/include
11
12LINK_OBJS = $(spsysinit01_OBJECTS)
13LINK_LIBS = $(spsysinit01_LDLIBS)
14
15spsysinit01$(EXEEXT): $(spsysinit01_OBJECTS) $(spsysinit01_DEPENDENCIES)
16        @rm -f spsysinit01$(EXEEXT)
17        $(make-exe)
18
19include $(top_srcdir)/../automake/local.am
Note: See TracBrowser for help on using the repository browser.