blob: f414473e54bce6e3d77d975368fab28f8026ccc2 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Rick Chene8e39592017-12-26 13:55:48 +08002/*
3 * Copyright (C) 2017 Andes Technology Corporation
4 * Rick Chen, Andes Technology Corporation <rick@andestech.com>
Rick Chene8e39592017-12-26 13:55:48 +08005 */
Bin Meng3d601562018-09-26 06:55:12 -07006
Rick Chene8e39592017-12-26 13:55:48 +08007OUTPUT_ARCH("riscv")
8ENTRY(_start)
9
10SECTIONS
11{
12 . = ALIGN(4);
Bin Meng3d601562018-09-26 06:55:12 -070013 .text : {
Rick Chen6f4dd622018-05-29 09:54:40 +080014 arch/riscv/cpu/ax25/start.o (.text)
Alexander Graf7e21fbc2018-06-12 07:48:37 +020015 }
16
17 /* This needs to come before *(.text*) */
18 .efi_runtime : {
Bin Meng3d601562018-09-26 06:55:12 -070019 __efi_runtime_start = .;
Alexander Graf7e21fbc2018-06-12 07:48:37 +020020 *(.text.efi_runtime*)
21 *(.rodata.efi_runtime*)
22 *(.data.efi_runtime*)
Bin Meng3d601562018-09-26 06:55:12 -070023 __efi_runtime_stop = .;
Alexander Graf7e21fbc2018-06-12 07:48:37 +020024 }
25
Bin Meng3d601562018-09-26 06:55:12 -070026 .text_rest : {
Alexander Graf7e21fbc2018-06-12 07:48:37 +020027 *(.text*)
Rick Chene8e39592017-12-26 13:55:48 +080028 }
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 : {
Bin Meng3d601562018-09-26 06:55:12 -070041 __got_start = .;
42 *(.got.plt) *(.got)
43 __got_end = .;
44 }
Rick Chene8e39592017-12-26 13:55:48 +080045
46 . = ALIGN(4);
47
48 .u_boot_list : {
49 KEEP(*(SORT(.u_boot_list*)));
50 }
51
Bin Meng3d601562018-09-26 06:55:12 -070052 . = ALIGN(4);
Rick Chene8e39592017-12-26 13:55:48 +080053
Rick Chen6836adb2018-05-28 19:06:37 +080054 .efi_runtime_rel : {
Bin Meng3d601562018-09-26 06:55:12 -070055 __efi_runtime_rel_start = .;
Alexander Graf7e21fbc2018-06-12 07:48:37 +020056 *(.rel*.efi_runtime)
57 *(.rel*.efi_runtime.*)
Bin Meng3d601562018-09-26 06:55:12 -070058 __efi_runtime_rel_stop = .;
Rick Chen6836adb2018-05-28 19:06:37 +080059 }
60
Bin Meng3d601562018-09-26 06:55:12 -070061 . = ALIGN(4);
Rick Chen6836adb2018-05-28 19:06:37 +080062
Bin Meng3d601562018-09-26 06:55:12 -070063 /DISCARD/ : { *(.rela.plt*) }
64 .rela.dyn : {
65 __rel_dyn_start = .;
66 *(.rela*)
67 __rel_dyn_end = .;
68 }
Rick Chene8e39592017-12-26 13:55:48 +080069
Bin Meng3d601562018-09-26 06:55:12 -070070 . = ALIGN(4);
Rick Chene8e39592017-12-26 13:55:48 +080071
Bin Meng3d601562018-09-26 06:55:12 -070072 .dynsym : {
73 __dyn_sym_start = .;
74 *(.dynsym)
75 __dyn_sym_end = .;
76 }
Rick Chene8e39592017-12-26 13:55:48 +080077
Bin Meng3d601562018-09-26 06:55:12 -070078 . = ALIGN(4);
Rick Chene8e39592017-12-26 13:55:48 +080079
80 _end = .;
81
82 .bss : {
Bin Meng3d601562018-09-26 06:55:12 -070083 __bss_start = .;
84 *(.bss*)
Rick Chene8e39592017-12-26 13:55:48 +080085 . = ALIGN(4);
86 __bss_end = .;
87 }
Rick Chene8e39592017-12-26 13:55:48 +080088}