1/* Kernel link layout for various "sections" 2 * 3 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org> 4 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org> 5 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org> 6 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> 7 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org> 8 * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org> 9 * Copyright (C) 2006 Helge Deller <deller@gmx.de> 10 * 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; either version 2 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program; if not, write to the Free Software 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 */ 26#include <asm-generic/vmlinux.lds.h> 27/* needed for the processor specific cache alignment size */ 28#include <asm/cache.h> 29#include <asm/page.h> 30#include <asm/asm-offsets.h> 31 32/* ld script to make hppa Linux kernel */ 33#ifndef CONFIG_64BIT 34OUTPUT_FORMAT("elf32-hppa-linux") 35OUTPUT_ARCH(hppa) 36#else 37OUTPUT_FORMAT("elf64-hppa-linux") 38OUTPUT_ARCH(hppa:hppa2.0w) 39#endif 40 41ENTRY(_stext) 42#ifndef CONFIG_64BIT 43jiffies = jiffies_64 + 4; 44#else 45jiffies = jiffies_64; 46#endif 47SECTIONS 48{ 49 . = KERNEL_BINARY_TEXT_START; 50 51 _text = .; /* Text and read-only data */ 52 .text ALIGN(16) : { 53 HEAD_TEXT 54 TEXT_TEXT 55 SCHED_TEXT 56 LOCK_TEXT 57 KPROBES_TEXT 58 IRQENTRY_TEXT 59 *(.text.do_softirq) 60 *(.text.sys_exit) 61 *(.text.do_sigaltstack) 62 *(.text.do_fork) 63 *(.text.*) 64 *(.fixup) 65 *(.lock.text) /* out-of-line lock text */ 66 *(.gnu.warning) 67 } = 0 68 /* End of text section */ 69 _etext = .; 70 71 RODATA 72 73 /* writeable */ 74 /* Make sure this is page aligned so 75 * that we can properly leave these 76 * as writable 77 */ 78 . = ALIGN(PAGE_SIZE); 79 data_start = .; 80 EXCEPTION_TABLE(16) 81 82 NOTES 83 84 /* unwind info */ 85 .PARISC.unwind : { 86 __start___unwind = .; 87 *(.PARISC.unwind) 88 __stop___unwind = .; 89 } 90 91 /* Data */ 92 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 93 94 /* PA-RISC locks requires 16-byte alignment */ 95 . = ALIGN(16); 96 .data.lock_aligned : { 97 *(.data.lock_aligned) 98 } 99 100 /* End of data section */ 101 _edata = .; 102 103 /* BSS */ 104 __bss_start = .; 105 /* page table entries need to be PAGE_SIZE aligned */ 106 . = ALIGN(PAGE_SIZE); 107 .data.vmpages : { 108 *(.data.vm0.pmd) 109 *(.data.vm0.pgd) 110 *(.data.vm0.pte) 111 } 112 .bss : { 113 *(.bss) 114 *(COMMON) 115 } 116 __bss_stop = .; 117 118#ifdef CONFIG_64BIT 119 . = ALIGN(16); 120 /* Linkage tables */ 121 .opd : { 122 *(.opd) 123 } PROVIDE (__gp = .); 124 .plt : { 125 *(.plt) 126 } 127 .dlt : { 128 *(.dlt) 129 } 130#endif 131 132 /* reserve space for interrupt stack by aligning __init* to 16k */ 133 . = ALIGN(16384); 134 __init_begin = .; 135 INIT_TEXT_SECTION(16384) 136 INIT_DATA_SECTION(16) 137 138 PERCPU(PAGE_SIZE) 139 . = ALIGN(PAGE_SIZE); 140 __init_end = .; 141 /* freed after init ends here */ 142 _end = . ; 143 144 STABS_DEBUG 145 .note 0 : { *(.note) } 146 147 /* Sections to be discarded */ 148 DISCARDS 149 /DISCARD/ : { 150#ifdef CONFIG_64BIT 151 /* temporary hack until binutils is fixed to not emit these 152 * for static binaries 153 */ 154 *(.interp) 155 *(.dynsym) 156 *(.dynstr) 157 *(.dynamic) 158 *(.hash) 159 *(.gnu.hash) 160#endif 161 } 162} 163