From c8ccffbf471a23b42b8f50e98ea489d1daab1563 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Fri, 14 Jan 2022 10:54:04 +0500 Subject: [PATCH] Pack Multiboot 2 header --- examples/kernel-multiboot2-grub/multiboot2.c | 4 +++- examples/kernel-multiboot2-limine/multiboot2.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/kernel-multiboot2-grub/multiboot2.c b/examples/kernel-multiboot2-grub/multiboot2.c index a0539ad..4e92b82 100644 --- a/examples/kernel-multiboot2-grub/multiboot2.c +++ b/examples/kernel-multiboot2-grub/multiboot2.c @@ -5,7 +5,9 @@ __attribute__((aligned(KERNAUX_MULTIBOOT2_HEADER_ALIGN))) const struct { struct KernAux_Multiboot2_Header multiboot2_header; struct KernAux_Multiboot2_HTag_None tag_none; -} multiboot2_header = { +} +__attribute__((packed)) +multiboot2_header = { .multiboot2_header = { .magic = KERNAUX_MULTIBOOT2_HEADER_MAGIC, .arch = KERNAUX_MULTIBOOT2_ARCH_NONE, diff --git a/examples/kernel-multiboot2-limine/multiboot2.c b/examples/kernel-multiboot2-limine/multiboot2.c index a0539ad..4e92b82 100644 --- a/examples/kernel-multiboot2-limine/multiboot2.c +++ b/examples/kernel-multiboot2-limine/multiboot2.c @@ -5,7 +5,9 @@ __attribute__((aligned(KERNAUX_MULTIBOOT2_HEADER_ALIGN))) const struct { struct KernAux_Multiboot2_Header multiboot2_header; struct KernAux_Multiboot2_HTag_None tag_none; -} multiboot2_header = { +} +__attribute__((packed)) +multiboot2_header = { .multiboot2_header = { .magic = KERNAUX_MULTIBOOT2_HEADER_MAGIC, .arch = KERNAUX_MULTIBOOT2_ARCH_NONE,