mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-30 13:00:02 +00:00
ltrace: fix build with -Os
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
|||||||
|
From efd12cfb10ccd2c612838c0e22069554ce60637c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Petr Machata <pmachata@redhat.com>
|
||||||
|
Date: Wed, 2 Jan 2013 16:01:43 +0100
|
||||||
|
Subject: [PATCH] In Linux backend, initialize linkmap struct
|
||||||
|
|
||||||
|
GCC 4.7.2 -m32 -Os gives the following (spurious) warning:
|
||||||
|
proc.c: In function 'crawl_linkmap':
|
||||||
|
proc.c:544:25: error: 'rlm.l_addr' may be used uninitialized in this
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
---
|
||||||
|
sysdeps/linux-gnu/proc.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c
|
||||||
|
index 6e01d28..d69c985 100644
|
||||||
|
--- a/sysdeps/linux-gnu/proc.c
|
||||||
|
+++ b/sysdeps/linux-gnu/proc.c
|
||||||
|
@@ -484,7 +484,7 @@ crawl_linkmap(struct process *proc, struct lt_r_debug_64 *dbg)
|
||||||
|
arch_addr_t addr = (arch_addr_t)(uintptr_t)dbg->r_map;
|
||||||
|
|
||||||
|
while (addr != 0) {
|
||||||
|
- struct lt_link_map_64 rlm;
|
||||||
|
+ struct lt_link_map_64 rlm = {};
|
||||||
|
if (lm_fetcher(proc)(proc, addr, &rlm) < 0) {
|
||||||
|
debug(2, "Unable to read link map");
|
||||||
|
return;
|
||||||
|
--
|
||||||
|
2.3.5
|
||||||
|
|
||||||
@@ -18,6 +18,7 @@ RDEPENDS_${PN} = "elfutils"
|
|||||||
SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git \
|
SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git \
|
||||||
file://ltrace-0.7.2-unused-typedef.patch \
|
file://ltrace-0.7.2-unused-typedef.patch \
|
||||||
file://configure-allow-to-disable-selinux-support.patch \
|
file://configure-allow-to-disable-selinux-support.patch \
|
||||||
|
file://0001-In-Linux-backend-initialize-linkmap-struct.patch \
|
||||||
"
|
"
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user