1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-12-04 11:34:42 -05:00

Add ELF types

This commit is contained in:
Alex Kotov 2020-11-25 19:32:29 +05:00
parent 579e2d1437
commit f5131e8075
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -32,6 +32,36 @@ struct KernelMQ_ELF_Header {
} }
__attribute__((packed)); __attribute__((packed));
struct KernelMQ_ELF_ProgramEntry {
unsigned long type : 32;
unsigned long offset : 32;
unsigned long virt_addr : 32;
unsigned long phys_addr : 32;
unsigned long file_size : 32;
unsigned long mem_size : 32;
unsigned long flags : 32;
unsigned long align : 32;
}
__attribute__((packed));
struct KernelMQ_ELF_SectionEntry {
unsigned long name : 32;
unsigned long type : 32;
unsigned long flags : 32;
unsigned long vaddr : 32;
unsigned long file_offset : 32;
unsigned long file_size : 32;
unsigned long link : 32;
unsigned long info : 32;
unsigned long alignment : 32;
unsigned long ent_size : 32;
}
__attribute__((packed));
typedef struct KernelMQ_ELF_ProgramEntry KernelMQ_ELF_ProgramTable[];
typedef struct KernelMQ_ELF_SectionEntry KernelMQ_ELF_SectionTable[];
inline static unsigned char KernelMQ_ELF_Header_is_valid( inline static unsigned char KernelMQ_ELF_Header_is_valid(
const struct KernelMQ_ELF_Header *header const struct KernelMQ_ELF_Header *header
); );