Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2002 |
| 4 | * Daniel Engström, Omicron Ceti AB, daniel@omicron.se. |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <config.h> |
| 8 | OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") |
| 9 | OUTPUT_ARCH(i386:x86-64) |
| 10 | ENTRY(_start) |
| 11 | |
| 12 | SECTIONS |
| 13 | { |
| 14 | #ifndef CONFIG_CMDLINE |
| 15 | /DISCARD/ : { *(.u_boot_list_2_cmd_*) } |
| 16 | #endif |
| 17 | |
Simon Glass | e16c47f | 2021-11-03 21:09:07 -0600 | [diff] [blame^] | 18 | #ifdef CONFIG_SYS_TEXT_BASE |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 19 | . = CONFIG_SYS_TEXT_BASE; /* Location of bootcode in flash */ |
Simon Glass | e16c47f | 2021-11-03 21:09:07 -0600 | [diff] [blame^] | 20 | #endif |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 21 | __text_start = .; |
Alexander Graf | 7e21fbc | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 22 | |
| 23 | .text.start : { *(.text.start); } |
| 24 | |
Alexander Graf | 42a3d42 | 2018-07-11 01:39:31 +0200 | [diff] [blame] | 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 | |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 39 | .text : { *(.text*); } |
| 40 | |
| 41 | . = ALIGN(4); |
| 42 | |
| 43 | . = ALIGN(4); |
| 44 | .u_boot_list : { |
| 45 | KEEP(*(SORT(.u_boot_list*))); |
| 46 | } |
| 47 | |
| 48 | . = ALIGN(4); |
Alexander Graf | 42a3d42 | 2018-07-11 01:39:31 +0200 | [diff] [blame] | 49 | .rodata : { |
| 50 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 51 | KEEP(*(.rodata.efi.init)); |
| 52 | } |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 53 | |
| 54 | . = ALIGN(4); |
| 55 | .data : { *(.data*) } |
| 56 | |
| 57 | . = ALIGN(4); |
| 58 | .hash : { *(.hash*) } |
| 59 | |
| 60 | . = ALIGN(4); |
| 61 | .got : { *(.got*) } |
| 62 | |
Alexander Graf | 42a3d42 | 2018-07-11 01:39:31 +0200 | [diff] [blame] | 63 | .efi_runtime_rel_start : |
| 64 | { |
| 65 | *(.__efi_runtime_rel_start) |
| 66 | } |
| 67 | |
| 68 | .efi_runtime_rel : { |
| 69 | *(.rel*.efi_runtime) |
| 70 | *(.rel*.efi_runtime.*) |
| 71 | } |
| 72 | |
| 73 | .efi_runtime_rel_stop : |
| 74 | { |
| 75 | *(.__efi_runtime_rel_stop) |
| 76 | } |
| 77 | |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 78 | . = ALIGN(4); |
| 79 | __data_end = .; |
| 80 | __init_end = .; |
| 81 | |
| 82 | . = ALIGN(4); |
| 83 | .dynsym : { *(.dynsym*) } |
| 84 | |
| 85 | . = ALIGN(4); |
| 86 | __rel_dyn_start = .; |
| 87 | .rela.dyn : { |
| 88 | *(.rela*) |
| 89 | } |
| 90 | __rel_dyn_end = .; |
| 91 | . = ALIGN(4); |
| 92 | |
| 93 | .dynamic : { *(.dynamic) } |
| 94 | |
| 95 | . = ALIGN(4); |
| 96 | _end = .; |
| 97 | |
| 98 | .bss __rel_dyn_start (OVERLAY) : { |
| 99 | __bss_start = .; |
Alexander Graf | 6331cb2 | 2018-08-20 14:17:41 +0200 | [diff] [blame] | 100 | *(.bss*) |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 101 | *(COM*) |
| 102 | . = ALIGN(4); |
| 103 | __bss_end = .; |
| 104 | } |
| 105 | |
| 106 | /DISCARD/ : { *(.dynsym) } |
| 107 | /DISCARD/ : { *(.dynstr*) } |
| 108 | /DISCARD/ : { *(.dynamic*) } |
| 109 | /DISCARD/ : { *(.plt*) } |
| 110 | /DISCARD/ : { *(.interp*) } |
| 111 | /DISCARD/ : { *(.gnu*) } |
Bin Meng | 6fbe06a | 2021-06-18 15:09:30 +0800 | [diff] [blame] | 112 | /DISCARD/ : { *(.note.gnu.property) } |
Simon Glass | 3742d7a | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 113 | } |