zboot-header.S (bca2f3a9406b89961fbc6c92c52c6fc1fd91d35f) zboot-header.S (538bc0f40b364f2c7b81f11aa163f723b138b40f)
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#include <linux/pe.h>
4
5#ifdef CONFIG_64BIT
6 .set .Lextra_characteristics, 0x0
7 .set .Lpe_opt_magic, PE_OPT_MAGIC_PE32PLUS
8#else

--- 64 unchanged lines hidden (view full) ---

73 .long (.Lsection_table - .) / 8
74
75 .quad 0 // ExportTable
76 .quad 0 // ImportTable
77 .quad 0 // ResourceTable
78 .quad 0 // ExceptionTable
79 .quad 0 // CertificationTable
80 .quad 0 // BaseRelocationTable
1/* SPDX-License-Identifier: GPL-2.0 */
2
3#include <linux/pe.h>
4
5#ifdef CONFIG_64BIT
6 .set .Lextra_characteristics, 0x0
7 .set .Lpe_opt_magic, PE_OPT_MAGIC_PE32PLUS
8#else

--- 64 unchanged lines hidden (view full) ---

73 .long (.Lsection_table - .) / 8
74
75 .quad 0 // ExportTable
76 .quad 0 // ImportTable
77 .quad 0 // ResourceTable
78 .quad 0 // ExceptionTable
79 .quad 0 // CertificationTable
80 .quad 0 // BaseRelocationTable
81#ifdef CONFIG_DEBUG_EFI
81#if defined(PE_DLL_CHAR_EX) || defined(CONFIG_DEBUG_EFI)
82 .long .Lefi_debug_table - .Ldoshdr // DebugTable
83 .long .Lefi_debug_table_size
82 .long .Lefi_debug_table - .Ldoshdr // DebugTable
83 .long .Lefi_debug_table_size
84
85 .section ".rodata", "a"
86 .p2align 2
87.Lefi_debug_table:
88 // EFI_IMAGE_DEBUG_DIRECTORY_ENTRY[]
89#ifdef PE_DLL_CHAR_EX
90 .long 0 // Characteristics
91 .long 0 // TimeDateStamp
92 .short 0 // MajorVersion
93 .short 0 // MinorVersion
94 .long IMAGE_DEBUG_TYPE_EX_DLLCHARACTERISTICS // Type
95 .long 4 // SizeOfData
96 .long 0 // RVA
97 .long .Lefi_dll_characteristics_ex - .Ldoshdr // FileOffset
84#endif
98#endif
99#ifdef CONFIG_DEBUG_EFI
100 .long 0 // Characteristics
101 .long 0 // TimeDateStamp
102 .short 0 // MajorVersion
103 .short 0 // MinorVersion
104 .long IMAGE_DEBUG_TYPE_CODEVIEW // Type
105 .long .Lefi_debug_entry_size // SizeOfData
106 .long 0 // RVA
107 .long .Lefi_debug_entry - .Ldoshdr // FileOffset
108#endif
109 .set .Lefi_debug_table_size, . - .Lefi_debug_table
110 .previous
111#endif
85
86.Lsection_table:
87 .ascii ".text\0\0\0"
88 .long _etext - .Lefi_header_end
89 .long .Lefi_header_end - .Ldoshdr
90 .long _etext - .Lefi_header_end
91 .long .Lefi_header_end - .Ldoshdr
92

--- 12 unchanged lines hidden (view full) ---

105 .long 0, 0
106 .short 0, 0
107 .long IMAGE_SCN_CNT_INITIALIZED_DATA | \
108 IMAGE_SCN_MEM_READ | \
109 IMAGE_SCN_MEM_WRITE
110
111 .set .Lsection_count, (. - .Lsection_table) / 40
112
112
113.Lsection_table:
114 .ascii ".text\0\0\0"
115 .long _etext - .Lefi_header_end
116 .long .Lefi_header_end - .Ldoshdr
117 .long _etext - .Lefi_header_end
118 .long .Lefi_header_end - .Ldoshdr
119

--- 12 unchanged lines hidden (view full) ---

132 .long 0, 0
133 .short 0, 0
134 .long IMAGE_SCN_CNT_INITIALIZED_DATA | \
135 IMAGE_SCN_MEM_READ | \
136 IMAGE_SCN_MEM_WRITE
137
138 .set .Lsection_count, (. - .Lsection_table) / 40
139
140#ifdef PE_DLL_CHAR_EX
141.Lefi_dll_characteristics_ex:
142 .long PE_DLL_CHAR_EX
143#endif
113#ifdef CONFIG_DEBUG_EFI
144#ifdef CONFIG_DEBUG_EFI
114 .section ".rodata", "a"
115 .align 2
116.Lefi_debug_table:
117 // EFI_IMAGE_DEBUG_DIRECTORY_ENTRY
118 .long 0 // Characteristics
119 .long 0 // TimeDateStamp
120 .short 0 // MajorVersion
121 .short 0 // MinorVersion
122 .long IMAGE_DEBUG_TYPE_CODEVIEW // Type
123 .long .Lefi_debug_entry_size // SizeOfData
124 .long 0 // RVA
125 .long .Lefi_debug_entry - .Ldoshdr // FileOffset
126
127 .set .Lefi_debug_table_size, . - .Lefi_debug_table
128 .previous
129
130.Lefi_debug_entry:
131 // EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY
132 .ascii "NB10" // Signature
133 .long 0 // Unknown
134 .long 0 // Unknown2
135 .long 0 // Unknown3
136
137 .asciz ZBOOT_EFI_PATH
138
139 .set .Lefi_debug_entry_size, . - .Lefi_debug_entry
140#endif
141
142 .p2align 12
143.Lefi_header_end:
144
145.Lefi_debug_entry:
146 // EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY
147 .ascii "NB10" // Signature
148 .long 0 // Unknown
149 .long 0 // Unknown2
150 .long 0 // Unknown3
151
152 .asciz ZBOOT_EFI_PATH
153
154 .set .Lefi_debug_entry_size, . - .Lefi_debug_entry
155#endif
156
157 .p2align 12
158.Lefi_header_end:
159