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 | { |
Jeff Dike | 23bbd58 | 2006-07-10 04:45:06 -0700 | [diff] [blame] | 10 | /* This must contain the right address - not quite the default ELF one.*/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | PROVIDE (__executable_start = START); |
Jeff Dike | 23bbd58 | 2006-07-10 04:45:06 -0700 | [diff] [blame] | 12 | /* Static binaries stick stuff here, like the sigreturn trampoline, |
| 13 | * invisibly to objdump. So, just make __binary_start equal to the very |
| 14 | * beginning of the executable, and if there are unmapped pages after this, |
| 15 | * they are forever unusable. |
| 16 | */ |
| 17 | __binary_start = START; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
Jeff Dike | 23bbd58 | 2006-07-10 04:45:06 -0700 | [diff] [blame] | 19 | . = START + SIZEOF_HEADERS; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
Paolo 'Blaisorblade' Giarrusso | 60b2737 | 2005-06-21 17:16:25 -0700 | [diff] [blame] | 21 | #ifdef MODE_TT |
Paolo 'Blaisorblade' Giarrusso | 1c30385 | 2005-07-14 00:33:38 -0700 | [diff] [blame] | 22 | .remap_data : { UNMAP_PATH (.data .bss) } |
| 23 | .remap : { UNMAP_PATH (.text) } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | |
| 25 | . = ALIGN(4096); /* Init code and data */ |
| 26 | #endif |
| 27 | |
Jeff Dike | d1480c5 | 2006-10-30 22:07:13 -0800 | [diff] [blame] | 28 | _text = .; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | _stext = .; |
| 30 | __init_begin = .; |
| 31 | .init.text : { |
| 32 | _sinittext = .; |
| 33 | *(.init.text) |
| 34 | _einittext = .; |
| 35 | } |
| 36 | . = ALIGN(4096); |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 37 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | .text : |
| 39 | { |
| 40 | *(.text) |
| 41 | SCHED_TEXT |
| 42 | LOCK_TEXT |
| 43 | *(.fixup) |
| 44 | /* .gnu.warning sections are handled specially by elf32.em. */ |
| 45 | *(.gnu.warning) |
| 46 | *(.gnu.linkonce.t*) |
Jeff Dike | d67b569 | 2005-07-07 17:56:49 -0700 | [diff] [blame] | 47 | |
| 48 | . = ALIGN(4096); |
| 49 | __syscall_stub_start = .; |
| 50 | *(.__syscall_stub*) |
| 51 | __syscall_stub_end = .; |
| 52 | . = ALIGN(4096); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | #include "asm/common.lds.S" |
| 56 | |
| 57 | init.data : { *(init.data) } |
| 58 | .data : |
| 59 | { |
| 60 | . = ALIGN(KERNEL_STACK_SIZE); /* init_task */ |
| 61 | *(.data.init_task) |
| 62 | *(.data) |
| 63 | *(.gnu.linkonce.d*) |
| 64 | CONSTRUCTORS |
| 65 | } |
| 66 | .data1 : { *(.data1) } |
| 67 | .ctors : |
| 68 | { |
| 69 | *(.ctors) |
| 70 | } |
| 71 | .dtors : |
| 72 | { |
| 73 | *(.dtors) |
| 74 | } |
| 75 | |
| 76 | .got : { *(.got.plt) *(.got) } |
| 77 | .dynamic : { *(.dynamic) } |
Jeff Dike | ba9950c | 2005-05-20 13:59:07 -0700 | [diff] [blame] | 78 | .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } |
| 79 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | /* We want the small data sections together, so single-instruction offsets |
| 81 | can access them all, and initialized data all before uninitialized, so |
| 82 | we can shorten the on-disk segment size. */ |
| 83 | .sdata : { *(.sdata) } |
| 84 | _edata = .; |
| 85 | PROVIDE (edata = .); |
| 86 | . = ALIGN(0x1000); |
| 87 | .sbss : |
| 88 | { |
| 89 | __bss_start = .; |
| 90 | PROVIDE(_bss_start = .); |
| 91 | *(.sbss) |
| 92 | *(.scommon) |
| 93 | } |
| 94 | .bss : |
| 95 | { |
| 96 | *(.dynbss) |
| 97 | *(.bss) |
| 98 | *(COMMON) |
| 99 | } |
Paolo 'Blaisorblade' Giarrusso | a7d0c21 | 2005-09-10 19:44:54 +0200 | [diff] [blame] | 100 | _end = .; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 101 | PROVIDE (end = .); |
Paolo 'Blaisorblade' Giarrusso | a7d0c21 | 2005-09-10 19:44:54 +0200 | [diff] [blame] | 102 | |
| 103 | STABS_DEBUG |
| 104 | |
| 105 | DWARF_DEBUG |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | } |