Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <asm-generic/vmlinux.lds.h> |
| 2 | |
| 3 | OUTPUT_FORMAT(ELF_FORMAT) |
| 4 | OUTPUT_ARCH(ELF_ARCH) |
| 5 | ENTRY(_start) |
| 6 | jiffies = jiffies_64; |
| 7 | |
| 8 | SECTIONS |
| 9 | { |
| 10 | /*This must contain the right address - not quite the default ELF one.*/ |
| 11 | PROVIDE (__executable_start = START); |
| 12 | . = START + SIZEOF_HEADERS; |
| 13 | |
| 14 | /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start |
| 15 | * is remapped.*/ |
| 16 | __binary_start = .; |
| 17 | #ifdef MODE_TT |
| 18 | .thread_private : { |
| 19 | __start_thread_private = .; |
| 20 | errno = .; |
| 21 | . += 4; |
| 22 | arch/um/kernel/tt/unmap_fin.o (.data) |
| 23 | __end_thread_private = .; |
| 24 | } |
| 25 | . = ALIGN(4096); |
| 26 | .remap : { arch/um/kernel/tt/unmap_fin.o (.text) } |
| 27 | |
| 28 | /* We want it only if we are in MODE_TT. In both cases, however, when MODE_TT |
| 29 | * is off the resulting binary segfaults.*/ |
| 30 | |
| 31 | . = ALIGN(4096); /* Init code and data */ |
| 32 | #endif |
| 33 | |
| 34 | _stext = .; |
| 35 | __init_begin = .; |
| 36 | .init.text : { |
| 37 | _sinittext = .; |
| 38 | *(.init.text) |
| 39 | _einittext = .; |
| 40 | } |
| 41 | . = ALIGN(4096); |
| 42 | .text : |
| 43 | { |
| 44 | *(.text) |
| 45 | SCHED_TEXT |
| 46 | LOCK_TEXT |
| 47 | *(.fixup) |
| 48 | /* .gnu.warning sections are handled specially by elf32.em. */ |
| 49 | *(.gnu.warning) |
| 50 | *(.gnu.linkonce.t*) |
| 51 | } |
| 52 | |
| 53 | #include "asm/common.lds.S" |
| 54 | |
| 55 | init.data : { *(init.data) } |
| 56 | .data : |
| 57 | { |
| 58 | . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ |
| 59 | *(.data.init_task) |
| 60 | *(.data) |
| 61 | *(.gnu.linkonce.d*) |
| 62 | CONSTRUCTORS |
| 63 | } |
| 64 | .data1 : { *(.data1) } |
| 65 | .ctors : |
| 66 | { |
| 67 | *(.ctors) |
| 68 | } |
| 69 | .dtors : |
| 70 | { |
| 71 | *(.dtors) |
| 72 | } |
| 73 | |
| 74 | .got : { *(.got.plt) *(.got) } |
| 75 | .dynamic : { *(.dynamic) } |
| 76 | /* We want the small data sections together, so single-instruction offsets |
| 77 | can access them all, and initialized data all before uninitialized, so |
| 78 | we can shorten the on-disk segment size. */ |
| 79 | .sdata : { *(.sdata) } |
| 80 | _edata = .; |
| 81 | PROVIDE (edata = .); |
| 82 | . = ALIGN(0x1000); |
| 83 | .sbss : |
| 84 | { |
| 85 | __bss_start = .; |
| 86 | PROVIDE(_bss_start = .); |
| 87 | *(.sbss) |
| 88 | *(.scommon) |
| 89 | } |
| 90 | .bss : |
| 91 | { |
| 92 | *(.dynbss) |
| 93 | *(.bss) |
| 94 | *(COMMON) |
| 95 | } |
| 96 | _end = . ; |
| 97 | PROVIDE (end = .); |
| 98 | /* Stabs debugging sections. */ |
| 99 | .stab 0 : { *(.stab) } |
| 100 | .stabstr 0 : { *(.stabstr) } |
| 101 | .stab.excl 0 : { *(.stab.excl) } |
| 102 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 103 | .stab.index 0 : { *(.stab.index) } |
| 104 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 105 | .comment 0 : { *(.comment) } |
| 106 | } |