1 | /*
|
---|
2 | * ARM linker script
|
---|
3 | *
|
---|
4 | * kernel text
|
---|
5 | * kernel data
|
---|
6 | *
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifdef MACHINE_gta02
|
---|
10 | #define KERNEL_LOAD_ADDRESS 0xb0a08000
|
---|
11 | #elif defined MACHINE_beagleboardxm
|
---|
12 | #define KERNEL_LOAD_ADDRESS 0x80a00000
|
---|
13 | #elif defined MACHINE_beaglebone
|
---|
14 | #define KERNEL_LOAD_ADDRESS 0x80a00000
|
---|
15 | #elif defined MACHINE_raspberrypi
|
---|
16 | #define KERNEL_LOAD_ADDRESS 0x80a08000
|
---|
17 | #else
|
---|
18 | #define KERNEL_LOAD_ADDRESS 0x80a00000
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | OUTPUT_ARCH(arm)
|
---|
22 | ENTRY(kernel_image_start)
|
---|
23 |
|
---|
24 | SECTIONS {
|
---|
25 | . = KERNEL_LOAD_ADDRESS;
|
---|
26 | kernel_load_address = .;
|
---|
27 | . = . + SIZEOF_HEADERS;
|
---|
28 |
|
---|
29 | .text : {
|
---|
30 | ktext_start = .;
|
---|
31 | *(.text .text.*);
|
---|
32 | ktext_end = .;
|
---|
33 | }
|
---|
34 |
|
---|
35 | /* stack unwinding data */
|
---|
36 | .eh_frame_hdr : {
|
---|
37 | eh_frame_hdr_start = .;
|
---|
38 | *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*);
|
---|
39 | eh_frame_hdr_end = .;
|
---|
40 | }
|
---|
41 |
|
---|
42 | .eh_frame : {
|
---|
43 | eh_frame_start = .;
|
---|
44 | KEEP(*(.eh_frame .eh_frame.*));
|
---|
45 | eh_frame_end = .;
|
---|
46 | }
|
---|
47 |
|
---|
48 | .data : {
|
---|
49 | kdata_start = .;
|
---|
50 | *(.data .data.*); /* initialized data */
|
---|
51 | *(.bss .bss.*); /* uninitialized static variables */
|
---|
52 | *(COMMON); /* global variables */
|
---|
53 |
|
---|
54 | *(.rodata .rodata.*);
|
---|
55 | *(.sdata .sdata.*);
|
---|
56 | *(.sbss .sbss.*);
|
---|
57 | *(.scommon .scommon.*);
|
---|
58 | kdata_end = .;
|
---|
59 | }
|
---|
60 |
|
---|
61 | .comment 0 : { *(.comment); }
|
---|
62 | .debug_abbrev 0 : { *(.debug_abbrev); }
|
---|
63 | .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); }
|
---|
64 | .debug_addr 0 : { *(.debug_addr); }
|
---|
65 | .debug_aranges 0 : { *(.debug_aranges); }
|
---|
66 | .debug_cu_index 0 : { *(.debug_cu_index); }
|
---|
67 | .debug_frame 0 : { *(.debug_frame); }
|
---|
68 | .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
|
---|
69 | .debug_info 0 : { *(.debug_info); }
|
---|
70 | .debug_info.dwo 0 : { *(.debug_info.dwo); }
|
---|
71 | .debug_line 0 : { *(.debug_line); }
|
---|
72 | .debug_line.dwo 0 : { *(.debug_line.dwo); }
|
---|
73 | .debug_line_str 0 : { *(.debug_line_str); }
|
---|
74 | .debug_loc 0 : { *(.debug_loc); }
|
---|
75 | .debug_loclists 0 : { *(.debug_loclists); }
|
---|
76 | .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
|
---|
77 | .debug_macinfo 0 : { *(.debug_macinfo); }
|
---|
78 | .debug_macro 0 : { *(.debug_macro); }
|
---|
79 | .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
|
---|
80 | .debug_names 0 : { *(.debug_names); }
|
---|
81 | .debug_pubnames 0 : { *(.debug_pubnames); }
|
---|
82 | .debug_pubtypes 0 : { *(.debug_pubtypes); }
|
---|
83 | .debug_ranges 0 : { *(.debug_ranges); }
|
---|
84 | .debug_rnglists 0 : { *(.debug_rnglists); }
|
---|
85 | .debug_str 0 : { *(.debug_str); }
|
---|
86 | .debug_str.dwo 0 : { *(.debug_str.dwo); }
|
---|
87 | .debug_str_offsets 0 : { *(.debug_str_offsets); }
|
---|
88 | .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
|
---|
89 | .debug_tu_index 0 : { *(.debug_tu_index); }
|
---|
90 | .debug_types 0 : { *(.debug_types); }
|
---|
91 |
|
---|
92 | /DISCARD/ : {
|
---|
93 | *(.mdebug*);
|
---|
94 | *(.pdr);
|
---|
95 | *(.comment);
|
---|
96 | *(.note);
|
---|
97 | }
|
---|
98 | }
|
---|