include/zephyr/linker/common-rom: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not need to support building the constructors and initialization arrarys in a way that support it. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
af750b2b41
commit
f5bc01beae
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: Apache-2.0 */
|
||||
|
||||
#if defined(CONFIG_TOOLCHAIN_SUPPORTS_STATIC_INIT_GNU) || defined(CONFIG_NATIVE_APPLICATION)
|
||||
#if defined(CONFIG_TOOLCHAIN_SUPPORTS_STATIC_INIT_GNU)
|
||||
SECTION_PROLOGUE(init_array,,)
|
||||
{
|
||||
/*
|
||||
@ -9,27 +9,16 @@
|
||||
* a length value first and NULL terminator, but we're creating
|
||||
* an init_array style list and leaving the ctors list empty
|
||||
*/
|
||||
#ifdef CONFIG_NATIVE_APPLICATION
|
||||
/* Use the native LIBC constructor code so that any native
|
||||
* constructors get run before main is invoked
|
||||
*/
|
||||
PLACE_SYMBOL_HERE(__init_array_start);
|
||||
#else
|
||||
PLACE_SYMBOL_HERE(__zephyr_init_array_start);
|
||||
#endif
|
||||
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*)
|
||||
SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||
KEEP (*(.init_array .ctors))
|
||||
#ifdef CONFIG_NATIVE_APPLICATION
|
||||
PLACE_SYMBOL_HERE(__init_array_end);
|
||||
#else
|
||||
PLACE_SYMBOL_HERE(__zephyr_init_array_end);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NATIVE_LIBC
|
||||
/*
|
||||
* The __CTOR_LIST__ and __CTOR_END__ symbols are always defined
|
||||
* to result in an empty list.
|
||||
* The __CTOR_LIST__ and __CTOR_END__ symbols are always defined
|
||||
* to result in an empty list.
|
||||
* Instead, Zephyr's start-up code uses the __zephyr_init_array_start__ and
|
||||
* __zephyr_init_array_end__ symbols.
|
||||
* In this way, in native_simulator based targets, the host glibc process
|
||||
@ -44,7 +33,6 @@
|
||||
LONG(0)
|
||||
#endif
|
||||
PLACE_SYMBOL_HERE(__CTOR_END__);
|
||||
#ifndef CONFIG_NATIVE_APPLICATION
|
||||
/*
|
||||
* Similar to the schenanigans required for the __CTOR_LIST__ and
|
||||
* __CTOR_END__ symbols we define __init_array_start and __init_array_end
|
||||
@ -53,11 +41,10 @@
|
||||
*/
|
||||
PLACE_SYMBOL_HERE(__init_array_start);
|
||||
PLACE_SYMBOL_HERE(__init_array_end);
|
||||
#endif
|
||||
#endif
|
||||
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
#if !defined(CONFIG_STATIC_INIT_GNU) && !defined(CONFIG_NATIVE_APPLICATION)
|
||||
#if !defined(CONFIG_STATIC_INIT_GNU)
|
||||
ASSERT(__zephyr_init_array_start == __zephyr_init_array_end,
|
||||
"GNU-style constructors required but STATIC_INIT_GNU not enabled")
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user