Array of strings sys_dirs must be NULL-terminated
[helenos.git] / kernel / arch / ppc32 / _link.ld.in
blob49cf5e1c9ddb07b12d22ac161ace5f67fd69c97e
1 /** PPC32 linker script
2  *
3  * umapped section:
4  *  kernel text
5  *  kernel data
6  * mapped section:
7  *  kernel text
8  *  kernel data
9  *
10  */
12 #include <arch/boot/boot.h>
13 #include <arch/mm/page.h>
15 ENTRY(kernel_image_start)
16 OUTPUT_FORMAT("elf32-powerpc")
17 OUTPUT_ARCH("powerpc:common")
19 SECTIONS {
20         kernel_load_address = PA2KA(0);
22         .unmapped (SIZEOF_HEADERS): AT (SIZEOF_HEADERS) {
23                 . = ALIGN(0x100);
24                 KEEP(*(K_UNMAPPED_TEXT_START));
25         }
27         .text PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) {
28                 ktext_start = .;
29                 KEEP(*(K_TEXT_START));
30                 *(.text .text.*);
31                 ktext_end = .;
32         }
34         /* stack unwinding data */
35         .eh_frame_hdr : {
36                 eh_frame_hdr_start = .;
37                 *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*);
38                 eh_frame_hdr_end = .;
39         }
41         .eh_frame : {
42                 eh_frame_start = .;
43                 KEEP(*(.eh_frame .eh_frame.*));
44                 eh_frame_end = .;
45         }
47         .data : {
48                 kdata_start = .;
49                 KEEP(*(K_DATA_START));
50                 *(.rodata .rodata.*);
51                 *(.data .data.*);       /* initialized data */
52                 *(.sdata .sdata.*);
53                 *(.sdata2 .sdata2.*);
54                 *(.sbss .sbss.*);
55                 *(.bss .bss.*);        /* uninitialized static variables */
56                 *(COMMON);      /* global variables */
57                 kdata_end = .;
58         }
60         .comment 0 : { *(.comment); }
61         .debug_abbrev 0 : { *(.debug_abbrev); }
62         .debug_abbrev.dwo 0 : { *(      .debug_abbrev.dwo); }
63         .debug_addr 0 : { *(.debug_addr); }
64         .debug_aranges 0 : { *(.debug_aranges); }
65         .debug_cu_index 0 : { *(.debug_cu_index); }
66         .debug_frame 0 : { *(.debug_frame); }
67         .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
68         .debug_info 0 : { *(.debug_info); }
69         .debug_info.dwo 0 : { *(.debug_info.dwo); }
70         .debug_line 0 : { *(.debug_line); }
71         .debug_line.dwo 0 : { *(.debug_line.dwo); }
72         .debug_line_str 0 : { *(.debug_line_str); }
73         .debug_loc 0 : { *(.debug_loc); }
74         .debug_loclists 0 : { *(.debug_loclists); }
75         .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
76         .debug_macinfo 0 : { *(.debug_macinfo); }
77         .debug_macro 0 : { *(.debug_macro); }
78         .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
79         .debug_names 0 : { *(.debug_names); }
80         .debug_pubnames 0 : { *(.debug_pubnames); }
81         .debug_pubtypes 0 : { *(.debug_pubtypes); }
82         .debug_ranges 0 : { *(.debug_ranges); }
83         .debug_rnglists 0 : { *(.debug_rnglists); }
84         .debug_str 0 : { *(.debug_str); }
85         .debug_str.dwo 0 : { *(.debug_str.dwo); }
86         .debug_str_offsets 0 : { *(.debug_str_offsets); }
87         .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
88         .debug_tu_index 0 : { *(.debug_tu_index); }
89         .debug_types 0 : { *(.debug_types); }
91         /DISCARD/ : {
92                 *(*);
93         }