zephyr/include/arch/posix/native_tasks.ld
Kumar Gala 4da0f8b796 linker: Remove unused (OPTIONAL) from linker scripts
(OPTIONAL) was a vestiage from the initial import of the Zephyr code
base and we dont utilize it with the GNU linker.  Additionally, the way
(OPTIONAL) gets defined to nothing creates a linker script that lld
(from llvm) doesn't like.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-15 06:42:02 -05:00

23 lines
567 B
Plaintext

/*
* Copyright (c) 2018 Oticon A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
#define NATIVE_INIT_LEVEL(level) \
__native_##level##_tasks_start = .; \
KEEP(*(SORT(.native_##level[0-9]_task))); \
KEEP(*(SORT(.native_##level[1-9][0-9]_task))); \
KEEP(*(SORT(.native_##level[1-9][0-9][0-9]_task))); \
SECTION_PROLOGUE (native_pre_tasks,,)
{
__native_tasks_start = .;
NATIVE_INIT_LEVEL(PRE_BOOT_1)
NATIVE_INIT_LEVEL(PRE_BOOT_2)
NATIVE_INIT_LEVEL(PRE_BOOT_3)
NATIVE_INIT_LEVEL(FIRST_SLEEP)
NATIVE_INIT_LEVEL(ON_EXIT)
__native_tasks_end = .;
}