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>
9 * Copyright (C) 2006-2013 Helge Deller <deller@gmx.de>
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) : {
77 *(.text.do_sigaltstack)
81 *(.lock.text) /* out-of-line lock text */
86 /* End of text section */
88 /* Start of data section */
109 __start___unwind = .;
115 /* Make sure this is page aligned so
116 * that we can properly leave these
119 . = ALIGN(HUGEPAGE_SIZE);
126 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
128 /* PA-RISC locks requires 16-byte alignment */
130 .data..lock_aligned : {
131 *(.data..lock_aligned)
134 /* End of data section */
138 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
140 /* bootmap is allocated in setup_bootmem() directly behind bss. */
142 . = ALIGN(HUGEPAGE_SIZE);
146 .note 0 : { *(.note) }
148 /* Sections to be discarded */
152 /* temporary hack until binutils is fixed to not emit these
153 * for static binaries