1 /* Kernel link layout for various "sections"
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>
13 * Put page table entries (swapper_pg_dir) as the first thing in .bss. This
14 * will ensure that it has .bss alignment (PAGE_SIZE).
16 #define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \
20 #include <asm-generic/vmlinux.lds.h>
22 /* needed for the processor specific cache alignment size */
23 #include <asm/cache.h>
25 #include <asm/asm-offsets.h>
26 #include <asm/thread_info.h>
28 /* ld script to make hppa Linux kernel */
30 OUTPUT_FORMAT("elf32-hppa-linux")
33 OUTPUT_FORMAT("elf64-hppa-linux")
34 OUTPUT_ARCH(hppa:hppa2.0w)
37 ENTRY(parisc_kernel_start)
39 jiffies = jiffies_64 + 4;
45 . = KERNEL_BINARY_TEXT_START;
52 INIT_DATA_SECTION(PAGE_SIZE)
53 /* we have to discard exit text and such at runtime, not link time */
63 . = ALIGN(HUGEPAGE_SIZE);
65 /* freed after init ends here */
67 _text = .; /* Text and read-only data */
69 .text ALIGN(PAGE_SIZE) : {
79 *(.text.do_sigaltstack)
82 *($$*) /* millicode routines */
85 *(.lock.text) /* out-of-line lock text */
90 /* End of text section */
92 /* Start of data section */
95 /* Architecturally we need to keep __gp below 0x1000000 and thus
96 * in front of RO_DATA_SECTION() which stores lots of tracepoint
97 * and ftrace symbols. */
103 } PROVIDE (__gp = .);
114 /* RO because of BUILDTIME_EXTABLE_SORT */
120 __start___unwind = .;
126 /* Make sure this is page aligned so
127 * that we can properly leave these
130 . = ALIGN(HUGEPAGE_SIZE);
134 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
136 /* PA-RISC locks requires 16-byte alignment */
138 .data..lock_aligned : {
139 *(.data..lock_aligned)
142 /* End of data section */
146 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
148 . = ALIGN(HUGEPAGE_SIZE);
152 .note 0 : { *(.note) }
154 /* Sections to be discarded */
158 /* temporary hack until binutils is fixed to not emit these
159 * for static binaries