struct header;
struct program_header;
- struct __attribute__((packed)) header {
+ struct header {
std::uint8_t magic[4];
std::uint8_t bitn;
std::uint8_t endianness;
};
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;
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;
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;
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;
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;
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;
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;