Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Jorge Ramirez-Ortiz | 9f2d1b2 | 2018-01-10 11:33:50 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Override linker script for fastboot-readable images |
| 4 | * |
| 5 | * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com> |
| 6 | * |
| 7 | * Based on arch/arm/cpu/armv8/u-boot.lds (Just add header) |
Jorge Ramirez-Ortiz | 9f2d1b2 | 2018-01-10 11:33:50 +0100 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") |
| 11 | OUTPUT_ARCH(aarch64) |
| 12 | ENTRY(_arm64_header) |
| 13 | SECTIONS |
| 14 | { |
| 15 | . = 0x00000000; |
| 16 | |
| 17 | . = ALIGN(8); |
| 18 | .text : |
| 19 | { |
| 20 | *(.__image_copy_start) |
| 21 | board/qualcomm/dragonboard820c/head.o (.text*) |
| 22 | CPUDIR/start.o (.text*) |
Alexander Graf | 94a10f2 | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | /* This needs to come before *(.text*) */ |
| 26 | .efi_runtime : { |
| 27 | __efi_runtime_start = .; |
| 28 | *(.text.efi_runtime*) |
| 29 | *(.rodata.efi_runtime*) |
| 30 | *(.data.efi_runtime*) |
| 31 | __efi_runtime_stop = .; |
| 32 | } |
| 33 | |
| 34 | .text_rest : |
| 35 | { |
Jorge Ramirez-Ortiz | 9f2d1b2 | 2018-01-10 11:33:50 +0100 | [diff] [blame] | 36 | *(.text*) |
| 37 | } |
| 38 | |
| 39 | . = ALIGN(8); |
| 40 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } |
| 41 | |
| 42 | . = ALIGN(8); |
| 43 | .data : { |
| 44 | *(.data*) |
| 45 | } |
| 46 | |
| 47 | . = ALIGN(8); |
| 48 | |
| 49 | . = .; |
| 50 | |
| 51 | . = ALIGN(8); |
| 52 | .u_boot_list : { |
| 53 | KEEP(*(SORT(.u_boot_list*))); |
| 54 | } |
| 55 | |
| 56 | . = ALIGN(8); |
| 57 | |
Jorge Ramirez-Ortiz | 9f2d1b2 | 2018-01-10 11:33:50 +0100 | [diff] [blame] | 58 | .efi_runtime_rel : { |
| 59 | __efi_runtime_rel_start = .; |
Alexander Graf | 94a10f2 | 2018-06-12 07:48:37 +0200 | [diff] [blame] | 60 | *(.rel*.efi_runtime) |
| 61 | *(.rel*.efi_runtime.*) |
Jorge Ramirez-Ortiz | 9f2d1b2 | 2018-01-10 11:33:50 +0100 | [diff] [blame] | 62 | __efi_runtime_rel_stop = .; |
| 63 | } |
| 64 | |
| 65 | . = ALIGN(8); |
| 66 | |
| 67 | .image_copy_end : |
| 68 | { |
| 69 | *(.__image_copy_end) |
| 70 | } |
| 71 | |
| 72 | . = ALIGN(8); |
| 73 | |
| 74 | .rel_dyn_start : |
| 75 | { |
| 76 | *(.__rel_dyn_start) |
| 77 | } |
| 78 | |
| 79 | .rela.dyn : { |
| 80 | *(.rela*) |
| 81 | } |
| 82 | |
| 83 | .rel_dyn_end : |
| 84 | { |
| 85 | *(.__rel_dyn_end) |
| 86 | } |
| 87 | |
| 88 | _end = .; |
| 89 | |
| 90 | . = ALIGN(8); |
| 91 | |
| 92 | .bss_start : { |
| 93 | KEEP(*(.__bss_start)); |
| 94 | } |
| 95 | |
| 96 | .bss : { |
| 97 | *(.bss*) |
| 98 | . = ALIGN(8); |
| 99 | } |
| 100 | |
| 101 | .bss_end : { |
| 102 | KEEP(*(.__bss_end)); |
| 103 | } |
| 104 | |
| 105 | /DISCARD/ : { *(.dynsym) } |
| 106 | /DISCARD/ : { *(.dynstr*) } |
| 107 | /DISCARD/ : { *(.dynamic*) } |
| 108 | /DISCARD/ : { *(.plt*) } |
| 109 | /DISCARD/ : { *(.interp*) } |
| 110 | /DISCARD/ : { *(.gnu*) } |
| 111 | } |