Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* ld script to make SparcLinux kernel */ |
| 2 | |
| 3 | #include <asm-generic/vmlinux.lds.h> |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 4 | #include <asm/page.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | |
| 6 | OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", "elf32-sparc") |
| 7 | OUTPUT_ARCH(sparc) |
| 8 | ENTRY(_start) |
| 9 | jiffies = jiffies_64 + 4; |
| 10 | SECTIONS |
| 11 | { |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 12 | . = 0x10000 + SIZEOF_HEADERS; |
| 13 | .text 0xf0004000 : |
| 14 | { |
| 15 | _text = .; |
Al Viro | 5bac287 | 2008-11-22 17:36:04 +0000 | [diff] [blame^] | 16 | *(.text.head) |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 17 | TEXT_TEXT |
| 18 | SCHED_TEXT |
| 19 | LOCK_TEXT |
| 20 | *(.gnu.warning) |
| 21 | } = 0 |
| 22 | _etext = .; |
| 23 | PROVIDE (etext = .); |
| 24 | RODATA |
| 25 | .data : { |
| 26 | DATA_DATA |
| 27 | CONSTRUCTORS |
| 28 | } |
| 29 | .data1 : { |
| 30 | *(.data1) |
| 31 | } |
| 32 | _edata = .; |
| 33 | PROVIDE (edata = .); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 35 | .fixup : { |
| 36 | __start___fixup = .; |
| 37 | *(.fixup) |
| 38 | __stop___fixup = .; |
| 39 | } |
| 40 | __ex_table : { |
| 41 | __start___ex_table = .; |
| 42 | *(__ex_table) |
| 43 | __stop___ex_table = .; |
| 44 | } |
David S. Miller | 0c0d345 | 2007-07-22 19:19:05 -0700 | [diff] [blame] | 45 | |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 46 | NOTES |
| 47 | |
| 48 | . = ALIGN(PAGE_SIZE); |
| 49 | __init_begin = .; |
| 50 | .init.text : { |
| 51 | _sinittext = .; |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 52 | INIT_TEXT |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 53 | _einittext = .; |
| 54 | } |
| 55 | __init_text_end = .; |
| 56 | .init.data : { |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 57 | INIT_DATA |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 58 | } |
| 59 | . = ALIGN(16); |
| 60 | .init.setup : { |
| 61 | __setup_start = .; |
| 62 | *(.init.setup) |
| 63 | __setup_end = .; |
| 64 | } |
| 65 | .initcall.init : { |
| 66 | __initcall_start = .; |
| 67 | INITCALLS |
| 68 | __initcall_end = .; |
| 69 | } |
| 70 | .con_initcall.init : { |
| 71 | __con_initcall_start = .; |
| 72 | *(.con_initcall.init) |
| 73 | __con_initcall_end = .; |
| 74 | } |
| 75 | SECURITY_INIT |
Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 76 | |
| 77 | #ifdef CONFIG_BLK_DEV_INITRD |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 78 | . = ALIGN(PAGE_SIZE); |
| 79 | .init.ramfs : { |
| 80 | __initramfs_start = .; |
| 81 | *(.init.ramfs) |
| 82 | __initramfs_end = .; |
| 83 | } |
Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 84 | #endif |
| 85 | |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 86 | PERCPU(PAGE_SIZE) |
| 87 | . = ALIGN(PAGE_SIZE); |
| 88 | __init_end = .; |
| 89 | . = ALIGN(32); |
| 90 | .data.cacheline_aligned : { |
| 91 | *(.data.cacheline_aligned) |
| 92 | } |
David S. Miller | d113fcd | 2007-11-16 03:06:07 -0800 | [diff] [blame] | 93 | . = ALIGN(32); |
| 94 | .data.read_mostly : { |
| 95 | *(.data.read_mostly) |
| 96 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 98 | __bss_start = .; |
| 99 | .sbss : { |
| 100 | *(.sbss) |
| 101 | *(.scommon) } |
| 102 | .bss : { |
| 103 | *(.dynbss) |
| 104 | *(.bss) |
| 105 | *(COMMON) |
| 106 | } |
| 107 | _end = . ; |
| 108 | PROVIDE (end = .); |
| 109 | /DISCARD/ : { |
Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 110 | EXIT_TEXT |
| 111 | EXIT_DATA |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 112 | *(.exitcall.exit) |
| 113 | } |
David S. Miller | d5784b5 | 2005-12-28 13:22:54 -0800 | [diff] [blame] | 114 | |
Sam Ravnborg | bcbe40e | 2007-09-17 19:02:30 -0700 | [diff] [blame] | 115 | STABS_DEBUG |
| 116 | DWARF_DEBUG |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | } |