userspace: move KOBJECT/PRIVILEGED_STACK_TEXT_AREA to Kconfig
Instead of hardcoding in linker script, use a Kconfig and deal with dependencies in Kconfig instead of directly in the linker file. This patch moves both: PRIVILEGED_STACK_TEXT_AREA and KOBJECT_TEXT_AREA to arch/Kconfig. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
24bfa40964
commit
eb29978a57
4 changed files with 18 additions and 20 deletions
|
@ -1,11 +1,3 @@
|
|||
#ifndef KOBJECT_TEXT_AREA
|
||||
#if ! defined(CONFIG_SIZE_OPTIMIZATIONS) || defined(CONFIG_STACK_CANARIES)
|
||||
#define KOBJECT_TEXT_AREA 256
|
||||
#else
|
||||
#define KOBJECT_TEXT_AREA 128
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
/* We need to reserve room for the gperf generated hash functions.
|
||||
* Fortunately, unlike the data tables, the size of the code is
|
||||
|
@ -26,6 +18,6 @@
|
|||
PROVIDE(_k_object_wordlist_foreach = .);
|
||||
#endif
|
||||
#endif
|
||||
. += KOBJECT_TEXT_AREA - (_kobject_text_area_end - _kobject_text_area_start);
|
||||
. += CONFIG_KOBJECT_TEXT_AREA - (_kobject_text_area_end - _kobject_text_area_start);
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
|
|
|
@ -3,14 +3,6 @@
|
|||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef PRIV_STACKS_TEXT_AREA
|
||||
#if defined(CONFIG_DEBUG) || defined(CONFIG_STACK_CANARIES)
|
||||
#define PRIV_STACKS_TEXT_AREA 256
|
||||
#else
|
||||
#define PRIV_STACKS_TEXT_AREA 128
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
/* We need to reserve room for the gperf generated hash functions.
|
||||
* Fortunately, unlike the data tables, the size of the code is
|
||||
|
@ -25,6 +17,6 @@
|
|||
#ifndef LINKER_PASS2
|
||||
PROVIDE(_k_priv_stack_find = .);
|
||||
#endif
|
||||
. += PRIV_STACKS_TEXT_AREA - (_priv_stacks_text_area_end - _priv_stacks_text_area_start);
|
||||
. += CONFIG_PRIVILEGED_STACK_TEXT_AREA - (_priv_stacks_text_area_end - _priv_stacks_text_area_start);
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue