1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Add function "KernAux_Multiboot2_Tag_ELFSymbols_print"

This commit is contained in:
Alex Kotov 2020-11-29 19:18:07 +05:00
parent 3d57f831f1
commit a99eba08bc
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -10,6 +10,12 @@ static void KernAux_Multiboot2_Tag_MemoryMap_print(
)
__attribute__((nonnull));
static void KernAux_Multiboot2_Tag_ELFSymbols_print(
const struct KernAux_Multiboot2_Tag_ELFSymbols *tag,
void (*print)(const char *format, ...)
)
__attribute__((nonnull));
const char *KernAux_Multiboot2_TagType_to_str(
enum KernAux_Multiboot2_TagType tag_type
) {
@ -185,9 +191,10 @@ void KernAux_Multiboot2_TagBase_print(
}
break;
case KERNAUX_MULTIBOOT2_TAGTYPE_ELF_SYMBOLS:
{
// TODO: print
}
KernAux_Multiboot2_Tag_ELFSymbols_print(
(struct KernAux_Multiboot2_Tag_ELFSymbols*)tag_base,
print
);
break;
case KERNAUX_MULTIBOOT2_TAGTYPE_APM_TABLE:
{
@ -291,3 +298,15 @@ void KernAux_Multiboot2_Tag_MemoryMap_print(
print(" reserved1: %u\n", entries[index].reserved1);
}
}
void KernAux_Multiboot2_Tag_ELFSymbols_print(
const struct KernAux_Multiboot2_Tag_ELFSymbols *const tag,
void (*print)(const char *format, ...)
) {
if (!KernAux_Multiboot2_Tag_ELFSymbols_is_valid(tag)) {
print(" invalid!\n");
return;
}
// TODO: implement this
}