1OUTPUT_FORMAT(elf64-littleaarch64) 2OUTPUT_ARCH(aarch64) 3ENTRY(_start) 4SECTIONS 5{ 6 . = (0x0e100000 + (0x0e100000 - 0x0e100000)); 7 ASSERT(!((0x0e100000 + (0x0e100000 - 0x0e100000)) & 127), "text start should align to 128bytes") 8 __text_start = .; 9 __flatmap_unpg_rx_start = ((__text_start) - ((__text_start) % ((1 << (12))))); 10 .text : { 11 KEEP(*(.text._start)) 12 __identity_map_init_start = .; 13 *(.identity_map .identity_map.* 14 .text.get_core_pos_mpidr) 15 __identity_map_init_end = .; 16 KEEP(*(.text.init .text.plat_cpu_reset_early .text.reset .text.reset_primary .text.unhandled_cpu .text.__assert_flat_mapped_range)) 17 *(.text .text.*) 18 *(.sram.text.glue_7* .gnu.linkonce.t.*) 19 . = ALIGN(8); 20 } 21 __text_end = .; 22 __flatmap_unpg_rx_size = . - __flatmap_unpg_rx_start; 23 __flatmap_unpg_ro_start = .; 24 .rodata : ALIGN(8) { 25 __rodata_start = .; 26 *(.gnu.linkonce.r.*) 27 *(.rodata .rodata.*) 28 . = ALIGN(8); 29 KEEP(*(SORT(.scattered_array*))); 30 . = ALIGN(8); 31 __rodata_end = .; 32 } 33 .got : { *(.got.plt) *(.got) } 34 .note.gnu.property : { *(.note.gnu.property) } 35 .plt : { *(.plt) } 36 .ctors : ALIGN(8) { 37 __ctor_list = .; 38 KEEP(*(.ctors .ctors.* .init_array .init_array.*)) 39 __ctor_end = .; 40 } 41 .dtors : ALIGN(8) { 42 __dtor_list = .; 43 KEEP(*(.dtors .dtors.* .fini_array .fini_array.*)) 44 __dtor_end = .; 45 } 46 .ARM.exidx : { 47 __exidx_start = .; 48 *(.ARM.exidx* .gnu.linkonce.armexidx.*) 49 __exidx_end = .; 50 } 51 .ARM.extab : { 52 __extab_start = .; 53 *(.ARM.extab*) 54 __extab_end = .; 55 } 56 . = ALIGN((1 << (12))); 57 __flatmap_unpg_ro_size = . - __flatmap_unpg_ro_start; 58 __flatmap_unpg_rw_start = .; 59 .data : ALIGN(8) { 60 __data_start_rom = .; 61 __data_start = .; 62 *(.data .data.* .gnu.linkonce.d.*) 63 . = ALIGN(8); 64 } 65 .bss : { 66 __data_end = .; 67 __bss_start = .; 68 *(.bss .bss.*) 69 *(.gnu.linkonce.b.*) 70 *(COMMON) 71 . = ALIGN(8); 72 __bss_end = .; 73 } 74 .heap1 (NOLOAD) : { 75 __heap1_start = .; 76 . += 65536; 77 . = ALIGN(4 * 1024); 78 __heap1_end = .; 79 } 80 .nozi (NOLOAD) : { 81 __nozi_start = .; 82 KEEP(*(.nozi .nozi.*)) 83 . = ALIGN(16); 84 __nozi_end = .; 85 __nozi_stack_start = .; 86 KEEP(*(.nozi_stack .nozi_stack.*)) 87 . = ALIGN(8); 88 __nozi_stack_end = .; 89 } 90 __end = .; 91 __init_size = __data_end - (0x0e100000 + (0x0e100000 - 0x0e100000)); 92 ASSERT(. <= (0x0e100000 + (1 << (21))), 93 "TEE_RAM_VA_SIZE is too small") 94 . = 0x0e100000 + (1 << (21)); 95 _end_of_ram = .; 96 __flatmap_unpg_rw_size = _end_of_ram - __flatmap_unpg_rw_start; 97 __get_tee_init_end = .; 98 .dynamic : { *(.dynamic) } 99 .hash : { *(.hash) } 100 .dynsym : { *(.dynsym) } 101 .dynstr : { *(.dynstr) } 102 .rel : { 103 *(.rel.*) 104 } 105 .rela : { 106 *(.rela.*) 107 } 108 /DISCARD/ : { 109 *(.comment .note .eh_frame .interp) 110 *(__keep_meta_vars*) 111 } 112} 113__vcore_unpg_rx_start = __flatmap_unpg_rx_start; 114__vcore_unpg_ro_start = __flatmap_unpg_ro_start; 115__vcore_unpg_rx_size = __flatmap_unpg_rx_size + __flatmap_unpg_ro_size; 116__vcore_unpg_ro_size = 0; 117__vcore_unpg_rx_end = __vcore_unpg_rx_start + __vcore_unpg_rx_size; 118__vcore_unpg_ro_end = __vcore_unpg_ro_start + __vcore_unpg_ro_size; 119__vcore_unpg_rw_start = __flatmap_unpg_rw_start; 120__vcore_unpg_rw_size = __flatmap_unpg_rw_size; 121__vcore_unpg_rw_end = __vcore_unpg_rw_start + __vcore_unpg_rw_size; 122