summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/elfutils-0.166/Fix_one_GCC7_warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.166/Fix_one_GCC7_warning.patch')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils-0.166/Fix_one_GCC7_warning.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.166/Fix_one_GCC7_warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.166/Fix_one_GCC7_warning.patch
new file mode 100644
index 0000000000..25f5e14821
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.166/Fix_one_GCC7_warning.patch
@@ -0,0 +1,45 @@
1From 8e2ab18b874d1fda06243ad00209d44e2992928a Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Sun, 12 Feb 2017 21:51:34 +0100
4Subject: [PATCH 1/2] libasm: Fix one GCC7 -Wformat-truncation=2 warning.
5
6Make sure that if we have really lots of labels the tempsym doesn't get
7truncated because it is too small to hold the whole name.
8
9This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed
10out by enabling this warning because there are currently some issues
11with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
12
13Signed-off-by: Mark Wielaard <mark@klomp.org>
14
15Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95)
16Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
17---
18 libasm/asm_newsym.c | 6 ++++--
19 1 file changed, 4 insertions(+), 2 deletions(-)
20
21diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c
22index 7f522910..76482bb2 100644
23--- a/libasm/asm_newsym.c
24+++ b/libasm/asm_newsym.c
25@@ -1,5 +1,5 @@
26 /* Define new symbol for current position in given section.
27- Copyright (C) 2002, 2005 Red Hat, Inc.
28+ Copyright (C) 2002, 2005, 2017 Red Hat, Inc.
29 This file is part of elfutils.
30 Written by Ulrich Drepper <drepper@redhat.com>, 2002.
31
32@@ -44,7 +44,9 @@ AsmSym_t *
33 asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size,
34 int type, int binding)
35 {
36-#define TEMPSYMLEN 10
37+/* We don't really expect labels with many digits, but in theory it could
38+ be 10 digits (plus ".L" and a zero terminator). */
39+#define TEMPSYMLEN 13
40 char tempsym[TEMPSYMLEN];
41 AsmSym_t *result;
42
43--
442.13.0
45