diff options
Diffstat (limited to 'arch/um/kernel/uml.lds.S')
| -rw-r--r-- | arch/um/kernel/uml.lds.S | 86 |
1 files changed, 46 insertions, 40 deletions
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index 8eca47a6ff0..6899195602b 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S @@ -1,4 +1,5 @@ #include <asm-generic/vmlinux.lds.h> +#include <asm/page.h> OUTPUT_FORMAT(ELF_FORMAT) OUTPUT_ARCH(ELF_ARCH) @@ -18,47 +19,58 @@ SECTIONS . = START + SIZEOF_HEADERS; -#ifdef MODE_TT - .remap_data : { UNMAP_PATH (.data .bss) } - .remap : { UNMAP_PATH (.text) } - - . = ALIGN(4096); /* Init code and data */ -#endif - - _stext = .; - __init_begin = .; - .init.text : { - _sinittext = .; - *(.init.text) - _einittext = .; - } - . = ALIGN(4096); + _text = .; + INIT_TEXT_SECTION(0) + . = ALIGN(PAGE_SIZE); .text : { - *(.text) + _stext = .; + TEXT_TEXT SCHED_TEXT LOCK_TEXT *(.fixup) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) *(.gnu.linkonce.t*) + } + + . = ALIGN(PAGE_SIZE); + .syscall_stub : { + __syscall_stub_start = .; + *(.__syscall_stub*) + __syscall_stub_end = .; + } - . = ALIGN(4096); - __syscall_stub_start = .; - *(.__syscall_stub*) - __syscall_stub_end = .; - . = ALIGN(4096); + /* + * These are needed even in a static link, even if they wind up being empty. + * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols. + */ + .rel.plt : { + *(.rel.plt) + PROVIDE_HIDDEN(__rel_iplt_start = .); + *(.rel.iplt) + PROVIDE_HIDDEN(__rel_iplt_end = .); } + .rela.plt : { + *(.rela.plt) + PROVIDE_HIDDEN(__rela_iplt_start = .); + *(.rela.iplt) + PROVIDE_HIDDEN(__rela_iplt_end = .); + } + + #include <asm/common.lds.S> - #include "asm/common.lds.S" + __init_begin = .; + init.data : { INIT_DATA } + __init_end = .; - init.data : { *(init.data) } .data : { - . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ - *(.data.init_task) - *(.data) + INIT_TASK_DATA(KERNEL_STACK_SIZE) + . = ALIGN(KERNEL_STACK_SIZE); + *(.data..init_irqstack) + DATA_DATA *(.gnu.linkonce.d*) CONSTRUCTORS } @@ -82,24 +94,18 @@ SECTIONS .sdata : { *(.sdata) } _edata = .; PROVIDE (edata = .); - . = ALIGN(0x1000); - .sbss : - { - __bss_start = .; - PROVIDE(_bss_start = .); - *(.sbss) - *(.scommon) - } - .bss : - { - *(.dynbss) - *(.bss) - *(COMMON) - } + . = ALIGN(PAGE_SIZE); + __bss_start = .; + PROVIDE(_bss_start = .); + SBSS(0) + BSS(0) + __bss_stop = .; _end = .; PROVIDE (end = .); STABS_DEBUG DWARF_DEBUG + + DISCARDS } |
