From: Amelia Coutard Date: Sat, 2 Dec 2023 23:32:18 +0000 (+0100) Subject: Removed useless __attribute__((packed))s X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=81a09d882496b4ba9ccddef1f3320a063c88a805;p=voyage-au-centre-des-fichiers.git Removed useless __attribute__((packed))s --- diff --git a/kernel/src/elf64.hpp b/kernel/src/elf64.hpp index 5615e0d..19d5d13 100644 --- a/kernel/src/elf64.hpp +++ b/kernel/src/elf64.hpp @@ -21,7 +21,7 @@ namespace os { namespace elf { struct header; struct program_header; - struct __attribute__((packed)) header { + struct header { std::uint8_t magic[4]; std::uint8_t bitn; std::uint8_t endianness; @@ -44,7 +44,7 @@ namespace os { namespace elf { }; static_assert(sizeof(header) == 64); - struct __attribute__((packed)) program_header { + struct program_header { std::uint32_t type; std::uint32_t flags; std::uint64_t p_offset; diff --git a/kernel/src/paging.hpp b/kernel/src/paging.hpp index 0099912..d218d38 100644 --- a/kernel/src/paging.hpp +++ b/kernel/src/paging.hpp @@ -30,7 +30,7 @@ struct PE; struct PT; struct page; -struct __attribute__((packed)) PML4E { +struct PML4E { std::uint64_t P : 1 = 0; std::uint64_t R_W : 1; std::uint64_t U_S : 1; @@ -57,8 +57,8 @@ struct __attribute__((aligned(0x1000))) page { static_assert(sizeof(page) == 0x1000); static_assert(alignof(page) == 0x1000); -union __attribute__((packed)) PDPE { - struct __attribute__((packed)) { +union PDPE { + struct { std::uint64_t P : 1 = 0; std::uint64_t R_W : 1; std::uint64_t U_S : 1; @@ -73,7 +73,7 @@ union __attribute__((packed)) PDPE { std::uint64_t AVL_high : 11 = 0; std::uint64_t NX : 1; } non_page; - struct __attribute__((packed)) { + struct { std::uint64_t P : 1 = 0; std::uint64_t R_W : 1; std::uint64_t U_S : 1; @@ -99,8 +99,8 @@ struct __attribute__((aligned(0x1000))) PDPT { static_assert(sizeof(PDPT) == 0x1000); static_assert(alignof(PDPT) == 0x1000); -union __attribute__((packed)) PDE { - struct __attribute__((packed)) { +union PDE { + struct { std::uint64_t P : 1 = 0; std::uint64_t R_W : 1; std::uint64_t U_S : 1; @@ -115,7 +115,7 @@ union __attribute__((packed)) PDE { std::uint64_t AVL_high : 11 = 0; std::uint64_t NX : 1; } non_page; - struct __attribute__((packed)) { + struct { std::uint64_t P : 1 = 0; std::uint64_t R_W : 1; std::uint64_t U_S : 1; @@ -141,7 +141,7 @@ struct __attribute__((aligned(0x1000))) PDT { static_assert(sizeof(PDT) == 0x1000); static_assert(alignof(PDT) == 0x1000); -struct __attribute__((packed)) PE { +struct PE { std::uint64_t P : 1 = 0; std::uint64_t R_W : 1; std::uint64_t U_S : 1;