X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b6ff3c7dbab3f40d03389808d95ac27d416c35e3..0f73e6cc9945f9b4a074bb62b9708d1751fa3723:/lunaix-os/includes/lunaix/exebi/elf32.h diff --git a/lunaix-os/includes/lunaix/exebi/elf32.h b/lunaix-os/includes/lunaix/exebi/elf32.h index d9f4f58..33da3a5 100644 --- a/lunaix-os/includes/lunaix/exebi/elf32.h +++ b/lunaix-os/includes/lunaix/exebi/elf32.h @@ -11,6 +11,7 @@ typedef unsigned int elf32_wrd_t; #define ET_NONE 0 #define ET_EXEC 2 +#define ET_DYN 3 #define PT_LOAD 1 #define PT_INTERP 3 @@ -69,7 +70,7 @@ struct elf32_phdr struct elf32 { - void* elf_file; + const void* elf_file; struct elf32_ehdr eheader; struct elf32_phdr* pheaders; }; @@ -77,11 +78,17 @@ struct elf32 #define declare_elf32(elf, elf_vfile) \ struct elf32 elf = { .elf_file = elf_vfile, .pheaders = (void*)0 } +int +elf32_check_exec(const struct elf32* elf, int type); + +int +elf32_check_arch(const struct elf32* elf); + int elf32_open(struct elf32* elf, const char* path); int -elf32_openat(struct elf32* elf, void* elf_vfile); +elf32_openat(struct elf32* elf, const void* elf_vfile); int elf32_static_linked(const struct elf32* elf);