summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch45
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.12.0.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
new file mode 100644
index 0000000000..d04297dca8
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
@@ -0,0 +1,45 @@
1From 005bd11809a1ce65e9f2c28e884354a4741650b9 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Tue, 13 Dec 2016 11:29:55 +0800
4Subject: [PATCH] make ld-XXX.so strlen intercept optional
5
6Hack: Depending on how glibc was compiled (e.g. optimised for size or
7built with _FORTIFY_SOURCE enabled) the strlen symbol might not be
8found in ld-XXX.so. Therefore although we should still try to
9intercept it, don't make it mandatory to do so.
10
11Upstream-Status: Inappropriate
12
13Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
14Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
15---
16 coregrind/m_redir.c | 13 ++++++++++++-
17 1 file changed, 12 insertions(+), 1 deletion(-)
18
19diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
20index ff35009..d7d6816 100644
21--- a/coregrind/m_redir.c
22+++ b/coregrind/m_redir.c
23@@ -1275,7 +1275,18 @@ static void add_hardwired_spec (const HChar* sopatt, const HChar* fnpatt,
24 spec->to_addr = to_addr;
25 spec->isWrap = False;
26 spec->isGlobal = False;
27- spec->mandatory = mandatory;
28+
29+ /* Hack: Depending on how glibc was compiled (e.g. optimised for size or
30+ built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found.
31+ Therefore although we should still try to intercept it, don't make it
32+ mandatory to do so. We over-ride "mandatory" here to avoid the need to
33+ patch the many different architecture specific callers to
34+ add_hardwired_spec(). */
35+ if (0==VG_(strcmp)("strlen", fnpatt))
36+ spec->mandatory = NULL;
37+ else
38+ spec->mandatory = mandatory;
39+
40 /* VARIABLE PARTS */
41 spec->mark = False; /* not significant */
42 spec->done = False; /* not significant */
43--
441.9.1
45
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
index a1138804ce..d82541b846 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
22 file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ 22 file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
23 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ 23 file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
24 file://avoid-neon-for-targets-which-don-t-support-it.patch \ 24 file://avoid-neon-for-targets-which-don-t-support-it.patch \
25 file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
25" 26"
26SRC_URI_append_libc-musl = "\ 27SRC_URI_append_libc-musl = "\
27 file://0001-fix-build-for-musl-targets.patch \ 28 file://0001-fix-build-for-musl-targets.patch \