1/* SPDX-License-Identifier: GPL-2.0 */
2#include <asm-generic/vmlinux.lds.h>
3
4#ifdef CONFIG_PPC64_BOOT_WRAPPER
5OUTPUT_ARCH(powerpc:common64)
6#else
7OUTPUT_ARCH(powerpc:common)
8#endif
9ENTRY(_zimage_start)
10EXTERN(_zimage_start)
11SECTIONS
12{
13  .text      :
14  {
15    _start = .;
16    *(.text)
17    *(.fixup)
18    _etext = .;
19  }
20  . = ALIGN(4096);
21  .data    :
22  {
23    *(.rodata*)
24    *(.data*)
25    *(.sdata*)
26#ifndef CONFIG_PPC64_BOOT_WRAPPER
27    *(.got2)
28#endif
29  }
30  .dynsym : { *(.dynsym) }
31  .dynstr : { *(.dynstr) }
32  .dynamic :
33  {
34    __dynamic_start = .;
35    *(.dynamic)
36  }
37
38#ifdef CONFIG_PPC64_BOOT_WRAPPER
39  . = ALIGN(256);
40  .got :
41  {
42    __toc_start = .;
43    *(.got)
44    *(.toc)
45  }
46#endif
47
48  .hash : { *(.hash) }
49  .interp : { *(.interp) }
50  .rela.dyn :
51  {
52#ifdef CONFIG_PPC64_BOOT_WRAPPER
53    __rela_dyn_start = .;
54#endif
55    *(.rela*)
56  }
57
58  . = ALIGN(8);
59  .kernel:dtb :
60  {
61    _dtb_start = .;
62    *(.kernel:dtb)
63    _dtb_end = .;
64  }
65
66  . = ALIGN(4096);
67  .kernel:vmlinux.strip :
68  {
69    _vmlinux_start =  .;
70    *(.kernel:vmlinux.strip)
71    _vmlinux_end =  .;
72  }
73
74  . = ALIGN(4096);
75  .kernel:initrd :
76  {
77    _initrd_start =  .;
78    *(.kernel:initrd)
79    _initrd_end =  .;
80  }
81
82  . = ALIGN(4096);
83  .kernel:esm_blob :
84  {
85    _esm_blob_start =  .;
86    *(.kernel:esm_blob)
87    _esm_blob_end =  .;
88  }
89
90  . = ALIGN(4096);
91  .bss       :
92  {
93    _edata  =  .;
94    __bss_start = .;
95    *(.sbss)
96    *(.bss)
97    *(COMMON)
98    _end = . ;
99  }
100}
101