Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.6
      1  1.6       ryo #include "assym.h"
      2  1.6       ryo 
      3  1.1      matt /* Default linker script, for normal executables */
      4  1.1      matt OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64",
      5  1.1      matt 	      "elf64-littleaarch64")
      6  1.1      matt OUTPUT_ARCH(aarch64)
      7  1.1      matt ENTRY(_start)
      8  1.1      matt SECTIONS
      9  1.1      matt {
     10  1.1      matt   /* Read-only sections, merged into text segment: */
     11  1.1      matt   .text           :
     12  1.1      matt   {
     13  1.5       ryo     PROVIDE (__kernel_text = .);
     14  1.1      matt     PROVIDE_HIDDEN (__eprol = .);
     15  1.1      matt     *(.text)
     16  1.1      matt     *(.text.unlikely .text.*_unlikely)
     17  1.1      matt     *(.text.exit .text.exit.*)
     18  1.1      matt     *(.text.startup .text.startup.*)
     19  1.1      matt     *(.text.hot .text.hot.*)
     20  1.1      matt     *(.stub .text.* .gnu.linkonce.t.*)
     21  1.1      matt     /* .gnu.warning sections are handled specially by elf32.em.  */
     22  1.1      matt   } =0
     23  1.1      matt   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
     24  1.1      matt   .rodata1        : { *(.rodata1) }
     25  1.1      matt   .eh_frame_hdr : { *(.eh_frame_hdr) }
     26  1.1      matt   .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
     27  1.1      matt   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
     28  1.1      matt   .gcc_except_table.*) }
     29  1.1      matt   /* These sections are generated by the Sun/Oracle C++ compiler.  */
     30  1.1      matt   .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
     31  1.1      matt   .exception_ranges*) }
     32  1.1      matt   PROVIDE (__etext = .);
     33  1.1      matt   PROVIDE (_etext = .);
     34  1.1      matt   PROVIDE (etext = .);
     35  1.6       ryo   /* Adjust the address for the data segment. Move .data to the next L2 block,
     36  1.6       ryo      and .text and .rodata will be set readonly if needed. */
     37  1.6       ryo   PROVIDE (_erodata = .);
     38  1.6       ryo   . = ALIGN (L2_SIZE);
     39  1.6       ryo   . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
     40  1.1      matt   /* Exception handling  */
     41  1.1      matt   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
     42  1.1      matt   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
     43  1.1      matt   .exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
     44  1.1      matt   .got            : { *(.got) *(.igot) }
     45  1.1      matt   . = DATA_SEGMENT_RELRO_END (24, .);
     46  1.1      matt   .got.plt        : { *(.got.plt)  *(.igot.plt) }
     47  1.1      matt   .data           :
     48  1.1      matt   {
     49  1.1      matt     PROVIDE (__data_start = .);
     50  1.5       ryo     *(.data .gnu.linkonce.d.*)
     51  1.1      matt     SORT(CONSTRUCTORS)
     52  1.1      matt   }
     53  1.1      matt   .data1          : { *(.data1) }
     54  1.5       ryo 
     55  1.5       ryo   . = ALIGN(64);	/* COHERENCY_UNIT */
     56  1.5       ryo   .data.cacheline_aligned :
     57  1.5       ryo   {
     58  1.5       ryo     *(.data.cacheline_aligned)
     59  1.5       ryo   }
     60  1.5       ryo   . = ALIGN(64);	/* COHERENCY_UNIT */
     61  1.5       ryo   .data.read_mostly :
     62  1.5       ryo   {
     63  1.5       ryo     *(.data.read_mostly)
     64  1.5       ryo   }
     65  1.5       ryo   . = ALIGN(64);	/* COHERENCY_UNIT */
     66  1.5       ryo 
     67  1.1      matt   _edata = .; PROVIDE (edata = .);
     68  1.1      matt   . = .;
     69  1.1      matt   __bss_start = .;
     70  1.1      matt   __bss_start__ = .;
     71  1.1      matt   .bss            :
     72  1.1      matt   {
     73  1.2  uebayasi     *(.dynbss)
     74  1.2  uebayasi     *(.bss .bss.* .gnu.linkonce.b.*)
     75  1.2  uebayasi     *(COMMON)
     76  1.2  uebayasi     /* Align here to ensure that the .bss section occupies space up to
     77  1.2  uebayasi        _end.  Align after .bss to ensure correct alignment even if the
     78  1.2  uebayasi        .bss section disappears because there are no input sections.
     79  1.2  uebayasi        FIXME: Why do we need it? When there is no .bss section, we don't
     80  1.2  uebayasi        pad the .data section.  */
     81  1.2  uebayasi     . = ALIGN(. != 0 ? 32 / 8 : 1);
     82  1.1      matt   }
     83  1.1      matt   _bss_end__ = . ; __bss_end__ = . ;
     84  1.1      matt   . = ALIGN(32 / 8);
     85  1.1      matt   . = ALIGN(32 / 8);
     86  1.1      matt   __end__ = . ;
     87  1.1      matt   _end = .; PROVIDE (end = .);
     88  1.1      matt   . = DATA_SEGMENT_END (.);
     89  1.1      matt   .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
     90  1.1      matt   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
     91  1.1      matt }
     92