Files
poky/meta/recipes-devtools/elfutils/elfutils-0.160/scanf-format.patch
Hongxu Jia 2e13f27e38 elfutils: upgrade to 0.160
- Upgrade elfutils to 0.160

- Move 0.148 patches from elfutils to elfutils-0.148

- Drop 0.158 patches that got from debain, so far debian
  doesn't provide patches for 0.160 (the latest is 0.159)

- Move fixheadercheck.patch from 0.159 to 0.160

- We choose to use 0.159 patches from debian for the current 0.160
  which located in elfutils-0.160
  1) Rebase the following patches from 0.159 to 0.160
     hppa_backend.diff
     arm_backend.diff
     mips_backend.diff
     m68k_backend.diff
     arm_func_value.patch
     arm_unwind_ret_mask.patch

  2) Rebase redhat-portability.diff according to
     commit 52a6d20519
     Author: Roxana Ciobanu <roxana.ciobanu@intel.com>
     Date:   Tue Jul 1 17:17:00 2014 +0300
       elfutils/elfutils-native: Fix patching generated files

  3) Drop the following patches which have already beem merged to 0.160
     arm_unsupported.patch
     arm_syscall.patch
     unaligned.patch
     aarch64-run-native-test-fix.patch

(From OE-Core rev: 74b191022494fc1d357c1f05dbce38c986bed365)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-25 13:03:28 +00:00

41 lines
1.6 KiB
Diff

From: Kurt Roeckx <kurt@roeckx.be>
Subject: Use %m[ instead of %a[ in scanf()
%a was a gnu extention, but C99 made this a float. So it got
changed to %m (supported by glibc 2.7), but %a[ and %as are
still supported by glibc. The portability branch changed this
from %m to %a again since that's supported by more versions of
glibc. However gcc gives a warning about this using -Wformat
and we have a new enough libc to use %m.
Index: elfutils-0.153/src/addr2line.c
===================================================================
--- elfutils-0.153.orig/src/addr2line.c 2012-02-24 22:29:50.000000000 +0000
+++ elfutils-0.153/src/addr2line.c 2012-02-24 22:29:52.000000000 +0000
@@ -455,10 +455,10 @@
bool parsed = false;
int i, j;
char *name = NULL;
- if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
+ if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
&& string[i] == '\0')
parsed = adjust_to_section (name, &addr, dwfl);
- switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
+ switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
{
default:
break;
Index: elfutils-0.153/tests/line2addr.c
===================================================================
--- elfutils-0.153.orig/tests/line2addr.c 2012-02-24 22:29:50.000000000 +0000
+++ elfutils-0.153/tests/line2addr.c 2012-02-24 22:29:52.000000000 +0000
@@ -132,7 +132,7 @@
{
struct args a = { .arg = argv[cnt] };
- switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
+ switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
{
default:
case 0: