| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2000 Russell King |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 6 | | - * published by the Free Software Foundation. |
|---|
| 7 | 4 | */ |
|---|
| 5 | +#include <asm/vmlinux.lds.h> |
|---|
| 8 | 6 | |
|---|
| 9 | 7 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
|---|
| 10 | 8 | #define ZIMAGE_MAGIC(x) ( (((x) >> 24) & 0x000000ff) | \ |
|---|
| .. | .. |
|---|
| 20 | 18 | SECTIONS |
|---|
| 21 | 19 | { |
|---|
| 22 | 20 | /DISCARD/ : { |
|---|
| 21 | + COMMON_DISCARDS |
|---|
| 23 | 22 | *(.ARM.exidx*) |
|---|
| 24 | 23 | *(.ARM.extab*) |
|---|
| 24 | + *(.note.*) |
|---|
| 25 | + *(.rel.*) |
|---|
| 25 | 26 | /* |
|---|
| 26 | 27 | * Discard any r/w data - this produces a link error if we have any, |
|---|
| 27 | 28 | * which is required for PIC decompression. Local data generates |
|---|
| .. | .. |
|---|
| 39 | 40 | *(.start) |
|---|
| 40 | 41 | *(.text) |
|---|
| 41 | 42 | *(.text.*) |
|---|
| 42 | | - *(.fixup) |
|---|
| 43 | | - *(.gnu.warning) |
|---|
| 44 | | - *(.glue_7t) |
|---|
| 45 | | - *(.glue_7) |
|---|
| 43 | + ARM_STUBS_TEXT |
|---|
| 46 | 44 | } |
|---|
| 47 | 45 | .table : ALIGN(4) { |
|---|
| 48 | 46 | _table_start = .; |
|---|
| 49 | | - LONG(ZIMAGE_MAGIC(4)) |
|---|
| 47 | + LONG(ZIMAGE_MAGIC(6)) |
|---|
| 50 | 48 | LONG(ZIMAGE_MAGIC(0x5a534c4b)) |
|---|
| 51 | 49 | LONG(ZIMAGE_MAGIC(__piggy_size_addr - _start)) |
|---|
| 52 | 50 | LONG(ZIMAGE_MAGIC(_kernel_bss_size)) |
|---|
| 51 | + LONG(ZIMAGE_MAGIC(TEXT_OFFSET)) |
|---|
| 52 | + LONG(ZIMAGE_MAGIC(MALLOC_SIZE)) |
|---|
| 53 | 53 | LONG(0) |
|---|
| 54 | 54 | _table_end = .; |
|---|
| 55 | 55 | } |
|---|
| .. | .. |
|---|
| 67 | 67 | _etext = .; |
|---|
| 68 | 68 | |
|---|
| 69 | 69 | .got.plt : { *(.got.plt) } |
|---|
| 70 | +#ifndef CONFIG_EFI_STUB |
|---|
| 70 | 71 | _got_start = .; |
|---|
| 71 | 72 | .got : { *(.got) } |
|---|
| 72 | 73 | _got_end = .; |
|---|
| 74 | +#endif |
|---|
| 73 | 75 | |
|---|
| 74 | 76 | /* ensure the zImage file size is always a multiple of 64 bits */ |
|---|
| 75 | 77 | /* (without a dummy byte, ld just ignores the empty section) */ |
|---|
| .. | .. |
|---|
| 78 | 80 | #ifdef CONFIG_EFI_STUB |
|---|
| 79 | 81 | .data : ALIGN(4096) { |
|---|
| 80 | 82 | __pecoff_data_start = .; |
|---|
| 83 | + _got_start = .; |
|---|
| 84 | + *(.got) |
|---|
| 85 | + _got_end = .; |
|---|
| 81 | 86 | /* |
|---|
| 82 | 87 | * The EFI stub always executes from RAM, and runs strictly before the |
|---|
| 83 | 88 | * decompressor, so we can make an exception for its r/w data, and keep it |
|---|
| 84 | 89 | */ |
|---|
| 85 | | - *(.data.efistub) |
|---|
| 90 | + *(.data.efistub .bss.efistub) |
|---|
| 86 | 91 | __pecoff_data_end = .; |
|---|
| 87 | 92 | |
|---|
| 88 | 93 | /* |
|---|
| .. | .. |
|---|
| 127 | 132 | PROVIDE(__pecoff_data_size = ALIGN(512) - ADDR(.data)); |
|---|
| 128 | 133 | PROVIDE(__pecoff_end = ALIGN(512)); |
|---|
| 129 | 134 | |
|---|
| 130 | | - .stab 0 : { *(.stab) } |
|---|
| 131 | | - .stabstr 0 : { *(.stabstr) } |
|---|
| 132 | | - .stab.excl 0 : { *(.stab.excl) } |
|---|
| 133 | | - .stab.exclstr 0 : { *(.stab.exclstr) } |
|---|
| 134 | | - .stab.index 0 : { *(.stab.index) } |
|---|
| 135 | | - .stab.indexstr 0 : { *(.stab.indexstr) } |
|---|
| 136 | | - .comment 0 : { *(.comment) } |
|---|
| 135 | + STABS_DEBUG |
|---|
| 136 | + DWARF_DEBUG |
|---|
| 137 | + ARM_DETAILS |
|---|
| 138 | + |
|---|
| 139 | + ARM_ASSERTS |
|---|
| 137 | 140 | } |
|---|
| 138 | 141 | ASSERT(_edata_real == _edata, "error: zImage file size is incorrect"); |
|---|