summaryrefslogtreecommitdiff
path: root/libexec/ld.so/sh
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2019-10-23 19:55:10 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2019-10-23 19:55:10 +0000
commit9cfa71267b5d70d7fb61345493bc9e39baedca58 (patch)
tree9e658387119560d975858be23e72f43dcc1f8bb7 /libexec/ld.so/sh
parent532c17d7310844a0a0fcbf2827dcd69a7045e782 (diff)
Prefer the size-independent ELF identifiers over the size-specific ones.
Strip superfluous parens from return statements while here. Done programatically with two perl invocations idea ok kettenis@ drahn@ ok visa@
Diffstat (limited to 'libexec/ld.so/sh')
-rw-r--r--libexec/ld.so/sh/archdep.h4
-rw-r--r--libexec/ld.so/sh/rtld_machine.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/libexec/ld.so/sh/archdep.h b/libexec/ld.so/sh/archdep.h
index c4edb23fb7a..2e6aaaf8ee0 100644
--- a/libexec/ld.so/sh/archdep.h
+++ b/libexec/ld.so/sh/archdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: archdep.h,v 1.11 2017/10/27 16:47:08 mpi Exp $ */
+/* $OpenBSD: archdep.h,v 1.12 2019/10/23 19:55:09 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -44,7 +44,7 @@
*/
static inline void
-RELOC_DYN(Elf32_Rela *r, const Elf32_Sym *s, Elf32_Addr *p, unsigned long v)
+RELOC_DYN(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v)
{
if (ELF_R_TYPE(r->r_info) == R_SH_RELATIVE) {
*p = v + r->r_addend;
diff --git a/libexec/ld.so/sh/rtld_machine.c b/libexec/ld.so/sh/rtld_machine.c
index 06a777588d0..b0fcd2de9a3 100644
--- a/libexec/ld.so/sh/rtld_machine.c
+++ b/libexec/ld.so/sh/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.30 2019/10/05 00:08:50 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.31 2019/10/23 19:55:09 guenther Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -615,7 +615,7 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz)
rels = (Elf_RelA *)(object->Dyn.info[rel]);
if (rels == NULL)
- return(0);
+ return 0;
if (relrel > numrela)
_dl_die("relacount > numrel: %ld > %ld", relrel, numrela);
@@ -744,7 +744,7 @@ resolve_failed:
}
}
- return (fails);
+ return fails;
}
/*
@@ -761,7 +761,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
Elf_RelA *rel;
if (object->Dyn.info[DT_PLTREL] != DT_RELA)
- return (0);
+ return 0;
if (object->traced)
lazy = 1;
@@ -789,7 +789,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
pltgot[2] = (Elf_Addr)_dl_bind_start;
}
- return (fails);
+ return fails;
}
Elf_Addr
@@ -819,7 +819,7 @@ _dl_bind(elf_object_t *object, int reloff)
buf.newval = sr.obj->obj_base + sr.sym->st_value;
if (__predict_false(sr.obj->traced) && _dl_trace_plt(sr.obj, symn))
- return (buf.newval);
+ return buf.newval;
buf.param.kb_addr = (Elf_Addr *)(object->obj_base + rel->r_offset);
buf.param.kb_size = sizeof(Elf_Addr);
@@ -837,5 +837,5 @@ _dl_bind(elf_object_t *object, int reloff)
: "r1", "cc", "memory");
}
- return (buf.newval);
+ return buf.newval;
}