source: mainline/kernel/arch/sparc64/_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.3 KB
RevLine 
[6bc4dbd]1/** SPARC64 linker script
[2a99fa8]2 *
3 * It is ELF format, but its only section looks like this:
[6da1013f]4 * kernel text
5 * kernel data
[2a99fa8]6 *
7 */
8
[0e4dd7b]9#include <arch/boot/boot.h>
[6bc4dbd]10
[2a99fa8]11ENTRY(kernel_image_start)
12
13SECTIONS {
[cfdeedc]14 kernel_load_address = VMA;
[8a1afd2]15
[6677acb]16 .text (VMA + SIZEOF_HEADERS): AT (LMA + SIZEOF_HEADERS) {
[2a99fa8]17 ktext_start = .;
[c89ae25]18 KEEP(*(K_TEXT_START));
[eaf4c393]19 *(.text .text.*);
[2a99fa8]20 ktext_end = .;
[6677acb]21 }
22
23 /* stack unwinding data */
24 .eh_frame_hdr : {
25 eh_frame_hdr_start = .;
26 *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*);
27 eh_frame_hdr_end = .;
28 }
29
30 .eh_frame : {
31 eh_frame_start = .;
32 KEEP(*(.eh_frame .eh_frame.*));
33 eh_frame_end = .;
34 }
[f1380b7]35
[6677acb]36 .data : {
[2a99fa8]37 kdata_start = .;
[c89ae25]38 KEEP(*(K_DATA_START));
[eaf4c393]39 *(.rodata .rodata.*);
[c89ae25]40 *(.data .data.*); /* initialized data */
41 *(.sdata .sdata.*);
42 *(.sdata2 .sdata2.*);
43 *(.sbss .sbss.*);
[a7961271]44 . = ALIGN(8);
[c89ae25]45 *(.bss .bss.*); /* uninitialized static variables */
[6da1013f]46 *(COMMON); /* global variables */
[2a99fa8]47 kdata_end = .;
48 }
[f1380b7]49
[da13982]50 .comment 0 : { *(.comment); }
51 .debug_abbrev 0 : { *(.debug_abbrev); }
52 .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); }
53 .debug_addr 0 : { *(.debug_addr); }
54 .debug_aranges 0 : { *(.debug_aranges); }
55 .debug_cu_index 0 : { *(.debug_cu_index); }
56 .debug_frame 0 : { *(.debug_frame); }
57 .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
58 .debug_info 0 : { *(.debug_info); }
59 .debug_info.dwo 0 : { *(.debug_info.dwo); }
60 .debug_line 0 : { *(.debug_line); }
61 .debug_line.dwo 0 : { *(.debug_line.dwo); }
62 .debug_line_str 0 : { *(.debug_line_str); }
63 .debug_loc 0 : { *(.debug_loc); }
64 .debug_loclists 0 : { *(.debug_loclists); }
65 .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
66 .debug_macinfo 0 : { *(.debug_macinfo); }
67 .debug_macro 0 : { *(.debug_macro); }
68 .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
69 .debug_names 0 : { *(.debug_names); }
70 .debug_pubnames 0 : { *(.debug_pubnames); }
71 .debug_pubtypes 0 : { *(.debug_pubtypes); }
72 .debug_ranges 0 : { *(.debug_ranges); }
73 .debug_rnglists 0 : { *(.debug_rnglists); }
74 .debug_str 0 : { *(.debug_str); }
75 .debug_str.dwo 0 : { *(.debug_str.dwo); }
76 .debug_str_offsets 0 : { *(.debug_str_offsets); }
77 .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
78 .debug_tu_index 0 : { *(.debug_tu_index); }
79 .debug_types 0 : { *(.debug_types); }
80
[81e1396]81 /DISCARD/ : {
[7bb6b06]82 *(*);
[81e1396]83 }
[f1380b7]84
[2a99fa8]85}
Note: See TracBrowser for help on using the repository browser.