1/*
2 * Copyright (c) 2023 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/**
8 * @file
9 * @brief Linker command/script file for the native simulator runner
10 */
11
12#define NSI_INIT_LEVEL(level)					\
13		__nsi_##level##_tasks_start = .;			\
14		KEEP(*(SORT(.nsi_##level[0-9]_task)));		\
15		KEEP(*(SORT(.nsi_##level[1-9][0-9]_task)));		\
16		KEEP(*(SORT(.nsi_##level[1-9][0-9][0-9]_task)));	\
17
18SECTIONS
19 {
20	nsi_tasks :
21	{
22		__nsi_tasks_start = .;
23		NSI_INIT_LEVEL(PRE_BOOT_1)
24		NSI_INIT_LEVEL(PRE_BOOT_2)
25		NSI_INIT_LEVEL(HW_INIT)
26		NSI_INIT_LEVEL(PRE_BOOT_3)
27		NSI_INIT_LEVEL(FIRST_SLEEP)
28		NSI_INIT_LEVEL(ON_EXIT_PRE)
29		NSI_INIT_LEVEL(ON_EXIT_POST)
30		__nsi_tasks_end = .;
31	}
32
33	nsi_hw_events :
34	{
35		__nsi_hw_events_start = .;
36		KEEP(*(SORT(.nsi_hw_event_[0-9])));		\
37		KEEP(*(SORT(.nsi_hw_event_[1-9][0-9])));	\
38		KEEP(*(SORT(.nsi_hw_event_[1-9][0-9][0-9])));
39		__nsi_hw_events_end = .;
40	}
41 } INSERT AFTER .data;
42
43/*
44 * Note this script augments the default host linker script
45 */
46