diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2014-11-14 17:29:03 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-11-25 12:58:19 +0000 |
| commit | 74b191022494fc1d357c1f05dbce38c986bed365 (patch) | |
| tree | 37b62453d9b4c3eb82d15122321026a91e5019bf | |
| parent | c2332d304a2c872e97653c980b090efa2181123b (diff) | |
| download | openembedded-core-74b191022494fc1d357c1f05dbce38c986bed365.tar.gz openembedded-core-74b191022494fc1d357c1f05dbce38c986bed365.tar.bz2 openembedded-core-74b191022494fc1d357c1f05dbce38c986bed365.zip | |
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 52a6d20519870103134166d91e22d21fd736195d
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
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/arm_backend.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff (renamed from meta/recipes-devtools/elfutils/elfutils/elf_additions.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch (renamed from meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch (renamed from meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils/mips_backend.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch (renamed from meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff (renamed from meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch (renamed from meta/recipes-devtools/elfutils/elfutils/remove-unused.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch | 27 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff | 77 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch | 34 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff | 1756 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.158/unwind_non_linux.patch | 256 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/arm_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/arm_backend.diff) | 382 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/arm_func_value.patch | 166 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/arm_unwind_ret_mask.patch | 83 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/fixheadercheck.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/fixheadercheck.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/hppa_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/hppa_backend.diff) | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/m68k_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/m68k_backend.diff) | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/mips_backend.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_backend.diff) | 2 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/mips_readelf_w.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/mips_readelf_w.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/non_linux.patch | 35 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/redhat-portability.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/redhat-portability.diff) | 408 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/scanf-format.patch (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/scanf-format.patch) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.160/testsuite-ignore-elflint.diff (renamed from meta/recipes-devtools/elfutils/elfutils-0.158/testsuite-ignore-elflint.diff) | 0 | ||||
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils_0.160.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.158.bb) | 28 |
33 files changed, 736 insertions, 2557 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff index d4e4675ad5..d4e4675ad5 100644 --- a/meta/recipes-devtools/elfutils/elfutils/arm_backend.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/arm_backend.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff index 5baa709000..5baa709000 100644 --- a/meta/recipes-devtools/elfutils/elfutils/elf_additions.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elf_additions.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch index b619619ec0..b619619ec0 100644 --- a/meta/recipes-devtools/elfutils/elfutils/elfutils-ar-c-fix-num-passed-to-memset.patch +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-ar-c-fix-num-passed-to-memset.patch diff --git a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch index 0ff353d0de..0ff353d0de 100644 --- a/meta/recipes-devtools/elfutils/elfutils/elfutils-fsize.patch +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/elfutils-fsize.patch diff --git a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch index 0e28690207..0e28690207 100644 --- a/meta/recipes-devtools/elfutils/elfutils/fix-build-gcc-4.8.patch +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix-build-gcc-4.8.patch diff --git a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch index bd634b4418..bd634b4418 100644 --- a/meta/recipes-devtools/elfutils/elfutils/fix_for_gcc-4.7.patch +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch diff --git a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff index a86b97c683..a86b97c683 100644 --- a/meta/recipes-devtools/elfutils/elfutils/hppa_backend.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/hppa_backend.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff index 5b621f92ff..5b621f92ff 100644 --- a/meta/recipes-devtools/elfutils/elfutils/m68k_backend.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/m68k_backend.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff index 3f81a75b1a..3f81a75b1a 100644 --- a/meta/recipes-devtools/elfutils/elfutils/mips_backend.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/mips_backend.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch index 2b5dad368a..2b5dad368a 100644 --- a/meta/recipes-devtools/elfutils/elfutils/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff index b8a912c412..b8a912c412 100644 --- a/meta/recipes-devtools/elfutils/elfutils/redhat-portability.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-portability.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff index cd398549df..cd398549df 100644 --- a/meta/recipes-devtools/elfutils/elfutils/redhat-robustify.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/redhat-robustify.diff diff --git a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch index 6a19791480..6a19791480 100644 --- a/meta/recipes-devtools/elfutils/elfutils/remove-unused.patch +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/remove-unused.patch diff --git a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff index d792d5fd73..d792d5fd73 100644 --- a/meta/recipes-devtools/elfutils/elfutils/testsuite-ignore-elflint.diff +++ b/meta/recipes-devtools/elfutils/elfutils-0.148/testsuite-ignore-elflint.diff diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch deleted file mode 100644 index 6c44314589..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.158/CVE-2014-0172.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7f1eec317db79627b473c5b149a22a1b20d1f68f Mon Sep 17 00:00:00 2001 -From: Mark Wielaard <mjw@redhat.com> -Date: Wed, 9 Apr 2014 11:33:23 +0200 -Subject: [PATCH] CVE-2014-0172 Check for overflow before calling malloc to - uncompress data. - -https://bugzilla.redhat.com/show_bug.cgi?id=1085663 - -Reported-by: Florian Weimer <fweimer@redhat.com> -Signed-off-by: Mark Wielaard <mjw@redhat.com> - -Index: elfutils-0.158/libdw/dwarf_begin_elf.c -=================================================================== ---- elfutils-0.158.orig/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.928213292 +0000 -+++ elfutils-0.158/libdw/dwarf_begin_elf.c 2014-05-01 17:10:01.924213375 +0000 -@@ -1,5 +1,5 @@ - /* Create descriptor from ELF descriptor for processing file. -- Copyright (C) 2002-2011 Red Hat, Inc. -+ Copyright (C) 2002-2011, 2014 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper <drepper@redhat.com>, 2002. - -@@ -289,6 +289,12 @@ - memcpy (&size, data->d_buf + 4, sizeof size); - size = be64toh (size); - -+ /* Check for unsigned overflow so malloc always allocated -+ enough memory for both the Elf_Data header and the -+ uncompressed section data. */ -+ if (unlikely (sizeof (Elf_Data) + size < size)) -+ break; -+ - Elf_Data *zdata = malloc (sizeof (Elf_Data) + size); - if (unlikely (zdata == NULL)) - break; diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch deleted file mode 100644 index e2f0576d7b..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.158/core_filename.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Matthias Klose <doko@ubuntu.com> -Date: Tue, 7 Jan 2014 10:25:29 +0100 -Subject: [PATCH] tests: backtrace-subr.sh (check_native_core) should check - core file name. - -Needed when /proc/sys/kernel/core_uses_pid is set to 0. Try to rename -the core file, and if it does still fail, skip the test. - -diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh -index e7ece91..62b873c 100644 ---- a/tests/backtrace-subr.sh -+++ b/tests/backtrace-subr.sh -@@ -111,6 +111,11 @@ check_native_core() - - # Skip the test if we cannot adjust core ulimit. - core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`" -+ # see if /proc/sys/kernel/core_uses_pid is set to 0 -+ if [ -f core ]; then -+ mv core "$core" -+ fi -+ if [ ! -f "$core" ]; then exit 77; fi - - if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then - VALGRIND_CMD="$SAVED_VALGRIND_CMD" --- -1.9.2 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff deleted file mode 100644 index 671c8ee1ae..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.158/elf_additions.diff +++ /dev/null @@ -1,77 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - libelf/elf.h | 27 +++++++++++++++++++++++++-- - 1 file changed, 25 insertions(+), 2 deletions(-) - -diff --git a/libelf/elf.h b/libelf/elf.h ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -142,6 +142,7 @@ typedef struct - #define ELFOSABI_NETBSD 2 /* NetBSD. */ - #define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */ - #define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */ -+#define ELFOSABI_HURD 4 /* GNU/Hurd */ - #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ - #define ELFOSABI_AIX 7 /* IBM AIX. */ - #define ELFOSABI_IRIX 8 /* SGI Irix. */ -@@ -149,8 +150,13 @@ typedef struct - #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */ - #define ELFOSABI_MODESTO 11 /* Novell Modesto. */ - #define ELFOSABI_OPENBSD 12 /* OpenBSD. */ -+#define ELFOSABI_OPENVMS 13 /* OpenVMS */ -+#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */ -+#define ELFOSABI_AROS 15 /* Amiga Research OS */ -+/* 64-255 Architecture-specific value range */ - #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */ - #define ELFOSABI_ARM 97 /* ARM */ -+/* This is deprecated? It's not in the latest version anymore. */ - #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ - - #define EI_ABIVERSION 8 /* ABI version */ -@@ -205,7 +211,7 @@ typedef struct - #define EM_H8_300H 47 /* Hitachi H8/300H */ - #define EM_H8S 48 /* Hitachi H8S */ - #define EM_H8_500 49 /* Hitachi H8/500 */ --#define EM_IA_64 50 /* Intel Merced */ -+#define EM_IA_64 50 /* Intel IA64 */ - #define EM_MIPS_X 51 /* Stanford MIPS-X */ - #define EM_COLDFIRE 52 /* Motorola Coldfire */ - #define EM_68HC12 53 /* Motorola M68HC12 */ -@@ -219,7 +225,8 @@ typedef struct - #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ - #define EM_X86_64 62 /* AMD x86-64 architecture */ - #define EM_PDSP 63 /* Sony DSP Processor */ -- -+#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */ -+#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */ - #define EM_FX66 66 /* Siemens FX66 microcontroller */ - #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ - #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ -@@ -249,6 +256,22 @@ typedef struct - #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ - #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ - #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ -+#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */ -+#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */ -+#define EM_NS32K 97 /* National Semiconductor 32000 series */ -+#define EM_TPC 98 /* Tenor Network TPC processor */ -+#define EM_SNP1K 99 /* Trebia SNP 1000 processor */ -+#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */ -+#define EM_IP2K 101 /* Ubicom IP2XXX microcontroller family */ -+#define EM_MAX 102 /* MAX Processor */ -+#define EM_CR 103 /* National Semiconductor CompactRISC */ -+#define EM_F2MC16 104 /* Fujitsu F2MC16 */ -+#define EM_MSP430 105 /* TI msp430 micro controller */ -+#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */ -+#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */ -+#define EM_SEP 108 /* Sharp embedded microprocessor */ -+#define EM_ARCA 109 /* Arca RISC Microprocessor */ -+ - #define EM_AARCH64 183 /* ARM AARCH64 */ - #define EM_TILEPRO 188 /* Tilera TILEPro */ - #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ --- -1.8.1.2 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch b/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch deleted file mode 100644 index 1dbd52d557..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.158/m4-biarch.m4-tweak-AC_RUN_IFELSE-for-cross-compiling.patch +++ /dev/null @@ -1,34 +0,0 @@ -m4/biarch.m4: tweak AC_RUN_IFELSE for cross-compiling - -Macro: AC_RUN_IFELSE (input, - [action-if-true], - [action-if-false], - [action-if-cross-compiling]) - -Add the missing [action-if-cross-compiling] part to support -cross-compiling. - -Upstream-Status: inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - m4/biarch.m4 | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/m4/biarch.m4 b/m4/biarch.m4 ---- a/m4/biarch.m4 -+++ b/m4/biarch.m4 -@@ -40,7 +40,9 @@ AC_CACHE_CHECK([whether $biarch_CC makes executables we can run], - save_CC="$CC" - CC="$biarch_CC" - AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])], -- utrace_cv_cc_biarch=yes, utrace_cv_cc_biarch=no) -+ utrace_cv_cc_biarch=yes, -+ utrace_cv_cc_biarch=no, -+ utrace_cv_cc_biarch=yes) - CC="$save_CC"])], [utrace_cv_cc_biarch=no]) - AS_IF([test $utrace_cv_cc_biarch != yes], [dnl - AC_MSG_WARN([not running biarch tests, $biarch_CC does not work])])]) --- -1.8.1.2 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff b/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff deleted file mode 100644 index f358a85466..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.158/redhat-robustify.diff +++ /dev/null @@ -1,1756 +0,0 @@ ---- elfutils/libdwfl/ChangeLog -+++ elfutils/libdwfl/ChangeLog -@@ -680,6 +680,11 @@ - * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL. - Reported by Kurt Roeckx <kurt@roeckx.be>. - -+2011-03-23 Petr Machata <pmachata@redhat.com> -+ -+ * relocate.c (relocate_section): Use gelf_fsize instead of relying -+ on shdr->sh_entsize. -+ - 2011-02-11 Roland McGrath <roland@redhat.com> - - * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz ---- elfutils/libdwfl/relocate.c -+++ elfutils/libdwfl/relocate.c -@@ -1,5 +1,5 @@ - /* Relocate debug information. -- Copyright (C) 2005-2010 Red Hat, Inc. -+ Copyright (C) 2005-2011 Red Hat, Inc. - This file is part of elfutils. - - This file is free software; you can redistribute it and/or modify -@@ -456,7 +456,10 @@ relocate_section (Dwfl_Module *mod, Elf - } - } - -- size_t nrels = shdr->sh_size / shdr->sh_entsize; -+ size_t sh_entsize -+ = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : ELF_T_RELA, -+ 1, EV_CURRENT); -+ size_t nrels = shdr->sh_size / sh_entsize; - size_t complete = 0; - if (shdr->sh_type == SHT_REL) - for (size_t relidx = 0; !result && relidx < nrels; ++relidx) -@@ -558,7 +561,7 @@ relocate_section (Dwfl_Module *mod, Elf - nrels = next; - } - -- shdr->sh_size = reldata->d_size = nrels * shdr->sh_entsize; -+ shdr->sh_size = reldata->d_size = nrels * sh_entsize; - gelf_update_shdr (scn, shdr); - } - ---- elfutils/libelf/ChangeLog -+++ elfutils/libelf/ChangeLog -@@ -754,10 +754,53 @@ - If section content hasn't been read yet, do it before looking for the - block size. If no section data present, infer size of section header. - -+2005-05-14 Jakub Jelinek <jakub@redhat.com> -+ -+ * libelfP.h (INVALID_NDX): Define. -+ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any. -+ * gelf_getlib.c (gelf_getlib): Likewise. -+ * gelf_getmove.c (gelf_getmove): Likewise. -+ * gelf_getrel.c (gelf_getrel): Likewise. -+ * gelf_getrela.c (gelf_getrela): Likewise. -+ * gelf_getsym.c (gelf_getsym): Likewise. -+ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise. -+ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise. -+ * gelf_getversym.c (gelf_getversym): Likewise. -+ * gelf_update_dyn.c (gelf_update_dyn): Likewise. -+ * gelf_update_lib.c (gelf_update_lib): Likewise. -+ * gelf_update_move.c (gelf_update_move): Likewise. -+ * gelf_update_rel.c (gelf_update_rel): Likewise. -+ * gelf_update_rela.c (gelf_update_rela): Likewise. -+ * gelf_update_sym.c (gelf_update_sym): Likewise. -+ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise. -+ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise. -+ * gelf_update_versym.c (gelf_update_versym): Likewise. -+ * elf_newscn.c (elf_newscn): Check for overflow. -+ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise. -+ (__elfw2(LIBELFBITS,updatefile)): Likewise. -+ * elf_begin.c (file_read_elf): Likewise. -+ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise. -+ * elf_getarsym.c (elf_getarsym): Likewise. -+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise. - 2005-05-11 Ulrich Drepper <drepper@redhat.com> - - * elf.h: Update again. - -+2005-05-17 Jakub Jelinek <jakub@redhat.com> -+ -+ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header -+ table fits into object's bounds. -+ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to -+ elf->map_address. Check if first section header fits into object's -+ bounds. -+ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): -+ Check if section header table fits into object's bounds. -+ * elf_begin.c (get_shnum): Ensure section headers fits into -+ object's bounds. -+ (file_read_elf): Make sure scncnt is small enough to allocate both -+ ElfXX_Shdr and Elf_Scn array. Make sure section and program header -+ tables fit into object's bounds. Avoid memory leak on failure. -+ - 2005-05-09 Ulrich Drepper <drepper@redhat.com> - - * elf.h: Update from glibc. ---- elfutils/libelf/elf32_getphdr.c -+++ elfutils/libelf/elf32_getphdr.c -@@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) - - if (elf->map_address != NULL) - { -+ /* First see whether the information in the ELF header is -+ valid and it does not ask for too much. */ -+ if (unlikely (ehdr->e_phoff >= elf->maximum_size) -+ || unlikely (elf->maximum_size - ehdr->e_phoff < size)) -+ { -+ /* Something is wrong. */ -+ __libelf_seterrno (ELF_E_INVALID_PHDR); -+ goto out; -+ } -+ - /* All the data is already mapped. Use it. */ - void *file_phdr = ((char *) elf->map_address - + elf->start_offset + ehdr->e_phoff); ---- elfutils/libelf/elf32_getshdr.c -+++ elfutils/libelf/elf32_getshdr.c -@@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn) - goto out; - - size_t shnum; -- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0) -+ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0 -+ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr))) - goto out; - size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr)); - -@@ -77,6 +78,16 @@ load_shdr_wrlock (Elf_Scn *scn) - - if (elf->map_address != NULL) - { -+ /* First see whether the information in the ELF header is -+ valid and it does not ask for too much. */ -+ if (unlikely (ehdr->e_shoff >= elf->maximum_size) -+ || unlikely (elf->maximum_size - ehdr->e_shoff < size)) -+ { -+ /* Something is wrong. */ -+ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); -+ goto free_and_out; -+ } -+ - ElfW2(LIBELFBITS,Shdr) *notcvt; - - /* All the data is already mapped. If we could use it ---- elfutils/libelf/elf32_newphdr.c -+++ elfutils/libelf/elf32_newphdr.c -@@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count) - || count == PN_XNUM - || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) - { -+ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr)))) -+ { -+ result = NULL; -+ goto out; -+ } -+ - /* Allocate a new program header with the appropriate number of - elements. */ - result = (ElfW2(LIBELFBITS,Phdr) *) ---- elfutils/libelf/elf32_updatefile.c -+++ elfutils/libelf/elf32_updatefile.c -@@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf - /* Write all the sections. Well, only those which are modified. */ - if (shnum > 0) - { -+ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *))) -+ return 1; -+ - Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; - Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *)); - char *const shdr_start = ((char *) elf->map_address + elf->start_offset -@@ -624,6 +627,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf - /* Write all the sections. Well, only those which are modified. */ - if (shnum > 0) - { -+ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *) -+ + sizeof (ElfW2(LIBELFBITS,Shdr))))) -+ return 1; -+ - off_t shdr_offset = elf->start_offset + ehdr->e_shoff; - #if EV_NUM != 2 - xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR]; ---- elfutils/libelf/elf_begin.c -+++ elfutils/libelf/elf_begin.c -@@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c - - if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) - { -- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize) -+ if (unlikely (ehdr.e32->e_shoff >= maxsize) -+ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr))) - /* Cannot read the first section header. */ - return 0; - -@@ -192,7 +193,8 @@ get_shnum (void *map_address, unsigned c - - if (unlikely (result == 0) && ehdr.e64->e_shoff != 0) - { -- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize) -+ if (unlikely (ehdr.e64->e_shoff >= maxsize) -+ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)) - /* Cannot read the first section header. */ - return 0; - -@@ -264,6 +266,15 @@ file_read_elf (int fildes, void *map_add - /* Could not determine the number of sections. */ - return NULL; - -+ /* Check for too many sections. */ -+ if (e_ident[EI_CLASS] == ELFCLASS32) -+ { -+ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr))) -+ return NULL; -+ } -+ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr))) -+ return NULL; -+ - /* We can now allocate the memory. Even if there are no section headers, - we allocate space for a zeroth section in case we need it later. */ - const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP) -@@ -303,6 +314,16 @@ file_read_elf (int fildes, void *map_add - { - /* We can use the mmapped memory. */ - elf->state.elf32.ehdr = ehdr; -+ -+ if (unlikely (ehdr->e_shoff >= maxsize) -+ || unlikely (maxsize - ehdr->e_shoff -+ < scncnt * sizeof (Elf32_Shdr))) -+ { -+ free_and_out: -+ free (elf); -+ __libelf_seterrno (ELF_E_INVALID_FILE); -+ return NULL; -+ } - elf->state.elf32.shdr - = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff); - -@@ -389,6 +410,11 @@ file_read_elf (int fildes, void *map_add - { - /* We can use the mmapped memory. */ - elf->state.elf64.ehdr = ehdr; -+ -+ if (unlikely (ehdr->e_shoff >= maxsize) -+ || unlikely (ehdr->e_shoff -+ + scncnt * sizeof (Elf32_Shdr) > maxsize)) -+ goto free_and_out; - elf->state.elf64.shdr - = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff); - ---- elfutils/libelf/elf_getars |
