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