kern.ldscript revision 1.5
11.1Smatt/* Default linker script, for normal executables */ 21.1SmattOUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64", 31.1Smatt "elf64-littleaarch64") 41.1SmattOUTPUT_ARCH(aarch64) 51.1SmattENTRY(_start) 61.1SmattSECTIONS 71.1Smatt{ 81.1Smatt /* Read-only sections, merged into text segment: */ 91.1Smatt .text : 101.1Smatt { 111.5Sryo PROVIDE (__kernel_text = .); 121.1Smatt PROVIDE_HIDDEN (__eprol = .); 131.1Smatt *(.text) 141.1Smatt *(.text.unlikely .text.*_unlikely) 151.1Smatt *(.text.exit .text.exit.*) 161.1Smatt *(.text.startup .text.startup.*) 171.1Smatt *(.text.hot .text.hot.*) 181.1Smatt *(.stub .text.* .gnu.linkonce.t.*) 191.1Smatt /* .gnu.warning sections are handled specially by elf32.em. */ 201.1Smatt } =0 211.1Smatt .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 221.1Smatt .rodata1 : { *(.rodata1) } 231.1Smatt .eh_frame_hdr : { *(.eh_frame_hdr) } 241.1Smatt .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } 251.1Smatt .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table 261.1Smatt .gcc_except_table.*) } 271.1Smatt /* These sections are generated by the Sun/Oracle C++ compiler. */ 281.1Smatt .exception_ranges : ONLY_IF_RO { *(.exception_ranges 291.1Smatt .exception_ranges*) } 301.1Smatt PROVIDE (__etext = .); 311.1Smatt PROVIDE (_etext = .); 321.1Smatt PROVIDE (etext = .); 331.1Smatt /* Adjust the address for the data segment. We want to adjust up to 341.1Smatt the same address within the page on the next page up. */ 351.1Smatt . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); 361.1Smatt /* Exception handling */ 371.1Smatt .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } 381.1Smatt .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } 391.1Smatt .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } 401.1Smatt .got : { *(.got) *(.igot) } 411.1Smatt . = DATA_SEGMENT_RELRO_END (24, .); 421.1Smatt .got.plt : { *(.got.plt) *(.igot.plt) } 431.1Smatt .data : 441.1Smatt { 451.1Smatt PROVIDE (__data_start = .); 461.5Sryo *(.data .gnu.linkonce.d.*) 471.1Smatt SORT(CONSTRUCTORS) 481.1Smatt } 491.1Smatt .data1 : { *(.data1) } 501.5Sryo 511.5Sryo . = ALIGN(64); /* COHERENCY_UNIT */ 521.5Sryo .data.cacheline_aligned : 531.5Sryo { 541.5Sryo *(.data.cacheline_aligned) 551.5Sryo } 561.5Sryo . = ALIGN(64); /* COHERENCY_UNIT */ 571.5Sryo .data.read_mostly : 581.5Sryo { 591.5Sryo *(.data.read_mostly) 601.5Sryo } 611.5Sryo . = ALIGN(64); /* COHERENCY_UNIT */ 621.5Sryo 631.1Smatt _edata = .; PROVIDE (edata = .); 641.1Smatt . = .; 651.1Smatt __bss_start = .; 661.1Smatt __bss_start__ = .; 671.1Smatt .bss : 681.1Smatt { 691.2Suebayasi *(.dynbss) 701.2Suebayasi *(.bss .bss.* .gnu.linkonce.b.*) 711.2Suebayasi *(COMMON) 721.2Suebayasi /* Align here to ensure that the .bss section occupies space up to 731.2Suebayasi _end. Align after .bss to ensure correct alignment even if the 741.2Suebayasi .bss section disappears because there are no input sections. 751.2Suebayasi FIXME: Why do we need it? When there is no .bss section, we don't 761.2Suebayasi pad the .data section. */ 771.2Suebayasi . = ALIGN(. != 0 ? 32 / 8 : 1); 781.1Smatt } 791.1Smatt _bss_end__ = . ; __bss_end__ = . ; 801.1Smatt . = ALIGN(32 / 8); 811.1Smatt . = ALIGN(32 / 8); 821.1Smatt __end__ = . ; 831.1Smatt _end = .; PROVIDE (end = .); 841.1Smatt . = DATA_SEGMENT_END (.); 851.1Smatt .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } 861.1Smatt .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } 871.1Smatt} 88