From 2044bbdf36832370fc1f91b40f0d94ed648c8e21 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Tue, 28 Feb 2023 22:17:55 +0100 Subject: [PATCH] fix (ELF): fixed naming convention in elf header struct --- kernel/inc/drivers/elf/elf.h | 8 ++++---- kernel/inc/drivers/elf/header.h | 2 +- kernel/src/drivers/elf/elf.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/inc/drivers/elf/elf.h b/kernel/inc/drivers/elf/elf.h index 93a5a38..b579784 100644 --- a/kernel/inc/drivers/elf/elf.h +++ b/kernel/inc/drivers/elf/elf.h @@ -29,10 +29,10 @@ #include "utils/symbol.h" typedef struct { - elf_header_x64_T header; - uint64_t num_symbols; - symbol_T* symbols; - void* string_table; + elf_header_T header; + uint64_t num_symbols; + symbol_T* symbols; + void* string_table; } elf_executable_T; typedef struct { diff --git a/kernel/inc/drivers/elf/header.h b/kernel/inc/drivers/elf/header.h index 0fb9b09..2212b4e 100644 --- a/kernel/inc/drivers/elf/header.h +++ b/kernel/inc/drivers/elf/header.h @@ -159,7 +159,7 @@ typedef struct { uint16_t len_section_header_entry; uint16_t num_section_header_entries; uint16_t string_section_index; -} elf_header_x64_T; +} elf_header_T; extern string_t g_elf_target_architecture_strings [3]; extern string_t g_elf_endianness_strings [3]; diff --git a/kernel/src/drivers/elf/elf.c b/kernel/src/drivers/elf/elf.c index ac7ca8d..5ec3f11 100644 --- a/kernel/src/drivers/elf/elf.c +++ b/kernel/src/drivers/elf/elf.c @@ -86,7 +86,7 @@ void elf_executable_extract_symbols(elf_executable_temp_T* executable_temp) { elf_executable_T* elf_executable_create(uint8_t* buffer) { elf_executable_temp_T executable_temp; executable_temp.executable = memory_allocate(sizeof(elf_executable_T)); - memory_copy(buffer, &executable_temp.executable->header, sizeof(elf_header_x64_T)); + memory_copy(buffer, &executable_temp.executable->header, sizeof(elf_header_T)); if (!elf_executable_validate(executable_temp.executable)) { return NULL;