summaryrefslogtreecommitdiff
path: root/lib/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elf.h')
-rw-r--r--lib/elf.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/elf.h b/lib/elf.h
new file mode 100644
index 0000000..3edb0a1
--- /dev/null
+++ b/lib/elf.h
@@ -0,0 +1,17 @@
+#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
+# define elf_reloc elf64_reloc
+#endif
+
+bool elf64_validate(Elf64_Ehdr *ehdr, unsigned type, unsigned machine);
+size_t elf64_size(Elf64_Ehdr *ehdr, Elf64_Phdr *phdr);
+void elf64_reloc(Elf64_Ehdr *ehdr);
+