From nobody Sun Jul 09 17:51:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QzZT84Hwqz4mVdQ; Sun, 9 Jul 2023 17:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QzZT83YzSz3tXv; Sun, 9 Jul 2023 17:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688925116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oM+C8fgSYtUix5EeN1Sysl4adZM1By66KHMFXqjAOL4=; b=fF3zfr8j3AaDi0BCtJmK9fw5R80SXyue4mD3qaDDHR8gJJn8iF/GMpLfAXktOT7bUo7izh vHPQbzMBrkOfPCGUAGFcM6iPRv1qSZfsmRuyh1g13cBCsDofHuza+iaOrobtgt/2qJDoxz O8VoodoqZmhD8G0u3hgVPqsaBMnlMKA87zXgxien6Z6yuBFHOh7RGNDyiLrbWiDH6uvDhS dxFPuOFNo38yHd6YuQOsVSaoXs2E0Fdb1OOEWFNspg9YYwWGHQ5coOaQPLihM9Q3P9kNoZ i/uJO3b3TDu6yZek9l1iubecD0WY4gCy+rzTi4F8di+k3uJbVKpgg1Yto9ravw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688925116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oM+C8fgSYtUix5EeN1Sysl4adZM1By66KHMFXqjAOL4=; b=fqFNXGnRwj8wA+C3DFy17HYHREh6UrNv3oKX3yxl2ebZe6rYw9IP5d37v5T5GAkxZBKHKY KGCzjjkYsFywQwpCDPBRgmw1tr/ICN5PL9KAYukjb6TVADe0zxIpZMUBnS2UP0/G0bQoCK TY0ZXQmWtmUROGSngL8JbEBXugMVN3i8Sk4iQxEskvwhQJmpAP50U8XmHTWSynY9s+rZm2 LKgwmgkvxXxNXuk0kcz48Z8cNCFPEHV4tcme9/V/tWu49b6cW/sbpcRYe0wqG2yVIjTZu8 v6Adk5cJvEEbvYb1C97l8H3iVt1VSS0s/VMTpf9bnozr18r42X1SUbTyM5NHlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688925116; a=rsa-sha256; cv=none; b=YD516nDREvmFt+xmoMDVaAZUczXSe7tznbS+e70zYoZSX28UnyYognHixant8yggIYLGNF 6nPnn7PSIykXO1XV6ZvEDkeNqwvckO2xnvAlLKFOnHDmYghuEbHVupj9V6wqHhzQ7hIU40 dtFmNz83mDLUAB9q+71ihTRHVg9LBNreKCfTCLwUbDE2kS7HfI93qbN5QDVJ3DT+MeR0FE pG6buVXJeuh7uQx+FZ9PBmBWQSeHQno2YFpGqRw/jyjye4p+GzM/VgVBS0Sm+uRMyoESvX IozMeYh9mHe9VWaWkSx5CqfyF4ftpgB6kV/hFcOWnVNk+nFGcfXlog1gnvq7Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QzZT82h2wz1BNc; Sun, 9 Jul 2023 17:51:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 369HpuHW096392; Sun, 9 Jul 2023 17:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 369Hpuhw096391; Sun, 9 Jul 2023 17:51:56 GMT (envelope-from git) Date: Sun, 9 Jul 2023 17:51:56 GMT Message-Id: <202307091751.369Hpuhw096391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 5181fe24b2d4 - main - rtld-elf: Reuse _BASENAME_RTLD for debug.h rather than duplicating logic List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5181fe24b2d4f0e2daba180b6f36477cd8fe31d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=5181fe24b2d4f0e2daba180b6f36477cd8fe31d7 commit 5181fe24b2d4f0e2daba180b6f36477cd8fe31d7 Author: Jessica Clarke AuthorDate: 2023-07-09 17:45:49 +0000 Commit: Jessica Clarke CommitDate: 2023-07-09 17:45:49 +0000 rtld-elf: Reuse _BASENAME_RTLD for debug.h rather than duplicating logic Reviewed by: kib, brooks, jhb Differential Revision: https://reviews.freebsd.org/D40919 --- libexec/rtld-elf/debug.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libexec/rtld-elf/debug.h b/libexec/rtld-elf/debug.h index 95c06c7babc3..513e017aa35c 100644 --- a/libexec/rtld-elf/debug.h +++ b/libexec/rtld-elf/debug.h @@ -37,6 +37,7 @@ #include #include +#include "rtld_paths.h" #include "rtld_printf.h" void debug_printf(const char *, ...) __printflike(1, 2); @@ -48,17 +49,11 @@ extern int debug; #define dbg(...) ((void) 0) #endif -#ifndef COMPAT_32BIT -#define _MYNAME "ld-elf.so.1" -#else -#define _MYNAME "ld-elf32.so.1" -#endif - -#define assert(cond) ((cond) ? (void) 0 : \ - (msg(_MYNAME ": assert failed: " __FILE__ ":" \ +#define assert(cond) ((cond) ? (void) 0 : \ + (msg(_BASENAME_RTLD ": assert failed: " __FILE__ ":" \ __XSTRING(__LINE__) "\n"), abort())) #define msg(s) rtld_putstr(s) -#define trace() msg(_MYNAME ": " __XSTRING(__LINE__) "\n") +#define trace() msg(_BASENAME_RTLD ": " __XSTRING(__LINE__) "\n") #endif /* DEBUG_H */