Add field multiboot2_header_example2.tag_relocatable_header

This commit is contained in:
Alex Kotov 2022-01-14 09:46:46 +05:00
parent 5a7a745c22
commit 65bda3f73a
2 changed files with 20 additions and 2 deletions

View File

@ -32,6 +32,8 @@ static const struct {
uint8_t _align5[4];
struct KernAux_Multiboot2_HTag_RelocatableHeader tag_relocatable_header;
struct KernAux_Multiboot2_HTag_None tag_none;
} multiboot2_header_example2 = {
.multiboot2_header = {
@ -146,6 +148,18 @@ static const struct {
},
.entry_addr = 0,
},
.tag_relocatable_header = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_RELOCATABLE_HEADER,
.flags = 0,
.size = sizeof(multiboot2_header_example2.tag_relocatable_header),
},
.min_addr = 0,
.max_addr = 0,
.align = 0,
.preferences =
KERNAUX_MULTIBOOT2_HTAG_RELOCATABLE_HEADER_PREFERENCE_LOWEST,
},
.tag_none = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_NONE,

View File

@ -14,8 +14,8 @@ static const char output2[] =
"Multiboot 2 header\n"
" magic: 920085129\n"
" arch: 1\n"
" size: 248\n"
" checksum: 3374881918\n"
" size: 272\n"
" checksum: 3374881894\n"
"Multiboot 2 header tag\n"
" type: 1 (information request)\n"
" flags: 0\n"
@ -53,6 +53,10 @@ static const char output2[] =
" flags: 0\n"
" size: 12\n"
"Multiboot 2 header tag\n"
" type: 10 (relocatable header)\n"
" flags: 0\n"
" size: 24\n"
"Multiboot 2 header tag\n"
" type: 0 (none)\n"
" flags: 0\n"
" size: 8\n";