diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index a6b20c7953d6..32b60272a4fa 100644 --- a/arch/um/kernel/dyn.lds.S +++ b/arch/um/kernel/dyn.lds.S @@ -20,8 +20,12 @@ SECTIONS __binary_start = .; . = ALIGN(4096); /* Init code and data */ _text = .; + __init_begin = .; INIT_TEXT_SECTION(PAGE_SIZE) + init.data : { INIT_DATA } + __init_end = .; + . = ALIGN(PAGE_SIZE); /* Read-only sections, merged into text segment: */ @@ -98,10 +102,6 @@ SECTIONS #include - __init_begin = .; - init.data : { INIT_DATA } - __init_end = .; - /* Ensure the __preinit_array_start label is properly aligned. We could instead move the label definition inside the section, but the linker would then create the section even if it turns out to diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index f7ec7e7f5981..7a6de1c74d6d 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S @@ -28,8 +28,12 @@ SECTIONS . = ALIGN(PAGE_SIZE); _text = .; + __init_begin = .; INIT_TEXT_SECTION(0) + init.data : { INIT_DATA } + __init_end = .; + .text : { _stext = .; @@ -70,10 +74,6 @@ SECTIONS #include - __init_begin = .; - init.data : { INIT_DATA } - __init_end = .; - .data : { INIT_TASK_DATA(KERNEL_STACK_SIZE)