From: Eric Andersen Date: Mon, 8 Aug 2005 11:48:35 +0000 (-0000) Subject: Rather than adjusting the way ldso allocates memory, for the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b904ce177803224ea39b709d1236bc61123e669e;p=buildroot.git 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. --- diff --git a/package/valgrind/uclibc.supp b/package/valgrind/uclibc.supp new file mode 100644 index 0000000000..179d27b7ac --- /dev/null +++ b/package/valgrind/uclibc.supp @@ -0,0 +1,212 @@ +{ + + Memcheck:Addr1 + fun:_dl_strdup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_malloc + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Cond + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolve + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolver + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc-0.9.27.so + fun:* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc-0.9.27.so + fun:* +} diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk index ac529879c5..f029576117 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 0000000000..4b8eb2e57b --- /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 "$@" +