GNU Linux-libre 4.19.264-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                 __start_opd = .;
33                 *(.opd)
34                 __end_opd = .;
35         } PROVIDE (__gp = .);
36         .plt : {
37                 *(.plt)
38         }
39         .dlt : {
40                 *(.dlt)
41         }
42 #endif
43         _startcode_end = .;
44
45         /* bootloader code and data starts at least behind area of extracted kernel */
46         . = MAX(ABSOLUTE(.), (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START));
47
48         /* align on next page boundary */
49         . = ALIGN(4096);
50         .text : {
51                 _text = .;      /* Text */
52                 *(.text)
53                 *(.text.*)
54                 _etext = . ;
55         }
56         . = ALIGN(8);
57         .data : {
58                 _data = . ;
59                 *(.data)
60                 *(.data.*)
61                 _edata = . ;
62         }
63         . = ALIGN(8);
64         .rodata : {
65                 _rodata = . ;
66                 *(.rodata)       /* read-only data */
67                 *(.rodata.*)
68                 _erodata = . ;
69         }
70         . = ALIGN(8);
71         .rodata.compressed : {
72                 *(.rodata.compressed)
73         }
74         . = ALIGN(8);
75         .bss : {
76                 _bss = . ;
77                 *(.bss)
78                 *(.bss.*)
79                 *(COMMON)
80                 . = ALIGN(4096);
81                 _ebss = .;
82         }
83
84         STABS_DEBUG
85         .note 0 : { *(.note) }
86
87         /* Sections to be discarded */
88         DISCARDS
89         /DISCARD/ : {
90 #ifdef CONFIG_64BIT
91                 /* temporary hack until binutils is fixed to not emit these
92                  * for static binaries
93                  */
94                 *(.PARISC.unwind)       /* no unwind data */
95                 *(.interp)
96                 *(.dynsym)
97                 *(.dynstr)
98                 *(.dynamic)
99                 *(.hash)
100                 *(.gnu.hash)
101 #endif
102         }
103 }