diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/Makefile | 9 | ||||
-rw-r--r-- | arch/um/kernel/Makefile | 3 | ||||
-rw-r--r-- | arch/um/kernel/init_task.c | 5 | ||||
-rw-r--r-- | arch/um/kernel/vmlinux.lds.S | 3 |
4 files changed, 12 insertions, 8 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index 0728def32234..fc633dbacf84 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -96,11 +96,10 @@ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) | |||
96 | $(call cc-option, -fno-stack-protector,) \ | 96 | $(call cc-option, -fno-stack-protector,) \ |
97 | $(call cc-option, -fno-stack-protector-all,) | 97 | $(call cc-option, -fno-stack-protector-all,) |
98 | 98 | ||
99 | CONFIG_KERNEL_STACK_ORDER ?= 2 | 99 | # Options used by linker script |
100 | STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) | 100 | export LDS_START := $(START) |
101 | 101 | export LDS_ELF_ARCH := $(ELF_ARCH) | |
102 | CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ | 102 | export LDS_ELF_FORMAT := $(ELF_FORMAT) |
103 | -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE) | ||
104 | 103 | ||
105 | # The wrappers will select whether using "malloc" or the kernel allocator. | 104 | # The wrappers will select whether using "malloc" or the kernel allocator. |
106 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc | 105 | LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc |
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index 388ec0a3ea9b..1119233597a1 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile | |||
@@ -3,6 +3,9 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \ | ||
7 | -DELF_ARCH=$(LDS_ELF_ARCH) \ | ||
8 | -DELF_FORMAT=$(LDS_ELF_FORMAT) | ||
6 | extra-y := vmlinux.lds | 9 | extra-y := vmlinux.lds |
7 | clean-files := | 10 | clean-files := |
8 | 11 | ||
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c index b25121b537d8..8aa77b61a5ff 100644 --- a/arch/um/kernel/init_task.c +++ b/arch/um/kernel/init_task.c | |||
@@ -30,9 +30,8 @@ EXPORT_SYMBOL(init_task); | |||
30 | * "init_task" linker map entry.. | 30 | * "init_task" linker map entry.. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | union thread_union init_thread_union | 33 | union thread_union init_thread_union __init_task_data = |
34 | __attribute__((__section__(".data.init_task"))) = | 34 | { INIT_THREAD_INFO(init_task) }; |
35 | { INIT_THREAD_INFO(init_task) }; | ||
36 | 35 | ||
37 | union thread_union cpu0_irqstack | 36 | union thread_union cpu0_irqstack |
38 | __attribute__((__section__(".data.init_irqstack"))) = | 37 | __attribute__((__section__(".data.init_irqstack"))) = |
diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S index f8aeb448aab6..16e49bfa2b42 100644 --- a/arch/um/kernel/vmlinux.lds.S +++ b/arch/um/kernel/vmlinux.lds.S | |||
@@ -1,3 +1,6 @@ | |||
1 | |||
2 | KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER); | ||
3 | |||
1 | #ifdef CONFIG_LD_SCRIPT_STATIC | 4 | #ifdef CONFIG_LD_SCRIPT_STATIC |
2 | #include "uml.lds.S" | 5 | #include "uml.lds.S" |
3 | #else | 6 | #else |