diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2019-11-27 00:11:50 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2019-11-27 00:11:50 +0000 |
commit | b614db5a866963756971700d4064685abceb37be (patch) | |
tree | f69077a13fa5e63f9a67ccac58e99bfc0949b719 /libexec | |
parent | bdb313460a13ae266f5e2b907c2a5a19e875c1c1 (diff) |
armv7 and aarch64 specify GLOB_DAT as having an addend, so treat it
exactly like the ABS{32,64} relocation there.
noted by and ok kettenis@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/aarch64/rtld_machine.c | 7 | ||||
-rw-r--r-- | libexec/ld.so/arm/rtld_machine.c | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/libexec/ld.so/aarch64/rtld_machine.c b/libexec/ld.so/aarch64/rtld_machine.c index 9fdad09fd8d..d9879a15c3f 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.14 2019/11/26 23:38:52 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.15 2019/11/27 00:11:49 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -98,11 +98,8 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) continue; case R_TYPE(ABS64): - value = rels->r_addend; - break; - case R_TYPE(GLOB_DAT): - value = 0; + value = rels->r_addend; break; case R_TYPE(COPY): diff --git a/libexec/ld.so/arm/rtld_machine.c b/libexec/ld.so/arm/rtld_machine.c index 12139b5ed0f..1f93936ea7b 100644 --- a/libexec/ld.so/arm/rtld_machine.c +++ b/libexec/ld.so/arm/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.35 2019/11/26 23:38:52 guenther Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.36 2019/11/27 00:11:49 guenther Exp $ */ /* * Copyright (c) 2004 Dale Rahn @@ -99,11 +99,8 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) continue; case R_TYPE(ABS32): - value = *where; - break; - case R_TYPE(GLOB_DAT): - value = 0; + value = *where; break; case R_TYPE(COPY): |