source: mainline/kernel/arch/arm32/_link.ld.in

Last change on this file was 6677acb, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 19 months ago

Emit .text/.data/.eh_frame sections in kernel ELF files

Gives tools like objdump an easier time interpreting contents of
the file, and allows kernel to find .eh_frame_hdr since the linker
emits a program header for it when it's present under the standard
name.

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[d630139]1/*
[edd7aa6d]2 * ARM linker script
3 *
[d630139]4 * kernel text
5 * kernel data
[edd7aa6d]6 *
[d630139]7 */
8
[d7ef14b]9#ifdef MACHINE_gta02
10#define KERNEL_LOAD_ADDRESS 0xb0a08000
[161fbda]11#elif defined MACHINE_beagleboardxm
12#define KERNEL_LOAD_ADDRESS 0x80a00000
[b42c8d8]13#elif defined MACHINE_beaglebone
[9f55b52f]14#define KERNEL_LOAD_ADDRESS 0x80a00000
[8f9d70b]15#elif defined MACHINE_raspberrypi
16#define KERNEL_LOAD_ADDRESS 0x80a08000
[d7ef14b]17#else
[1317380]18#define KERNEL_LOAD_ADDRESS 0x80a00000
[d7ef14b]19#endif
[d630139]20
[edd7aa6d]21OUTPUT_ARCH(arm)
22ENTRY(kernel_image_start)
[6b781c0]23
[d630139]24SECTIONS {
[6b781c0]25 . = KERNEL_LOAD_ADDRESS;
[8a1afd2]26 kernel_load_address = .;
[cfdeedc]27 . = . + SIZEOF_HEADERS;
[6677acb]28
[d630139]29 .text : {
30 ktext_start = .;
[c89ae25]31 *(.text .text.*);
[d630139]32 ktext_end = .;
33 }
[6677acb]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
[d630139]48 .data : {
49 kdata_start = .;
[c89ae25]50 *(.data .data.*); /* initialized data */
51 *(.bss .bss.*); /* uninitialized static variables */
[edd7aa6d]52 *(COMMON); /* global variables */
[f1380b7]53
[da13982]54 *(.rodata .rodata.*);
[c89ae25]55 *(.sdata .sdata.*);
56 *(.sbss .sbss.*);
57 *(.scommon .scommon.*);
[6677acb]58 kdata_end = .;
[d630139]59 }
[f1380b7]60
[da13982]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
[d630139]92 /DISCARD/ : {
93 *(.mdebug*);
94 *(.pdr);
95 *(.comment);
96 *(.note);
97 }
98}
Note: See TracBrowser for help on using the repository browser.