summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-06-18 17:23:11 +0200
committerAlexander Graf <agraf@suse.de>2018-07-25 14:57:43 +0200
commitb34662d03bb9e695d12bf995df4bec8998f91609 (patch)
treecd15ef87af3c89fc270df349596d80f793c5b18f /lib/efi_loader
parentdae73c4cdc862017a10d09588571e7f98de0cdd4 (diff)
efi_loader: Use common elf.h reloc defines
Now that elf.h contains relocation defines for all architectures we care about, let's just include it unconditionally and refer to the defines. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_runtime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index bc44e437458..dd3ff8ad236 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <dm.h>
+#include <elf.h>
#include <efi_loader.h>
#include <rtc.h>
@@ -33,18 +34,16 @@ static efi_status_t __efi_runtime EFIAPI efi_invalid_parameter(void);
* header for each arch (or a generic header) rather than being repeated here.
*/
#if defined(__aarch64__)
-#define R_RELATIVE 1027
+#define R_RELATIVE R_AARCH64_RELATIVE
#define R_MASK 0xffffffffULL
#define IS_RELA 1
#elif defined(__arm__)
-#define R_RELATIVE 23
+#define R_RELATIVE R_ARM_RELATIVE
#define R_MASK 0xffULL
#elif defined(__x86_64__) || defined(__i386__)
-#include <asm/elf.h>
#define R_RELATIVE R_386_RELATIVE
#define R_MASK 0xffULL
#elif defined(__riscv)
-#include <elf.h>
#define R_RELATIVE R_RISCV_RELATIVE
#define R_MASK 0xffULL
#define IS_RELA 1