summaryrefslogtreecommitdiff
path: root/api/lib/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/lib/elf.h')
-rw-r--r--api/lib/elf.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/api/lib/elf.h b/api/lib/elf.h
new file mode 100644
index 0000000..05d25bc
--- /dev/null
+++ b/api/lib/elf.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <elf/elf64.h>
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifdef __x86_64__
+# define elf_validate elf64_validate
+# define elf_size elf64_size
+#endif
+
+bool elf64_validate(Elf64_Ehdr *ehdr, unsigned type, unsigned machine);
+size_t elf64_size(Elf64_Ehdr *ehdr, Elf64_Phdr *phdr);
+