summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-08-08 11:48:35 +0000
committerEric Andersen <andersen@codepoet.org>2005-08-08 11:48:35 +0000
commitb904ce177803224ea39b709d1236bc61123e669e (patch)
tree2521ac7d2fb032678a3543e600621226523185f4
parent8ce4796efafab6a4f3ccce6ff8c84862625eee90 (diff)
downloadbuildroot-novena-b904ce177803224ea39b709d1236bc61123e669e.tar.gz
buildroot-novena-b904ce177803224ea39b709d1236bc61123e669e.zip
Rather than adjusting the way ldso allocates memory, for the
time being simply add a series of suppressions to make valgrind ignore all memory mmaped by uClibc's ldso.
-rw-r--r--package/valgrind/uclibc.supp212
-rw-r--r--package/valgrind/valgrind.mk4
-rwxr-xr-xpackage/valgrind/valgrind.sh10
3 files changed, 226 insertions, 0 deletions
diff --git a/package/valgrind/uclibc.supp b/package/valgrind/uclibc.supp
new file mode 100644
index 000000000..179d27b7a
--- /dev/null
+++ b/package/valgrind/uclibc.supp
@@ -0,0 +1,212 @@
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_strdup
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_malloc
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Cond
+ fun:_dl_get_ready_to_run
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_get_ready_to_run
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_get_ready_to_run
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_get_ready_to_run
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_add_elf_hash_table
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_add_elf_hash_table
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_add_elf_hash_table
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_check_if_named_library_is_loaded
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_check_if_named_library_is_loaded
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_check_hashed_files
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_check_hashed_files
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_load_elf_shared_library
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_load_elf_shared_library
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_load_elf_shared_library
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_load_shared_library
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr1
+ fun:_dl_find_hash
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_find_hash
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_fixup
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_fixup
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_linux_resolve
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_linux_resolver
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_parse_lazy_relocation_information
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ obj:/lib/ld-uClibc*
+ fun:_dl_parse_lazy_relocation_information
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_parse_lazy_relocation_information
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ obj:/lib/ld-uClibc*
+ obj:/lib/ld-uClibc*
+ fun:_dl_parse_lazy_relocation_information
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ obj:/lib/ld-uClibc*
+ fun:_dl_parse_lazy_relocation_information
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ obj:/lib/ld-uClibc*
+ fun:_dl_parse_relocation_information
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ fun:_dl_parse_relocation_information
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ fun:_dl_parse_relocation_information
+ obj:/lib/ld-uClibc*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ obj:/lib/ld-uClibc*
+ fun:_dl_parse_relocation_information
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ obj:/lib/ld-uClibc*
+ obj:/lib/ld-uClibc*
+ fun:_dl_parse_relocation_information
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr2
+ obj:/lib/ld-uClibc-0.9.27.so
+ fun:*
+}
+{
+ <insert a suppression name here>
+ Memcheck:Addr4
+ obj:/lib/ld-uClibc-0.9.27.so
+ fun:*
+}
diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk
index ac529879c..f02957611 100644
--- a/package/valgrind/valgrind.mk
+++ b/package/valgrind/valgrind.mk
@@ -65,6 +65,10 @@ $(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/none/vgskin_none.so
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(VALGRIND_DIR) install;
+ mv $(TARGET_DIR)/usr/bin/valgrind $(TARGET_DIR)/usr/bin/valgrind.bin
+ cp package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/
+ cp package/valgrind/valgrind.sh $(TARGET_DIR)/usr/bin/valgrind
+ chmod a+x $(TARGET_DIR)/usr/bin/valgrind
rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
#mkdir -p $(TARGET_DIR)/etc/default
#cp $(VALGRIND_DIR)/valgrind.default $(TARGET_DIR)/etc/default/valgrind
diff --git a/package/valgrind/valgrind.sh b/package/valgrind/valgrind.sh
new file mode 100755
index 000000000..4b8eb2e57
--- /dev/null
+++ b/package/valgrind/valgrind.sh
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+#
+# Valgrind wrapper
+
+# Use special suppression file for uClibc
+export VALGRIND_OPTS="$VALGRIND_OPTS --suppressions=/usr/lib/valgrind/uclibc.supp"
+
+# Use 'exec' to avoid having another shell process hanging around.
+exec $0.bin "$@"
+