Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2004-2008 Texas Instruments |
| 4 | * |
| 5 | * (C) Copyright 2002 |
| 6 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 10 | OUTPUT_ARCH(arm) |
| 11 | ENTRY(_start) |
| 12 | SECTIONS |
| 13 | { |
| 14 | . = 0x00000000; |
| 15 | |
| 16 | . = ALIGN(4); |
| 17 | .text : |
| 18 | { |
| 19 | *(.__image_copy_start) |
Masahiro Yamada | 22ea415 | 2014-06-05 19:47:45 +0900 | [diff] [blame] | 20 | *(.vectors) |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 21 | CPUDIR/start.o (.text*) |
Alexander Graf | 94a10f2 | 2018-06-12 07:48:37 +0200 | [diff] [blame^] | 22 | } |
| 23 | |
| 24 | /* This needs to come before *(.text*) */ |
| 25 | .__efi_runtime_start : { |
| 26 | *(.__efi_runtime_start) |
| 27 | } |
| 28 | |
| 29 | .efi_runtime : { |
| 30 | *(.text.efi_runtime*) |
| 31 | *(.rodata.efi_runtime*) |
| 32 | *(.data.efi_runtime*) |
| 33 | } |
| 34 | |
| 35 | .__efi_runtime_stop : { |
| 36 | *(.__efi_runtime_stop) |
| 37 | } |
| 38 | |
| 39 | .text_rest : |
| 40 | { |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 41 | *(.text*) |
| 42 | } |
| 43 | |
| 44 | . = ALIGN(4); |
| 45 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } |
| 46 | |
| 47 | . = ALIGN(4); |
| 48 | .data : { |
| 49 | *(.data*) |
| 50 | } |
| 51 | |
| 52 | . = ALIGN(4); |
| 53 | |
| 54 | . = .; |
| 55 | |
| 56 | . = ALIGN(4); |
| 57 | .u_boot_list : { |
| 58 | KEEP(*(SORT(.u_boot_list*))); |
| 59 | } |
| 60 | |
| 61 | . = ALIGN(4); |
| 62 | |
Alexander Graf | a56b5f1 | 2017-07-03 13:41:34 +0200 | [diff] [blame] | 63 | .efi_runtime_rel_start : |
| 64 | { |
| 65 | *(.__efi_runtime_rel_start) |
| 66 | } |
| 67 | |
| 68 | .efi_runtime_rel : { |
Alexander Graf | 94a10f2 | 2018-06-12 07:48:37 +0200 | [diff] [blame^] | 69 | *(.rel*.efi_runtime) |
| 70 | *(.rel*.efi_runtime.*) |
Alexander Graf | a56b5f1 | 2017-07-03 13:41:34 +0200 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | .efi_runtime_rel_stop : |
| 74 | { |
| 75 | *(.__efi_runtime_rel_stop) |
| 76 | } |
| 77 | |
| 78 | . = ALIGN(4); |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 79 | .image_copy_end : |
| 80 | { |
| 81 | *(.__image_copy_end) |
| 82 | } |
| 83 | |
| 84 | .rel_dyn_start : |
| 85 | { |
| 86 | *(.__rel_dyn_start) |
| 87 | } |
| 88 | |
| 89 | .rel.dyn : { |
| 90 | *(.rel*) |
| 91 | } |
| 92 | |
| 93 | .rel_dyn_end : |
| 94 | { |
| 95 | *(.__rel_dyn_end) |
| 96 | } |
| 97 | |
Albert ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 98 | .end : |
| 99 | { |
| 100 | *(.__end) |
| 101 | } |
| 102 | |
| 103 | _image_binary_end = .; |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 104 | |
| 105 | /* |
| 106 | * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c |
| 107 | * __bss_base and __bss_limit are for linker only (overlay ordering) |
| 108 | */ |
| 109 | |
| 110 | .bss_start __rel_dyn_start (OVERLAY) : { |
| 111 | KEEP(*(.__bss_start)); |
| 112 | __bss_base = .; |
| 113 | } |
| 114 | |
| 115 | .bss __bss_base (OVERLAY) : { |
| 116 | *(.bss*) |
| 117 | . = ALIGN(4); |
| 118 | __bss_limit = .; |
| 119 | } |
| 120 | |
| 121 | .bss_end __bss_limit (OVERLAY) : { |
| 122 | KEEP(*(.__bss_end)); |
| 123 | } |
| 124 | |
| 125 | /* |
Albert ARIBAUD | 9852cc6 | 2014-04-15 16:13:51 +0200 | [diff] [blame] | 126 | * Zynq needs to discard these sections because the user |
Michal Simek | c8cf471 | 2014-02-05 08:06:29 +0100 | [diff] [blame] | 127 | * is expected to pass this image on to tools for boot.bin |
| 128 | * generation that require them to be dropped. |
| 129 | */ |
| 130 | /DISCARD/ : { *(.dynsym) } |
| 131 | /DISCARD/ : { *(.dynbss*) } |
| 132 | /DISCARD/ : { *(.dynstr*) } |
| 133 | /DISCARD/ : { *(.dynamic*) } |
| 134 | /DISCARD/ : { *(.plt*) } |
| 135 | /DISCARD/ : { *(.interp*) } |
| 136 | /DISCARD/ : { *(.gnu*) } |
| 137 | /DISCARD/ : { *(.ARM.exidx*) } |
| 138 | /DISCARD/ : { *(.gnu.linkonce.armexidx.*) } |
| 139 | } |