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