From d5f485a4f6801f58cbb2bc9d8e80c955c79ff044 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Fri, 17 Dec 2021 16:06:06 +0000 Subject: R_AMD64_RELATIVE relocations implemented for EFI shim --- lib/elf.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/elf.h (limited to 'lib/elf.h') 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 + +#include +#include + +#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); + -- cgit v1.3.1-1-g115d