1#include <asm-generic/vmlinux.lds.h>
2#include <asm/page.h>
3#include "sizes.h"
4
5#ifndef CONFIG_64BIT
6OUTPUT_FORMAT("elf32-hppa-linux")
7OUTPUT_ARCH(hppa)
8#else
9OUTPUT_FORMAT("elf64-hppa-linux")
10OUTPUT_ARCH(hppa:hppa2.0w)
11#endif
12
13ENTRY(startup)
14
15SECTIONS
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	/* vmlinux.bin.gz is here */
46	. = ALIGN(8);
47	.rodata.compressed : {
48		*(.rodata.compressed)
49	}
50
51	/* bootloader code and data starts at least behind area of extracted kernel */
52	. = MAX(ABSOLUTE(.), (SZ_end - SZparisc_kernel_start + KERNEL_BINARY_TEXT_START));
53
54	/* align on next page boundary */
55	. = ALIGN(4096);
56	.text :	{
57		_text = .;	/* Text */
58		*(.text)
59		*(.text.*)
60		_etext = . ;
61	}
62	. = ALIGN(8);
63	.data :	{
64		_data = . ;
65		*(.data)
66		*(.data.*)
67		_edata = . ;
68	}
69	. = ALIGN(8);
70	.rodata : {
71		_rodata = . ;
72		*(.rodata)	 /* read-only data */
73		*(.rodata.*)
74		_erodata = . ;
75	}
76	. = ALIGN(8);
77	.bss : {
78		_bss = . ;
79		*(.bss)
80		*(.bss.*)
81		*(COMMON)
82		. = ALIGN(4096);
83		_ebss = .;
84	}
85
86	STABS_DEBUG
87	.note 0 : { *(.note) }
88
89	/* Sections to be discarded */
90	DISCARDS
91	/DISCARD/ : {
92#ifdef CONFIG_64BIT
93		/* temporary hack until binutils is fixed to not emit these
94		 * for static binaries
95		 */
96		*(.PARISC.unwind)	/* no unwind data */
97		*(.interp)
98		*(.dynsym)
99		*(.dynstr)
100		*(.dynamic)
101		*(.hash)
102		*(.gnu.hash)
103#endif
104	}
105}
106