diff --git a/libexec/rtld-elf/debug.h b/libexec/rtld-elf/debug.h --- 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 @@ #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 */