| Ralf Baechle | dbee90b | 2006-02-02 14:31:16 +0000 | [diff] [blame] | 1 | #include <asm/asm-offsets.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | #include <asm-generic/vmlinux.lds.h> | 
|  | 3 |  | 
| Ralf Baechle | 41c594a | 2006-04-05 09:45:45 +0100 | [diff] [blame] | 4 | #undef mips | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #define mips mips | 
|  | 6 | OUTPUT_ARCH(mips) | 
|  | 7 | ENTRY(kernel_entry) | 
|  | 8 | jiffies = JIFFIES; | 
|  | 9 | SECTIONS | 
|  | 10 | { | 
|  | 11 | #ifdef CONFIG_BOOT_ELF64 | 
|  | 12 | /* Read-only sections, merged into text segment: */ | 
|  | 13 | /* . = 0xc000000000000000; */ | 
|  | 14 |  | 
|  | 15 | /* This is the value for an Origin kernel, taken from an IRIX kernel.  */ | 
|  | 16 | /* . = 0xc00000000001c000; */ | 
|  | 17 |  | 
| Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 18 | /* Set the vaddr for the text segment to a value | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | >= 0xa800 0000 0001 9000 if no symmon is going to configured | 
|  | 20 | >= 0xa800 0000 0030 0000 otherwise  */ | 
|  | 21 |  | 
|  | 22 | /* . = 0xa800000000300000; */ | 
|  | 23 | /* . = 0xa800000000300000; */ | 
|  | 24 | . = 0xffffffff80300000; | 
|  | 25 | #endif | 
|  | 26 | . = LOADADDR; | 
|  | 27 | /* read-only */ | 
|  | 28 | _text = .;			/* Text and read-only data */ | 
|  | 29 | .text : { | 
|  | 30 | *(.text) | 
|  | 31 | SCHED_TEXT | 
|  | 32 | LOCK_TEXT | 
|  | 33 | *(.fixup) | 
|  | 34 | *(.gnu.warning) | 
|  | 35 | } =0 | 
|  | 36 |  | 
|  | 37 | _etext = .;			/* End of text section */ | 
|  | 38 |  | 
|  | 39 | . = ALIGN(16);		/* Exception table */ | 
|  | 40 | __start___ex_table = .; | 
|  | 41 | __ex_table : { *(__ex_table) } | 
|  | 42 | __stop___ex_table = .; | 
|  | 43 |  | 
|  | 44 | __start___dbe_table = .;	/* Exception table for data bus errors */ | 
|  | 45 | __dbe_table : { *(__dbe_table) } | 
|  | 46 | __stop___dbe_table = .; | 
|  | 47 |  | 
|  | 48 | RODATA | 
|  | 49 |  | 
|  | 50 | /* writeable */ | 
|  | 51 | .data : {			/* Data */ | 
|  | 52 | . = . + DATAOFFSET;		/* for CONFIG_MAPPED_KERNEL */ | 
|  | 53 | *(.data.init_task) | 
|  | 54 |  | 
|  | 55 | *(.data) | 
|  | 56 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | CONSTRUCTORS | 
|  | 58 | } | 
|  | 59 | _gp = . + 0x8000; | 
|  | 60 | .lit8 : { *(.lit8) } | 
|  | 61 | .lit4 : { *(.lit4) } | 
|  | 62 | /* We want the small data sections together, so single-instruction offsets | 
|  | 63 | can access them all, and initialized data all before uninitialized, so | 
|  | 64 | we can shorten the on-disk segment size.  */ | 
|  | 65 | .sdata     : { *(.sdata) } | 
|  | 66 |  | 
| Ralf Baechle | dbee90b | 2006-02-02 14:31:16 +0000 | [diff] [blame] | 67 | . = ALIGN(_PAGE_SIZE); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | __nosave_begin = .; | 
|  | 69 | .data_nosave : { *(.data.nosave) } | 
| Ralf Baechle | dbee90b | 2006-02-02 14:31:16 +0000 | [diff] [blame] | 70 | . = ALIGN(_PAGE_SIZE); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | __nosave_end = .; | 
|  | 72 |  | 
|  | 73 | . = ALIGN(32); | 
|  | 74 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | 
|  | 75 |  | 
|  | 76 | _edata =  .;			/* End of data section */ | 
|  | 77 |  | 
|  | 78 | /* will be freed after init */ | 
| Ralf Baechle | dbee90b | 2006-02-02 14:31:16 +0000 | [diff] [blame] | 79 | . = ALIGN(_PAGE_SIZE);		/* Init code and data */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | __init_begin = .; | 
|  | 81 | .init.text : { | 
|  | 82 | _sinittext = .; | 
|  | 83 | *(.init.text) | 
|  | 84 | _einittext = .; | 
|  | 85 | } | 
|  | 86 | .init.data : { *(.init.data) } | 
|  | 87 | . = ALIGN(16); | 
|  | 88 | __setup_start = .; | 
|  | 89 | .init.setup : { *(.init.setup) } | 
|  | 90 | __setup_end = .; | 
|  | 91 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | __initcall_start = .; | 
|  | 93 | .initcall.init : { | 
| Andrew Morton | 61ce1ef | 2006-10-27 11:41:44 -0700 | [diff] [blame] | 94 | INITCALLS | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | } | 
|  | 96 | __initcall_end = .; | 
|  | 97 |  | 
|  | 98 | __con_initcall_start = .; | 
|  | 99 | .con_initcall.init : { *(.con_initcall.init) } | 
|  | 100 | __con_initcall_end = .; | 
|  | 101 | SECURITY_INIT | 
| Ralf Baechle | bb7d83f | 2006-03-08 14:13:04 +0000 | [diff] [blame] | 102 | /* .exit.text is discarded at runtime, not link time, to deal with | 
|  | 103 | references from .rodata */ | 
|  | 104 | .exit.text : { *(.exit.text) } | 
| Ralf Baechle | dbee90b | 2006-02-02 14:31:16 +0000 | [diff] [blame] | 105 | . = ALIGN(_PAGE_SIZE); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | __initramfs_start = .; | 
|  | 107 | .init.ramfs : { *(.init.ramfs) } | 
|  | 108 | __initramfs_end = .; | 
|  | 109 | . = ALIGN(32); | 
|  | 110 | __per_cpu_start = .; | 
|  | 111 | .data.percpu  : { *(.data.percpu) } | 
|  | 112 | __per_cpu_end = .; | 
| Ralf Baechle | dbee90b | 2006-02-02 14:31:16 +0000 | [diff] [blame] | 113 | . = ALIGN(_PAGE_SIZE); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | __init_end = .; | 
|  | 115 | /* freed after init ends here */ | 
|  | 116 |  | 
|  | 117 | __bss_start = .;		/* BSS */ | 
|  | 118 | .sbss      : { | 
|  | 119 | *(.sbss) | 
|  | 120 | *(.scommon) | 
|  | 121 | } | 
|  | 122 | .bss : { | 
|  | 123 | *(.bss) | 
|  | 124 | *(COMMON) | 
|  | 125 | } | 
|  | 126 | __bss_stop = .; | 
|  | 127 |  | 
|  | 128 | _end = . ; | 
|  | 129 |  | 
|  | 130 | /* Sections to be discarded */ | 
|  | 131 | /DISCARD/ : { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | *(.exit.data) | 
|  | 133 | *(.exitcall.exit) | 
|  | 134 |  | 
|  | 135 | /* ABI crap starts here */ | 
|  | 136 | *(.comment) | 
|  | 137 | *(.MIPS.options) | 
|  | 138 | *(.note) | 
|  | 139 | *(.options) | 
|  | 140 | *(.pdr) | 
|  | 141 | *(.reginfo) | 
|  | 142 | *(.mdebug*) | 
|  | 143 | } | 
|  | 144 |  | 
|  | 145 | /* This is the MIPS specific mdebug section.  */ | 
|  | 146 | .mdebug : { *(.mdebug) } | 
| Atsushi Nemoto | 78665aa | 2006-05-11 00:41:26 +0900 | [diff] [blame] | 147 |  | 
|  | 148 | STABS_DEBUG | 
| Atsushi Nemoto | 04b6b3b | 2006-05-10 15:36:04 +0900 | [diff] [blame] | 149 |  | 
|  | 150 | DWARF_DEBUG | 
|  | 151 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | /* These must appear regardless of  .  */ | 
|  | 153 | .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } | 
|  | 154 | .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 155 | .note : { *(.note) } | 
|  | 156 | } |