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