diff options
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.patch | 45 |
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 @@ | |||
1 | From 8e2ab18b874d1fda06243ad00209d44e2992928a Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Wielaard <mark@klomp.org> | ||
3 | Date: Sun, 12 Feb 2017 21:51:34 +0100 | ||
4 | Subject: [PATCH 1/2] libasm: Fix one GCC7 -Wformat-truncation=2 warning. | ||
5 | |||
6 | Make sure that if we have really lots of labels the tempsym doesn't get | ||
7 | truncated because it is too small to hold the whole name. | ||
8 | |||
9 | This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed | ||
10 | out by enabling this warning because there are currently some issues | ||
11 | with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 | ||
12 | |||
13 | Signed-off-by: Mark Wielaard <mark@klomp.org> | ||
14 | |||
15 | Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95) | ||
16 | Signed-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 | |||
21 | diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c | ||
22 | index 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 | -- | ||
44 | 2.13.0 | ||
45 | |||