git: 5181fe24b2d4 - main - rtld-elf: Reuse _BASENAME_RTLD for debug.h rather than duplicating logic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Jul 2023 17:51:56 UTC
The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=5181fe24b2d4f0e2daba180b6f36477cd8fe31d7 commit 5181fe24b2d4f0e2daba180b6f36477cd8fe31d7 Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2023-07-09 17:45:49 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> 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 <sys/cdefs.h> #include <string.h> +#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 */