Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.4.2.5
      1  1.4.2.2  pgoyette #include "assym.h"
      2  1.4.2.2  pgoyette 
      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.4.2.2  pgoyette 
      9      1.1      matt SECTIONS
     10      1.1      matt {
     11  1.4.2.2  pgoyette 	.text :
     12  1.4.2.2  pgoyette 	{
     13  1.4.2.3  pgoyette 		PROVIDE(__kernel_text = .);
     14  1.4.2.2  pgoyette 		*(.text)
     15  1.4.2.3  pgoyette 		*(.text.*)
     16  1.4.2.3  pgoyette 		*(.stub)
     17  1.4.2.2  pgoyette 	} =0
     18  1.4.2.2  pgoyette 
     19  1.4.2.2  pgoyette 	/* Move .rodata to the next L2 block to set unexecutable */
     20  1.4.2.3  pgoyette 	. = ALIGN(L2_SIZE);
     21  1.4.2.3  pgoyette 
     22  1.4.2.3  pgoyette 	PROVIDE(__rodata_start = .);
     23  1.4.2.3  pgoyette 	.rodata :
     24  1.4.2.3  pgoyette 	{
     25  1.4.2.3  pgoyette 		*(.rodata)
     26  1.4.2.3  pgoyette 		*(.rodata.*)
     27  1.4.2.5  pgoyette 		. = ALIGN(64);
     28  1.4.2.5  pgoyette 		__CTOR_LIST__ = .;
     29  1.4.2.5  pgoyette 		*(.ctors)
     30  1.4.2.5  pgoyette 		*(.init_array)
     31  1.4.2.5  pgoyette 		__CTOR_END__ = .;
     32  1.4.2.3  pgoyette 	}
     33  1.4.2.3  pgoyette 
     34  1.4.2.3  pgoyette 	PROVIDE(_etext = .);
     35  1.4.2.3  pgoyette 	PROVIDE(etext = .);
     36  1.4.2.2  pgoyette 
     37  1.4.2.2  pgoyette 	/*
     38  1.4.2.2  pgoyette 	 * Adjust the address for the data segment. Move .data to the next
     39  1.4.2.2  pgoyette 	 * L2 block, and .text and .rodata will be set readonly if needed.
     40  1.4.2.2  pgoyette 	 */
     41  1.4.2.3  pgoyette 	PROVIDE(_erodata = .);
     42  1.4.2.3  pgoyette 	. = ALIGN(L2_SIZE);
     43  1.4.2.3  pgoyette 
     44  1.4.2.3  pgoyette 	.data :
     45  1.4.2.2  pgoyette 	{
     46  1.4.2.3  pgoyette 		PROVIDE(__data_start = .);
     47  1.4.2.3  pgoyette 		*(.data)
     48  1.4.2.2  pgoyette 	}
     49  1.4.2.2  pgoyette 
     50  1.4.2.4  pgoyette 	. = ALIGN(COHERENCY_UNIT);
     51  1.4.2.2  pgoyette 	.data.cacheline_aligned :
     52  1.4.2.2  pgoyette 	{
     53  1.4.2.2  pgoyette 		*(.data.cacheline_aligned)
     54  1.4.2.2  pgoyette 	}
     55  1.4.2.4  pgoyette 	. = ALIGN(COHERENCY_UNIT);
     56  1.4.2.2  pgoyette 	.data.read_mostly :
     57  1.4.2.2  pgoyette 	{
     58  1.4.2.2  pgoyette 		*(.data.read_mostly)
     59  1.4.2.2  pgoyette 	}
     60  1.4.2.4  pgoyette 	. = ALIGN(COHERENCY_UNIT);
     61  1.4.2.2  pgoyette 
     62  1.4.2.3  pgoyette 	_edata = .;
     63  1.4.2.3  pgoyette 	PROVIDE (edata = .);
     64  1.4.2.2  pgoyette 
     65  1.4.2.2  pgoyette 	__bss_start = .;
     66  1.4.2.2  pgoyette 	__bss_start__ = .;
     67  1.4.2.2  pgoyette 	.bss :
     68  1.4.2.2  pgoyette 	{
     69  1.4.2.3  pgoyette 		*(.bss)
     70  1.4.2.3  pgoyette 		*(.bss.*)
     71  1.4.2.2  pgoyette 		*(COMMON)
     72  1.4.2.2  pgoyette 
     73  1.4.2.2  pgoyette 		/*
     74  1.4.2.2  pgoyette 		 * Align here to ensure that the .bss section occupies space
     75  1.4.2.2  pgoyette 		 * up to _end. Align after .bss to ensure correct alignment
     76  1.4.2.2  pgoyette 		 * even if the .bss section disappears because there are no
     77  1.4.2.2  pgoyette 		 * input sections.
     78  1.4.2.2  pgoyette 		 *
     79  1.4.2.2  pgoyette 		 * FIXME: Why do we need it? When there is no .bss section,
     80  1.4.2.2  pgoyette 		 * we don't pad the .data section.
     81  1.4.2.2  pgoyette 		 */
     82  1.4.2.2  pgoyette 		. = ALIGN(. != 0 ? 32 / 8 : 1);
     83  1.4.2.2  pgoyette 	}
     84  1.4.2.3  pgoyette 	_bss_end__ = . ;
     85  1.4.2.3  pgoyette 	__bss_end__ = . ;
     86  1.4.2.2  pgoyette 	. = ALIGN(32 / 8);
     87  1.4.2.2  pgoyette 
     88  1.4.2.2  pgoyette 	__end__ = . ;
     89  1.4.2.3  pgoyette 	_end = .;
     90  1.4.2.3  pgoyette 	PROVIDE(end = .);
     91      1.1      matt }
     92