Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 2 | /* |
3 | * Copyright (C) 2017 Andes Technology Corporation | ||||
4 | * Rick Chen, Andes Technology Corporation <rick@andestech.com> | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 5 | */ |
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 6 | |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 7 | OUTPUT_ARCH("riscv") |
8 | ENTRY(_start) | ||||
9 | |||||
10 | SECTIONS | ||||
11 | { | ||||
12 | . = ALIGN(4); | ||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 13 | .text : { |
Bin Meng | b5369c5 | 2018-09-26 06:55:17 -0700 | [diff] [blame] | 14 | arch/riscv/cpu/start.o (.text) |
Alexander Graf | 7e21fbc | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 15 | } |
16 | |||||
17 | /* This needs to come before *(.text*) */ | ||||
18 | .efi_runtime : { | ||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 19 | __efi_runtime_start = .; |
Alexander Graf | 7e21fbc | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 20 | *(.text.efi_runtime*) |
21 | *(.rodata.efi_runtime*) | ||||
22 | *(.data.efi_runtime*) | ||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 23 | __efi_runtime_stop = .; |
Alexander Graf | 7e21fbc | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 24 | } |
25 | |||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 26 | .text_rest : { |
Alexander Graf | 7e21fbc | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 27 | *(.text*) |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 28 | } |
29 | |||||
30 | . = ALIGN(4); | ||||
31 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } | ||||
32 | |||||
33 | . = ALIGN(4); | ||||
34 | .data : { | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 35 | *(.data*) |
36 | } | ||||
37 | . = ALIGN(4); | ||||
38 | |||||
39 | .got : { | ||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 40 | __got_start = .; |
41 | *(.got.plt) *(.got) | ||||
42 | __got_end = .; | ||||
43 | } | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 44 | |
45 | . = ALIGN(4); | ||||
46 | |||||
Andrew Scull | 99e2fbc | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 47 | __u_boot_list : { |
48 | KEEP(*(SORT(__u_boot_list*))); | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 49 | } |
50 | |||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 51 | . = ALIGN(4); |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 52 | |
Rick Chen | 6836adb | 2018-05-28 19:06:37 +0800 | [diff] [blame] | 53 | .efi_runtime_rel : { |
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 54 | __efi_runtime_rel_start = .; |
Alexander Graf | 7e21fbc | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 55 | *(.rel*.efi_runtime) |
56 | *(.rel*.efi_runtime.*) | ||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 57 | __efi_runtime_rel_stop = .; |
Rick Chen | 6836adb | 2018-05-28 19:06:37 +0800 | [diff] [blame] | 58 | } |
59 | |||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 60 | . = ALIGN(4); |
Rick Chen | 6836adb | 2018-05-28 19:06:37 +0800 | [diff] [blame] | 61 | |
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 62 | /DISCARD/ : { *(.rela.plt*) } |
63 | .rela.dyn : { | ||||
64 | __rel_dyn_start = .; | ||||
65 | *(.rela*) | ||||
66 | __rel_dyn_end = .; | ||||
67 | } | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 68 | |
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 69 | . = ALIGN(4); |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 70 | |
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 71 | .dynsym : { |
72 | __dyn_sym_start = .; | ||||
73 | *(.dynsym) | ||||
74 | __dyn_sym_end = .; | ||||
75 | } | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 76 | |
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 77 | . = ALIGN(4); |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 78 | |
79 | _end = .; | ||||
80 | |||||
81 | .bss : { | ||||
Bin Meng | 3d60156 | 2018-09-26 06:55:12 -0700 | [diff] [blame] | 82 | __bss_start = .; |
83 | *(.bss*) | ||||
Rick Chen | 444c464 | 2019-11-14 13:52:27 +0800 | [diff] [blame] | 84 | . = ALIGN(8); |
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 85 | __bss_end = .; |
86 | } | ||||
Rick Chen | e8e3959 | 2017-12-26 13:55:48 +0800 | [diff] [blame] | 87 | } |