Mateusz Kulikowski | 626f048 | 2016-03-31 23:12:33 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Override linker script for fastboot-readable images |
| 3 | * |
| 4 | * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com> |
| 5 | * |
| 6 | * Based on arch/arm/cpu/armv8/u-boot.lds (Just add header) |
| 7 | * |
| 8 | * SPDX-License-Identifier: GPL-2.0+ |
| 9 | */ |
| 10 | |
| 11 | OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") |
| 12 | OUTPUT_ARCH(aarch64) |
| 13 | ENTRY(_arm64_header) |
| 14 | SECTIONS |
| 15 | { |
| 16 | . = 0x00000000; |
| 17 | |
| 18 | . = ALIGN(8); |
| 19 | .text : |
| 20 | { |
| 21 | *(.__image_copy_start) |
| 22 | board/qualcomm/dragonboard410c/head.o (.text*) |
| 23 | CPUDIR/start.o (.text*) |
| 24 | *(.text*) |
| 25 | } |
| 26 | |
| 27 | . = ALIGN(8); |
| 28 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } |
| 29 | |
| 30 | . = ALIGN(8); |
| 31 | .data : { |
| 32 | *(.data*) |
| 33 | } |
| 34 | |
| 35 | . = ALIGN(8); |
| 36 | |
| 37 | . = .; |
| 38 | |
| 39 | . = ALIGN(8); |
| 40 | .u_boot_list : { |
| 41 | KEEP(*(SORT(.u_boot_list*))); |
| 42 | } |
| 43 | |
| 44 | . = ALIGN(8); |
| 45 | |
| 46 | .image_copy_end : |
| 47 | { |
| 48 | *(.__image_copy_end) |
| 49 | } |
| 50 | |
| 51 | . = ALIGN(8); |
| 52 | |
| 53 | .rel_dyn_start : |
| 54 | { |
| 55 | *(.__rel_dyn_start) |
| 56 | } |
| 57 | |
| 58 | .rela.dyn : { |
| 59 | *(.rela*) |
| 60 | } |
| 61 | |
| 62 | .rel_dyn_end : |
| 63 | { |
| 64 | *(.__rel_dyn_end) |
| 65 | } |
| 66 | |
| 67 | _end = .; |
| 68 | |
| 69 | . = ALIGN(8); |
| 70 | |
| 71 | .bss_start : { |
| 72 | KEEP(*(.__bss_start)); |
| 73 | } |
| 74 | |
| 75 | .bss : { |
| 76 | *(.bss*) |
| 77 | . = ALIGN(8); |
| 78 | } |
| 79 | |
| 80 | .bss_end : { |
| 81 | KEEP(*(.__bss_end)); |
| 82 | } |
| 83 | |
| 84 | /DISCARD/ : { *(.dynsym) } |
| 85 | /DISCARD/ : { *(.dynstr*) } |
| 86 | /DISCARD/ : { *(.dynamic*) } |
| 87 | /DISCARD/ : { *(.plt*) } |
| 88 | /DISCARD/ : { *(.interp*) } |
| 89 | /DISCARD/ : { *(.gnu*) } |
| 90 | } |