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