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) : {
79 *(.text.do_sigaltstack)
83 *(.lock.text) /* out-of-line lock text */
88 /* End of text section */
90 /* Start of data section */
100 } PROVIDE (__gp = .);
111 __start___unwind = .;
117 /* Make sure this is page aligned so
118 * that we can properly leave these
121 . = ALIGN(HUGEPAGE_SIZE);
128 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
130 /* PA-RISC locks requires 16-byte alignment */
132 .data..lock_aligned : {
133 *(.data..lock_aligned)
136 /* End of data section */
140 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
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