Due to the use of gperf to generate hash table for kobjects, the addresses of these kobjects cannot change during the last few phases of linking (especially between zephyr_prebuilt.elf and zephyr.elf). Because of this, the gperf generated data needs to be placed at the end of memory to avoid pushing symbols around in memory. This prevents moving these generated blocks to earlier sections, for example, pinned data section needed for demand paging. So create placeholders for use in intermediate linking to reserve space for these generated blocks. Due to uncertainty on the size of these blocks, more space is being reserved which could result in wasted space. Though, this retains the use of hash table for faster lookup. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
29 lines
684 B
Plaintext
29 lines
684 B
Plaintext
/*
|
|
* Copyright (c) 2020 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
SECTION_PROLOGUE(_NOINIT_SECTION_NAME,(NOLOAD),)
|
|
{
|
|
/*
|
|
* This section is used for non-initialized objects that
|
|
* will not be cleared during the boot process.
|
|
*/
|
|
*(.noinit)
|
|
*(".noinit.*")
|
|
#ifdef CONFIG_USERSPACE
|
|
z_user_stacks_start = .;
|
|
*(.user_stacks*)
|
|
z_user_stacks_end = .;
|
|
#endif /* CONFIG_USERSPACE */
|
|
|
|
/* Located in generated directory. This file is populated by the
|
|
* zephyr_linker_sources() Cmake function.
|
|
*/
|
|
#include <snippets-noinit.ld>
|
|
|
|
} GROUP_NOLOAD_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
|
|
|
#include "kobject-priv-stacks.ld"
|