xref: /openbmc/linux/arch/powerpc/boot/zImage.lds.S (revision 68198dca)
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  .hash : { *(.hash) }
38  .interp : { *(.interp) }
39  .rela.dyn :
40  {
41#ifdef CONFIG_PPC64_BOOT_WRAPPER
42    __rela_dyn_start = .;
43#endif
44    *(.rela*)
45  }
46
47  . = ALIGN(8);
48  .kernel:dtb :
49  {
50    _dtb_start = .;
51    *(.kernel:dtb)
52    _dtb_end = .;
53  }
54
55  . = ALIGN(4096);
56  .kernel:vmlinux.strip :
57  {
58    _vmlinux_start =  .;
59    *(.kernel:vmlinux.strip)
60    _vmlinux_end =  .;
61  }
62
63  . = ALIGN(4096);
64  .kernel:initrd :
65  {
66    _initrd_start =  .;
67    *(.kernel:initrd)
68    _initrd_end =  .;
69  }
70
71#ifdef CONFIG_PPC64_BOOT_WRAPPER
72  . = ALIGN(256);
73  .got :
74  {
75    __toc_start = .;
76    *(.got)
77    *(.toc)
78  }
79#endif
80
81  . = ALIGN(4096);
82  .bss       :
83  {
84    _edata  =  .;
85    __bss_start = .;
86    *(.sbss)
87    *(.bss)
88    *(COMMON)
89    _end = . ;
90  }
91}
92