From 6630516b0a000e0ac9769eceda72881f788b23b0 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Wed, 7 Nov 2007 15:14:50 +0000 Subject: Added support for GNU hash style into dynamic linker --- ldso/include/ldso.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ldso/include/ldso.h') diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 40ac12a57..d96d137e9 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -66,9 +66,17 @@ extern int _dl_debug_file; _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __FUNCTION__, __LINE__, ## args); # define _dl_if_debug_dprint(fmt, args...) \ do { if (_dl_debug) __dl_debug_dprint(fmt, ## args); } while (0) +# define _dl_assert(expr) \ + do { \ + if (!(expr)) { \ + __dl_debug_dprint("assert(%s)\n", #expr); \ + _dl_exit(45); \ + } \ + } while (0) #else -# define _dl_debug_dprint(fmt, args...) +# define __dl_debug_dprint(fmt, args...) # define _dl_if_debug_dprint(fmt, args...) +# define _dl_assert(expr) # define _dl_debug_file 2 #endif /* __SUPPORT_LD_DEBUG__ */ -- cgit v1.2.3