arm64: efi-header: pad with zeroes
Use the new .*align_zeropad macros to pad the EFI header with zeroes
rather than NOPs. This is primarily to make it easier for a human to
look at the Image or vmlinux, as zeroes are more clearly unimportant
than NOPs, and `objdump -d` will skip zero bytes when dumping
instructions. In theory this will also make it easier to catch bugs that
cause us to branch into the header.
This gets rid of ~60K of NOPs in the Image header.
There should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
diff --git a/arch/arm64/kernel/efi-header.S b/arch/arm64/kernel/efi-header.S
index 28d8a5d..b18ae18 100644
--- a/arch/arm64/kernel/efi-header.S
+++ b/arch/arm64/kernel/efi-header.S
@@ -131,7 +131,7 @@
*/
__INITRODATA
- .align 2
+ .p2align_zeropad 2
.Lefi_debug_table:
// EFI_IMAGE_DEBUG_DIRECTORY_ENTRY
.long 0 // Characteristics
@@ -158,7 +158,7 @@
.set .Lefi_debug_entry_size, . - .Lefi_debug_entry
#endif
- .balign SEGMENT_ALIGN
+ .balign_zeropad SEGMENT_ALIGN
.Lefi_header_end:
#else
.set .Lpe_header_offset, 0x0