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) : {
78 *(.text.do_sigaltstack)
82 *(.lock.text) /* out-of-line lock text */
87 /* End of text section */
89 /* Start of data section */
110 __start___unwind = .;
116 /* Make sure this is page aligned so
117 * that we can properly leave these
120 . = ALIGN(HUGEPAGE_SIZE);
127 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
129 /* PA-RISC locks requires 16-byte alignment */
131 .data..lock_aligned : {
132 *(.data..lock_aligned)
135 /* End of data section */
139 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
141 /* bootmap is allocated in setup_bootmem() directly behind bss. */
143 . = ALIGN(HUGEPAGE_SIZE);
147 .note 0 : { *(.note) }
149 /* Sections to be discarded */
153 /* temporary hack until binutils is fixed to not emit these
154 * for static binaries