1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * Copyright (C) 2017 Andes Technology Corporation 4 * Rick Chen, Andes Technology Corporation <rick@andestech.com> 5 */ 6 7OUTPUT_ARCH("riscv") 8ENTRY(_start) 9 10SECTIONS 11{ 12 . = ALIGN(4); 13 .text : { 14 arch/riscv/cpu/start.o (.text) 15 } 16 17 /* This needs to come before *(.text*) */ 18 .efi_runtime : { 19 __efi_runtime_start = .; 20 *(.text.efi_runtime*) 21 *(.rodata.efi_runtime*) 22 *(.data.efi_runtime*) 23 __efi_runtime_stop = .; 24 } 25 26 .text_rest : { 27 *(.text*) 28 } 29 30 . = ALIGN(4); 31 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } 32 33 . = ALIGN(4); 34 .data : { 35 __global_pointer$ = . + 0x800; 36 *(.data*) 37 } 38 . = ALIGN(4); 39 40 .got : { 41 __got_start = .; 42 *(.got.plt) *(.got) 43 __got_end = .; 44 } 45 46 . = ALIGN(4); 47 48 .u_boot_list : { 49 KEEP(*(SORT(.u_boot_list*))); 50 } 51 52 . = ALIGN(4); 53 54 .efi_runtime_rel : { 55 __efi_runtime_rel_start = .; 56 *(.rel*.efi_runtime) 57 *(.rel*.efi_runtime.*) 58 __efi_runtime_rel_stop = .; 59 } 60 61 . = ALIGN(4); 62 63 /DISCARD/ : { *(.rela.plt*) } 64 .rela.dyn : { 65 __rel_dyn_start = .; 66 *(.rela*) 67 __rel_dyn_end = .; 68 } 69 70 . = ALIGN(4); 71 72 .dynsym : { 73 __dyn_sym_start = .; 74 *(.dynsym) 75 __dyn_sym_end = .; 76 } 77 78 . = ALIGN(4); 79 80 _end = .; 81 82 .bss : { 83 __bss_start = .; 84 *(.bss*) 85 . = ALIGN(4); 86 __bss_end = .; 87 } 88} 89