summaryrefslogtreecommitdiff
path: root/ldso/libdl/Makefile.in
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2011-07-09 14:06:52 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2011-07-25 09:09:03 +0200
commit3d5cec4ff704c2dec151f3cdbcc426d746d37fcc (patch)
tree81210e286c1fb3a86f7c4dcbc9d9e29319c39903 /ldso/libdl/Makefile.in
parent63e61626c1e052c55d76861b771eda6602a14477 (diff)
libdl: add option for controlling dl_cleanup
When debugging memory leaks with Valgrind, it is required that dynamically loaded shared objects are not unloaded when a process exits, otherwise symbols from those files aren't correctly resolved in allocation traces. This patch adds the LDSO_NO_CLEANUP configuration option to control this behaviour. Signed-off-by: Richard Braun <rbraun@sceen.net> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'ldso/libdl/Makefile.in')
-rw-r--r--ldso/libdl/Makefile.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in
index 152185e37..be236c83f 100644
--- a/ldso/libdl/Makefile.in
+++ b/ldso/libdl/Makefile.in
@@ -20,7 +20,11 @@ endif
CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3
-LDFLAGS-libdl.so := $(LDFLAGS) -Wl,-fini,dl_cleanup
+LDFLAGS-libdl.so := $(LDFLAGS)
+
+ifeq ($(LDSO_NO_CLEANUP),)
+LDFLAGS-libdl.so += -Wl,-fini,dl_cleanup
+endif
LIBS-libdl.so := $(LIBS) $(ldso)