From: jasper Date: Sat, 8 Jul 2023 14:09:43 +0000 (+0000) Subject: turn an ifdef'd _dl_printf call into DL_DEB and various whitespace fixes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d198ddd1206765fd49b847e71a11f132867b108a;p=openbsd turn an ifdef'd _dl_printf call into DL_DEB and various whitespace fixes sure deraadt@ --- diff --git a/libexec/ld.so/aarch64/ldasm.S b/libexec/ld.so/aarch64/ldasm.S index 578313ae6a6..6ed729473d5 100644 --- a/libexec/ld.so/aarch64/ldasm.S +++ b/libexec/ld.so/aarch64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.10 2023/04/24 22:06:05 kettenis Exp $ */ +/* $OpenBSD: ldasm.S,v 1.11 2023/07/08 14:09:43 jasper Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -106,7 +106,7 @@ ENTRY(_dl_bind_start) ldp x2, x3, [sp], #16 ldp x0, x1, [sp], #16 - // restore LR saved by PLT stub + // restore LR saved by PLT stub ldp xzr, x30, [sp], #16 br x17 END(_dl_bind_start) diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c index a5b410b14c0..3b3dbdb8360 100644 --- a/libexec/ld.so/dlfcn.c +++ b/libexec/ld.so/dlfcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dlfcn.c,v 1.113 2022/11/09 18:44:11 deraadt Exp $ */ +/* $OpenBSD: dlfcn.c,v 1.114 2023/07/08 14:09:43 jasper Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -101,7 +101,7 @@ dlopen(const char *libname, int flags) object->obj_flags |= DF_1_NODELETE; object->nodelete = 1; } - + _dl_link_dlopen(object); if (OBJECT_REF_CNT(object) > 1) { diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 99d9f6cdbe6..7a32013d948 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.212 2023/02/20 00:51:57 gnezdo Exp $ */ +/* $OpenBSD: loader.c,v 1.213 2023/07/08 14:09:43 jasper Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -781,7 +781,7 @@ _dl_rtld(elf_object_t *object) } } - /* + /* * TEXTREL binaries are loaded without immutable on un-writeable sections. * After text relocations are finished, these regions can become * immutable. OPENBSD_MUTABLE section always overlaps writeable LOADs, diff --git a/libexec/ld.so/resolve.c b/libexec/ld.so/resolve.c index 70e8dd0dec2..1916341158c 100644 --- a/libexec/ld.so/resolve.c +++ b/libexec/ld.so/resolve.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolve.c,v 1.99 2023/04/13 19:57:30 millert Exp $ */ +/* $OpenBSD: resolve.c,v 1.100 2023/07/08 14:09:43 jasper Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -275,10 +275,9 @@ _dl_finalize_object(const char *objname, Elf_Dyn *dynp, Elf_Phdr *phdrp, elf_object_t *object; Elf_Addr gnu_hash = 0; -#if 0 - _dl_printf("objname [%s], dynp %p, objtype %x lbase %lx, obase %lx\n", - objname, dynp, objtype, lbase, obase); -#endif + DL_DEB(("objname [%s], dynp %p, objtype %x lbase %lx, obase %lx\n", + objname, dynp, objtype, lbase, obase)); + object = _dl_calloc(1, sizeof(elf_object_t)); if (object == NULL) _dl_oom(); @@ -612,7 +611,7 @@ _dl_find_symbol_obj(elf_object_t *obj, struct symlookup *sl) if (((*hashval ^ hash) >> 1) == 0) { const Elf_Sym *sym = symt + (hashval - obj->chains_gnu); - + int r = matched_symbol(obj, sym, sl); if (r) return r > 0;