Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | c74f9dc | 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 | c74f9dc | 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 | { |
Simon Glass | 72cc538 | 2022-10-20 18:22:39 -0600 | [diff] [blame] | 14 | #ifdef CONFIG_TEXT_BASE |
| 15 | . = CONFIG_TEXT_BASE; /* Location of bootcode in flash */ |
Simon Glass | 49a643b | 2021-11-03 21:09:07 -0600 | [diff] [blame] | 16 | #endif |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 17 | __text_start = .; |
Alexander Graf | 94a10f2 | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 18 | |
| 19 | .text.start : { *(.text.start); } |
| 20 | |
Alexander Graf | 2133bc5 | 2018-07-11 01:39:31 +0200 | [diff] [blame] | 21 | .__efi_runtime_start : { |
| 22 | *(.__efi_runtime_start) |
| 23 | } |
| 24 | |
| 25 | .efi_runtime : { |
| 26 | *(.text.efi_runtime*) |
| 27 | *(.rodata.efi_runtime*) |
| 28 | *(.data.efi_runtime*) |
| 29 | } |
| 30 | |
| 31 | .__efi_runtime_stop : { |
| 32 | *(.__efi_runtime_stop) |
| 33 | } |
| 34 | |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 35 | .text : { *(.text*); } |
| 36 | |
| 37 | . = ALIGN(4); |
| 38 | |
| 39 | . = ALIGN(4); |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 40 | __u_boot_list : { |
| 41 | KEEP(*(SORT(__u_boot_list*))); |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | . = ALIGN(4); |
Alexander Graf | 2133bc5 | 2018-07-11 01:39:31 +0200 | [diff] [blame] | 45 | .rodata : { |
| 46 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 47 | KEEP(*(.rodata.efi.init)); |
| 48 | } |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 49 | |
| 50 | . = ALIGN(4); |
| 51 | .data : { *(.data*) } |
| 52 | |
| 53 | . = ALIGN(4); |
| 54 | .hash : { *(.hash*) } |
| 55 | |
| 56 | . = ALIGN(4); |
| 57 | .got : { *(.got*) } |
| 58 | |
Alexander Graf | 2133bc5 | 2018-07-11 01:39:31 +0200 | [diff] [blame] | 59 | .efi_runtime_rel_start : |
| 60 | { |
| 61 | *(.__efi_runtime_rel_start) |
| 62 | } |
| 63 | |
| 64 | .efi_runtime_rel : { |
| 65 | *(.rel*.efi_runtime) |
| 66 | *(.rel*.efi_runtime.*) |
| 67 | } |
| 68 | |
| 69 | .efi_runtime_rel_stop : |
| 70 | { |
| 71 | *(.__efi_runtime_rel_stop) |
| 72 | } |
| 73 | |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 74 | . = ALIGN(4); |
| 75 | __data_end = .; |
| 76 | __init_end = .; |
| 77 | |
| 78 | . = ALIGN(4); |
| 79 | .dynsym : { *(.dynsym*) } |
| 80 | |
| 81 | . = ALIGN(4); |
| 82 | __rel_dyn_start = .; |
| 83 | .rela.dyn : { |
| 84 | *(.rela*) |
| 85 | } |
| 86 | __rel_dyn_end = .; |
| 87 | . = ALIGN(4); |
| 88 | |
| 89 | .dynamic : { *(.dynamic) } |
| 90 | |
| 91 | . = ALIGN(4); |
| 92 | _end = .; |
| 93 | |
| 94 | .bss __rel_dyn_start (OVERLAY) : { |
| 95 | __bss_start = .; |
Alexander Graf | 61c7678 | 2018-08-20 14:17:41 +0200 | [diff] [blame] | 96 | *(.bss*) |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 97 | *(COM*) |
| 98 | . = ALIGN(4); |
| 99 | __bss_end = .; |
| 100 | } |
| 101 | |
| 102 | /DISCARD/ : { *(.dynsym) } |
| 103 | /DISCARD/ : { *(.dynstr*) } |
| 104 | /DISCARD/ : { *(.dynamic*) } |
| 105 | /DISCARD/ : { *(.plt*) } |
| 106 | /DISCARD/ : { *(.interp*) } |
| 107 | /DISCARD/ : { *(.gnu*) } |
Bin Meng | 3eb15f5 | 2021-06-18 15:09:30 +0800 | [diff] [blame] | 108 | /DISCARD/ : { *(.note.gnu.property) } |
Simon Glass | c74f9dc | 2017-01-16 07:04:01 -0700 | [diff] [blame] | 109 | } |