1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Kernel link layout for various "sections"
4 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
5 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
6 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
7 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
8 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
9 * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org>
10 * Copyright (C) 2006-2013 Helge Deller <deller@gmx.de>
14 * Put page table entries (swapper_pg_dir) as the first thing in .bss. This
15 * will ensure that it has .bss alignment (PAGE_SIZE).
17 #define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \
21 /* No __ro_after_init data in the .rodata section - which will always be ro */
22 #define RO_AFTER_INIT_DATA
24 #include <asm-generic/vmlinux.lds.h>
26 /* needed for the processor specific cache alignment size */
27 #include <asm/cache.h>
29 #include <asm/asm-offsets.h>
30 #include <asm/thread_info.h>
32 /* ld script to make hppa Linux kernel */
34 OUTPUT_FORMAT("elf32-hppa-linux")
37 OUTPUT_FORMAT("elf64-hppa-linux")
38 OUTPUT_ARCH(hppa:hppa2.0w)
41 ENTRY(parisc_kernel_start)
43 jiffies = jiffies_64 + 4;
49 . = KERNEL_BINARY_TEXT_START;
56 INIT_DATA_SECTION(PAGE_SIZE)
57 /* we have to discard exit text and such at runtime, not link time */
69 __alt_instructions = .;
71 __alt_instructions_end = .;
73 . = ALIGN(HUGEPAGE_SIZE);
75 /* freed after init ends here */
77 _text = .; /* Text and read-only data */
79 .text ALIGN(PAGE_SIZE) : {
89 *(.text.do_sigaltstack)
92 *($$*) /* millicode routines */
95 *(.lock.text) /* out-of-line lock text */
100 /* End of text section */
102 /* Start of data section */
105 /* Architecturally we need to keep __gp below 0x1000000 and thus
106 * in front of RO_DATA_SECTION() which stores lots of tracepoint
107 * and ftrace symbols. */
115 } PROVIDE (__gp = .);
126 /* RO because of BUILDTIME_EXTABLE_SORT */
132 __start___unwind = .;
138 /* Make sure this is page aligned so
139 * that we can properly leave these
142 . = ALIGN(HUGEPAGE_SIZE);
146 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
148 /* PA-RISC locks requires 16-byte alignment */
150 .data..lock_aligned : {
151 *(.data..lock_aligned)
154 /* End of data section */
158 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
160 . = ALIGN(HUGEPAGE_SIZE);
164 .note 0 : { *(.note) }
166 /* Sections to be discarded */
170 /* temporary hack until binutils is fixed to not emit these
171 * for static binaries