summaryrefslogtreecommitdiff
path: root/ldso/include/ldso.h
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-07 15:14:50 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-07 15:14:50 +0000
commit6630516b0a000e0ac9769eceda72881f788b23b0 (patch)
treebe45d000f7fcc15236d67c0c0703ee10645518ed /ldso/include/ldso.h
parent15e6cdf87ac378107dbbe096f1b09917733b0240 (diff)
Added support for GNU hash style into dynamic linker
Diffstat (limited to 'ldso/include/ldso.h')
-rw-r--r--ldso/include/ldso.h10
1 files changed, 9 insertions, 1 deletions
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__ */