GNU Linux-libre 4.14.266-gnu1
[releases.git] / arch / parisc / boot / compressed / vmlinux.lds.S
1 #include <asm-generic/vmlinux.lds.h>
2 #include <asm/page.h>
3 #include "sizes.h"
4
5 #ifndef CONFIG_64BIT
6 OUTPUT_FORMAT("elf32-hppa-linux")
7 OUTPUT_ARCH(hppa)
8 #else
9 OUTPUT_FORMAT("elf64-hppa-linux")
10 OUTPUT_ARCH(hppa:hppa2.0w)
11 #endif
12
13 ENTRY(startup)
14
15 SECTIONS
16 {
17         /* palo loads at 0x60000 */
18         /* loaded kernel will move to 0x10000 */
19         . = 0xe0000;    /* should not overwrite palo code */
20
21         .head.text : {
22                 _head = . ;
23                 HEAD_TEXT
24                 _ehead = . ;
25         }
26
27         /* keep __gp below 0x1000000 */
28 #ifdef CONFIG_64BIT
29         . = ALIGN(16);
30         /* Linkage tables */
31         .opd : {
32                 *(.opd)
33         } PROVIDE (__gp = .);
34         .plt : {
35                 *(.plt)
36         }
37         .dlt : {
38                 *(.dlt)
39         }
40 #endif
41         _startcode_end = .;
42
43         /* bootloader code and data starts at least behind area of extracted kernel */
44         . = MAX(ABSOLUTE(.), (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START));
45
46         /* align on next page boundary */
47         . = ALIGN(4096);
48         .text : {
49                 _text = .;      /* Text */
50                 *(.text)
51                 *(.text.*)
52                 _etext = . ;
53         }
54         . = ALIGN(8);
55         .data : {
56                 _data = . ;
57                 *(.data)
58                 *(.data.*)
59                 _edata = . ;
60         }
61         . = ALIGN(8);
62         .rodata : {
63                 _rodata = . ;
64                 *(.rodata)       /* read-only data */
65                 *(.rodata.*)
66                 _erodata = . ;
67         }
68         . = ALIGN(8);
69         .rodata.compressed : {
70                 *(.rodata.compressed)
71         }
72         . = ALIGN(8);
73         .bss : {
74                 _bss = . ;
75                 *(.bss)
76                 *(.bss.*)
77                 *(COMMON)
78                 . = ALIGN(4096);
79                 _ebss = .;
80         }
81
82         STABS_DEBUG
83         .note 0 : { *(.note) }
84
85         /* Sections to be discarded */
86         DISCARDS
87         /DISCARD/ : {
88 #ifdef CONFIG_64BIT
89                 /* temporary hack until binutils is fixed to not emit these
90                  * for static binaries
91                  */
92                 *(.PARISC.unwind)       /* no unwind data */
93                 *(.interp)
94                 *(.dynsym)
95                 *(.dynstr)
96                 *(.dynamic)
97                 *(.hash)
98                 *(.gnu.hash)
99 #endif
100         }
101 }