Author: kib Date: Sun Apr 14 18:04:53 2019 New Revision: 346216 URL: https://svnweb.freebsd.org/changeset/base/346216
Log: ld-elf.so: make LD_DEBUG always functional. This causes some increase of the dynamic linker size, but benefits of avoiding compiling private copy or the linker when debugging is required. definitely worth it. The dbg() calls can be compiled out by defining LD_NO_DEBUG symbol. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/debug.h Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Sun Apr 14 13:37:50 2019 (r346215) +++ head/libexec/rtld-elf/Makefile Sun Apr 14 18:04:53 2019 (r346216) @@ -2,7 +2,7 @@ # Use the following command to build local debug version of dynamic # linker: -# make DEBUG_FLAGS=-g DEBUG=-DDEBUG WITHOUT_TESTS=yes all +# make DEBUG_FLAGS=-g WITHOUT_TESTS=yes all .include <src.opts.mk> PACKAGE= clibs Modified: head/libexec/rtld-elf/debug.h ============================================================================== --- head/libexec/rtld-elf/debug.h Sun Apr 14 13:37:50 2019 (r346215) +++ head/libexec/rtld-elf/debug.h Sun Apr 14 18:04:53 2019 (r346216) @@ -39,10 +39,10 @@ #include <string.h> #include <unistd.h> -extern void debug_printf(const char *, ...) __printflike(1, 2); +void debug_printf(const char *, ...) __printflike(1, 2); extern int debug; -#ifdef DEBUG +#ifndef NO_LD_DEBUG #define dbg(...) debug_printf(__VA_ARGS__) #else #define dbg(...) ((void) 0) _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"