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 = .; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
Paolo 'Blaisorblade' Giarrusso | 60b2737 | 2005-06-21 17:16:25 -0700 | [diff] [blame] | 18 | #ifdef MODE_TT |
Paolo 'Blaisorblade' Giarrusso | 1c30385 | 2005-07-14 00:33:38 -0700 | [diff] [blame] | 19 | .remap_data : { UNMAP_PATH (.data .bss) } |
| 20 | .remap : { UNMAP_PATH (.text) } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
| 22 | . = ALIGN(4096); /* Init code and data */ |
| 23 | #endif |
| 24 | |
| 25 | _stext = .; |
| 26 | __init_begin = .; |
| 27 | .init.text : { |
| 28 | _sinittext = .; |
| 29 | *(.init.text) |
| 30 | _einittext = .; |
| 31 | } |
| 32 | . = ALIGN(4096); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 33 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | .text : |
| 35 | { |
| 36 | *(.text) |
| 37 | SCHED_TEXT |
| 38 | LOCK_TEXT |
| 39 | *(.fixup) |
| 40 | /* .gnu.warning sections are handled specially by elf32.em. */ |
| 41 | *(.gnu.warning) |
| 42 | *(.gnu.linkonce.t*) |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 43 | |
| 44 | . = ALIGN(4096); |
| 45 | __syscall_stub_start = .; |
| 46 | *(.__syscall_stub*) |
| 47 | __syscall_stub_end = .; |
| 48 | . = ALIGN(4096); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | #include "asm/common.lds.S" |
| 52 | |
| 53 | init.data : { *(init.data) } |
| 54 | .data : |
| 55 | { |
| 56 | . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ |
| 57 | *(.data.init_task) |
| 58 | *(.data) |
| 59 | *(.gnu.linkonce.d*) |
| 60 | CONSTRUCTORS |
| 61 | } |
| 62 | .data1 : { *(.data1) } |
| 63 | .ctors : |
| 64 | { |
| 65 | *(.ctors) |
| 66 | } |
| 67 | .dtors : |
| 68 | { |
| 69 | *(.dtors) |
| 70 | } |
| 71 | |
| 72 | .got : { *(.got.plt) *(.got) } |
| 73 | .dynamic : { *(.dynamic) } |
Jeff Dike | ba9950c | 2005-05-20 13:59:07 -0700 | [diff] [blame] | 74 | .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } |
| 75 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | } |
Paolo 'Blaisorblade' Giarrusso | a7d0c21 | 2005-09-10 19:44:54 +0200 | [diff] [blame] | 96 | _end = .; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | PROVIDE (end = .); |
Paolo 'Blaisorblade' Giarrusso | a7d0c21 | 2005-09-10 19:44:54 +0200 | [diff] [blame] | 98 | |
| 99 | STABS_DEBUG |
| 100 | |
| 101 | DWARF_DEBUG |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | } |