]> git.corax.cc Git - corax/commitdiff
kernel/include: Make sure gcc does not add alignment to multiboot structures
authorMatthias Kruk <m@m10k.eu>
Sat, 1 Aug 2020 07:35:03 +0000 (16:35 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 1 Aug 2020 07:35:03 +0000 (16:35 +0900)
kernel/include/multiboot.h

index 7e2bd556fb8961f7774a53f3d62735dbe90766e5..dd9a8f619c43f5f20f0535e767d31ab442574631 100644 (file)
@@ -29,14 +29,14 @@ struct aout_symbol_table {
     u32_t strsize;
     u32_t addr;
     u32_t reserved;
-};
+} __attribute__((packed));
 
 struct elf_shdrt {
     u32_t num;
     u32_t size;
     u32_t addr;
     u32_t shndx;
-};
+} __attribute__((packed));
 
 struct multiboot_info {
     u32_t flags;
@@ -52,13 +52,13 @@ struct multiboot_info {
     } u;
     u32_t mmap_length;
     u32_t mmap_addr;
-};
+} __attribute__((packed));
 
 struct memory_map {
     u32_t size;
     u64_t addr;
     u64_t len;
     u32_t type;
-};
+} __attribute__((packed));
 
 #endif /* __MULTIBOOT_H */