diff options
-rw-r--r-- | gnu/usr.bin/binutils-2.17/include/elf/aarch64.h | 4 | ||||
-rw-r--r-- | libexec/ld.so/aarch64/rtld_machine.c | 6 | ||||
-rw-r--r-- | sys/arch/arm64/include/reloc.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/gnu/usr.bin/binutils-2.17/include/elf/aarch64.h b/gnu/usr.bin/binutils-2.17/include/elf/aarch64.h index 1b448195cfa..48933c1f4d8 100644 --- a/gnu/usr.bin/binutils-2.17/include/elf/aarch64.h +++ b/gnu/usr.bin/binutils-2.17/include/elf/aarch64.h @@ -20,8 +20,8 @@ #include "elf/reloc-macros.h" START_RELOC_NUMBERS (elf_aarch64_reloc_type ) - RELOC_NUMBER (R_AARCH64_NONE, 256) /* No reloc */ - RELOC_NUMBER (R_AARCH64_ABS64, 257) /* Direct 64 bit */ + RELOC_NUMBER (R_AARCH64_NONE, 0) /* No reloc */ + RELOC_NUMBER (R_AARCH64_ABS64, 257) /* Direct 64 bit */ RELOC_NUMBER (R_AARCH64_COPY, 1024) /* Copy symbol at runtime */ RELOC_NUMBER (R_AARCH64_GLOB_DAT, 1025) /* Create GOT entry */ RELOC_NUMBER (R_AARCH64_JUMP_SLOT, 1026) /* Create PLT entry */ diff --git a/libexec/ld.so/aarch64/rtld_machine.c b/libexec/ld.so/aarch64/rtld_machine.c index 9546590a79f..2316b0a9179 100644 --- a/libexec/ld.so/aarch64/rtld_machine.c +++ b/libexec/ld.so/aarch64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.3 2017/01/24 07:48:37 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.4 2017/10/24 20:35:54 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -54,7 +54,7 @@ Elf_Addr _dl_bind(elf_object_t *object, int index); #define _RF_SZ(s) (((s) & 0xff) << 8) /* memory target size */ #define _RF_RS(s) ((s) & 0xff) /* right shift */ static int reloc_target_flags[] = { - 0, /* 0 NONE */ + [ R_AARCH64_NONE ] = 0, [ R_AARCH64_ABS64 ] = _RF_V|_RF_S|_RF_A| _RF_SZ(64) | _RF_RS(0), /* ABS64 */ [ R_AARCH64_GLOB_DAT ] = @@ -81,7 +81,7 @@ static int reloc_target_flags[] = { #define RELOC_VALUE_RIGHTSHIFT(t) (reloc_target_flags[t] & 0xff) static Elf_Addr reloc_target_bitmask[] = { #define _BM(x) (~(Elf_Addr)0 >> ((8*sizeof(reloc_target_bitmask[0])) - (x))) - 0, /* 0 NONE */ + [ R_AARCH64_NONE ] = 0, [ R_AARCH64_ABS64 ] = _BM(64), [ R_AARCH64_GLOB_DAT ] = _BM(64), [ R_AARCH64_JUMP_SLOT ] = _BM(64), diff --git a/sys/arch/arm64/include/reloc.h b/sys/arch/arm64/include/reloc.h index bff8653f52b..c23b83adf73 100644 --- a/sys/arch/arm64/include/reloc.h +++ b/sys/arch/arm64/include/reloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: reloc.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ */ +/* $OpenBSD: reloc.h,v 1.2 2017/10/24 20:35:54 guenther Exp $ */ /* * AArch64 static relocation types. */ @@ -6,7 +6,7 @@ /* Miscellaneous. */ #define R_ARM_NONE 0 #define R_AARCH64_TPOFF64 1 /// COMPLETELY WRONG - stub -#define R_AARCH64_NONE 256 +#define R_AARCH64_NONE 0 /* Data. */ #define R_AARCH64_ABS64 257 |