Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Apr 2019 18:04:53 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346216 - head/libexec/rtld-elf
Message-ID:  <201904141804.x3EI4rex029798@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904141804.x3EI4rex029798>