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
Line 
1/** SPARC64 linker script
2 *
3 * It is ELF format, but its only section looks like this:
4 * kernel text
5 * kernel data
6 *
7 */
8
9#include <arch/boot/boot.h>
10
11ENTRY(kernel_image_start)
12
13SECTIONS {
14 kernel_load_address = VMA;
15
16 .text (VMA + SIZEOF_HEADERS): AT (LMA + SIZEOF_HEADERS) {
17 ktext_start = .;
18 KEEP(*(K_TEXT_START));
19 *(.text .text.*);
20 ktext_end = .;
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 }
35
36 .data : {
37 kdata_start = .;
38 KEEP(*(K_DATA_START));
39 *(.rodata .rodata.*);
40 *(.data .data.*); /* initialized data */
41 *(.sdata .sdata.*);
42 *(.sdata2 .sdata2.*);
43 *(.sbss .sbss.*);
44 . = ALIGN(8);
45 *(.bss .bss.*); /* uninitialized static variables */
46 *(COMMON); /* global variables */
47 kdata_end = .;
48 }
49
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
81 /DISCARD/ : {
82 *(*);
83 }
84
85}
Note: See TracBrowser for help on using the repository browser.