| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2013 - 2017 Linaro, Ltd. |
|---|
| 3 | 4 | * Copyright (C) 2013, 2014 Red Hat, Inc. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | 5 | */ |
|---|
| 9 | 6 | |
|---|
| 10 | 7 | #include <linux/pe.h> |
|---|
| .. | .. |
|---|
| 30 | 27 | .long __initdata_begin - efi_header_end // SizeOfCode |
|---|
| 31 | 28 | .long __pecoff_data_size // SizeOfInitializedData |
|---|
| 32 | 29 | .long 0 // SizeOfUninitializedData |
|---|
| 33 | | - .long __efistub_entry - _head // AddressOfEntryPoint |
|---|
| 30 | + .long __efistub_efi_pe_entry - _head // AddressOfEntryPoint |
|---|
| 34 | 31 | .long efi_header_end - _head // BaseOfCode |
|---|
| 35 | 32 | |
|---|
| 36 | 33 | extra_header_fields: |
|---|
| 37 | 34 | .quad 0 // ImageBase |
|---|
| 38 | | - .long SZ_4K // SectionAlignment |
|---|
| 35 | + .long SEGMENT_ALIGN // SectionAlignment |
|---|
| 39 | 36 | .long PECOFF_FILE_ALIGNMENT // FileAlignment |
|---|
| 40 | 37 | .short 0 // MajorOperatingSystemVersion |
|---|
| 41 | 38 | .short 0 // MinorOperatingSystemVersion |
|---|
| 42 | | - .short 0 // MajorImageVersion |
|---|
| 43 | | - .short 0 // MinorImageVersion |
|---|
| 39 | + .short LINUX_EFISTUB_MAJOR_VERSION // MajorImageVersion |
|---|
| 40 | + .short LINUX_EFISTUB_MINOR_VERSION // MinorImageVersion |
|---|
| 44 | 41 | .short 0 // MajorSubsystemVersion |
|---|
| 45 | 42 | .short 0 // MinorSubsystemVersion |
|---|
| 46 | 43 | .long 0 // Win32VersionValue |
|---|
| .. | .. |
|---|
| 150 | 147 | * correctly at this alignment, we must ensure that .text is |
|---|
| 151 | 148 | * placed at a 4k boundary in the Image to begin with. |
|---|
| 152 | 149 | */ |
|---|
| 153 | | - .align 12 |
|---|
| 150 | + .balign SEGMENT_ALIGN |
|---|
| 154 | 151 | efi_header_end: |
|---|
| 155 | 152 | .endm |
|---|