diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2017-08-16 04:31:18 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-17 14:04:16 +0100 |
| commit | 4ca17f9275c81f27498b7ac07d9fe7e8193fdd71 (patch) | |
| tree | 714373df0c4b6c3f6e195cf36d0f61611786118f | |
| parent | 77878d2e6e8f36afa9a0fde8a6f0f955c84a5e5c (diff) | |
| download | openembedded-core-4ca17f9275c81f27498b7ac07d9fe7e8193fdd71.tar.gz openembedded-core-4ca17f9275c81f27498b7ac07d9fe7e8193fdd71.tar.bz2 openembedded-core-4ca17f9275c81f27498b7ac07d9fe7e8193fdd71.zip | |
elfutils: 0.168 -> 0.170
The 0.170 Fixed CVE issues
- CVE-2017-7608
- CVE-2017-7612
- CVE-2017-7611
- CVE-2017-7610
- CVE-2016-10255
- CVE-2017-7613
- CVE-2017-7609
- CVE-2016-10254
- CVE-2017-7607
Rebase patches to 0.170
- dso-link-change.patch -> 0001
- Fix_elf_cvt_gunhash.patch -> 0002
- fixheadercheck.patch -> 0003
- 0001-remove-the-unneed-checking.patch -> 0004
- 0001-fix-a-stack-usage-warning.patch -> 0005
- aarch64_uio.patch -> 0006
- shadow.patch -> 0007
- 0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch -> 0008
- debian/mips_backend.diff -> debian/mips_backend.patch
Drop obsolete patches
- 0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
Upstream fixed it
https://sourceware.org/git/?p=elfutils.git;a=commit;h=7114c513fbebcca8b76796b7f64b57447ba383e1
- Fix_one_GCC7_warning.patch
It is a backported patch
https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95
- Drop debian patches, they modify test case.
debian/testsuite-ignore-elflint.diff
debian/kfreebsd_path.patch
debian/hurd_path.patch
debian/ignore_strmerge.diff
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
25 files changed, 335 insertions, 405 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch deleted file mode 100644 index 3754c1c361..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Fri, 10 Apr 2015 00:29:18 +0200 -Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false - positive - -Upstream-Status: Pending -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> ---- - libelf/elf_getarsym.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c -index d0bb28a..08954d2 100644 ---- a/libelf/elf_getarsym.c -+++ b/libelf/elf_getarsym.c -@@ -165,8 +165,13 @@ elf_getarsym (elf, ptr) - int w = index64_p ? 8 : 4; - - /* We have an archive. The first word in there is the number of -- entries in the table. */ -- uint64_t n; -+ entries in the table. -+ Set to SIZE_MAX just to silence -Werror=maybe-uninitialized -+ elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function -+ The read_number_entries function doesn't initialize n only when returning -+ -1 which in turn ensures to jump over usage of this uninitialized variable. -+ */ -+ uint64_t n = SIZE_MAX; - size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); - if (read_number_entries (&n, elf, &off, index64_p) < 0) - { --- -2.3.5 - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch deleted file mode 100644 index d88f4ebd0c..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/Fix_one_GCC7_warning.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 Mon Sep 17 00:00:00 2001 -From: Mark Wielaard <mark@klomp.org> -Date: Sun, 12 Feb 2017 21:51:34 +0100 -Subject: [PATCH] libasm: Fix one GCC7 -Wformat-truncation=2 warning. - -Make sure that if we have really lots of labels the tempsym doesn't get -truncated because it is too small to hold the whole name. - -This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed -out by enabling this warning because there are currently some issues -with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 - -Signed-off-by: Mark Wielaard <mark@klomp.org> - -Upstream-Status: Backport (https://sourceware.org/git/?p=elfutils.git;a=commit;h=93c51144c3f664d4e9709da75a1d0fa00ea0fe95) -Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> - ---- - libasm/ChangeLog | 6 +++++- - libasm/asm_newsym.c | 6 ++++-- - 2 files changed, 9 insertions(+), 3 deletions(-) - -Index: elfutils-0.168/libasm/asm_newsym.c -=================================================================== ---- elfutils-0.168.orig/libasm/asm_newsym.c -+++ elfutils-0.168/libasm/asm_newsym.c -@@ -1,5 +1,5 @@ - /* Define new symbol for current position in given section. -- Copyright (C) 2002, 2005, 2016 Red Hat, Inc. -+ Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper <drepper@redhat.com>, 2002. - -@@ -44,7 +44,9 @@ AsmSym_t * - asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, - int type, int binding) - { --#define TEMPSYMLEN 10 -+/* We don't really expect labels with many digits, but in theory it could -+ be 10 digits (plus ".L" and a zero terminator). */ -+#define TEMPSYMLEN 13 - char tempsym[TEMPSYMLEN]; - AsmSym_t *result; - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch deleted file mode 100644 index a4d568b084..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hurd_path.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Index: elfutils-0.165/tests/run-native-test.sh -=================================================================== ---- elfutils-0.165.orig/tests/run-native-test.sh -+++ elfutils-0.165/tests/run-native-test.sh -@@ -83,6 +83,9 @@ native_test() - # "cannot attach to process: Function not implemented". - [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 - -+# hurd's /proc/$PID/maps does not give paths yet. -+[ "$(uname)" = "GNU" ] && exit 77 -+ - native_test ${abs_builddir}/allregs - native_test ${abs_builddir}/funcretval - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff deleted file mode 100644 index 3570deca9e..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/ignore_strmerge.diff +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- elfutils-0.165.orig/tests/run-strip-strmerge.sh -+++ elfutils-0.165/tests/run-strip-strmerge.sh -@@ -30,7 +30,7 @@ remerged=remerged.elf - tempfiles $merged $stripped $debugfile $remerged - - echo elflint $input --testrun ${abs_top_builddir}/src/elflint --gnu $input -+testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input - echo elfstrmerge - testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input - echo elflint $merged diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch deleted file mode 100644 index 49085d1c86..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/kfreebsd_path.patch +++ /dev/null @@ -1,20 +0,0 @@ -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Index: b/tests/run-native-test.sh -=================================================================== ---- a/tests/run-native-test.sh -+++ b/tests/run-native-test.sh -@@ -77,6 +77,12 @@ native_test() - test $native -eq 0 || testrun "$@" -p $native > /dev/null - } - -+# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does -+# not give absolute paths due to sbuild's bind mounts (bug #570805) -+# therefore the next two test programs are expected to fail with -+# "cannot attach to process: Function not implemented". -+[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 -+ - native_test ${abs_builddir}/allregs - native_test ${abs_builddir}/funcretval - diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff deleted file mode 100644 index 3df35768b7..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/testsuite-ignore-elflint.diff +++ /dev/null @@ -1,42 +0,0 @@ -On many architectures this test fails because binaries/libs produced by -binutils don't pass elflint. However elfutils shouldn't FTBFS because of this. - -So we run the tests on all archs to see what breaks, but if it breaks we ignore -the result (exitcode 77 means: this test was skipped). - -Upstream-Status: Backport [from debian] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Index: b/tests/run-elflint-self.sh -=================================================================== ---- a/tests/run-elflint-self.sh -+++ b/tests/run-elflint-self.sh -@@ -18,4 +18,4 @@ - - . $srcdir/test-subr.sh - --testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld -+testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld -Index: b/tests/test-subr.sh -=================================================================== ---- a/tests/test-subr.sh -+++ b/tests/test-subr.sh -@@ -152,3 +152,18 @@ testrun_on_self_quiet() - # Only exit if something failed - if test $exit_status != 0; then exit $exit_status; fi - } -+ -+# Same as testrun_on_self(), but skip on failure. -+testrun_on_self_skip() -+{ -+ exit_status=0 -+ -+ for file in $self_test_files; do -+ testrun $* $file \ -+ || { echo "*** failure in $* $file"; exit_status=77; } -+ done -+ -+ # Only exit if something failed -+ if test $exit_status != 0; then exit $exit_status; fi -+} -+ diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch b/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch deleted file mode 100644 index d31961f94f..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/shadow.patch +++ /dev/null @@ -1,23 +0,0 @@ -Fix control path where we have str as uninitialized string - -| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm': -| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized] -| memcpy (buf + bufcnt, _str, _len); \ -| ^ -| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here -| const char *str; - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Pending -Index: elfutils-0.164/libcpu/i386_disasm.c -=================================================================== ---- elfutils-0.164.orig/libcpu/i386_disasm.c -+++ elfutils-0.164/libcpu/i386_disasm.c -@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con - } - - default: -+ str = ""; - assert (! "INVALID not handled"); - } - } diff --git a/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch b/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch deleted file mode 100644 index d0cd3ed6f9..0000000000 --- a/meta/recipes-devtools/elfutils/elfutils/dso-link-change.patch +++ /dev/null @@ -1,32 +0,0 @@ -Upstream-Status: Pending - -# This patch makes the link to the dependencies of libdw explicit, as recent -# ld no longer implicitly links them. See -# http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html as -# a similar example of the error message you can encounter without this patch, -# and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and -# https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for more -# details. - ---- elfutils-0.148.orig/src/Makefile.am -+++ elfutils-0.148/src/Makefile.am -@@ -86,7 +86,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l - libelf = ../libelf/libelf.a - else - libasm = ../libasm/libasm.so --libdw = ../libdw/libdw.so -+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl - libelf = ../libelf/libelf.so - endif - libebl = ../libebl/libebl.a ---- elfutils-0.148.orig/tests/Makefile.am -+++ elfutils-0.148/tests/Makefile.am -@@ -172,7 +172,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l - libelf = ../libelf/libelf.a - libasm = ../libasm/libasm.a - else --libdw = ../libdw/libdw.so -+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl - libelf = ../libelf/libelf.so - libasm = ../libasm/libasm.so - endif diff --git a/meta/recipes-devtools/elfutils/elfutils_0.168.bb b/meta/recipes-devtools/elfutils/elfutils_0.170.bb index 0717616ec0..8a339e48c9 100644 --- a/meta/recipes-devtools/elfutils/elfutils_0.168.bb +++ b/meta/recipes-devtools/elfutils/elfutils_0.170.bb @@ -6,39 +6,33 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "libtool bzip2 zlib virtual/libintl" DEPENDS_append_libc-musl = " argp-standalone fts " SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2" -SRC_URI[md5sum] = "52adfa40758d0d39e5d5c57689bf38d6" -SRC_URI[sha256sum] = "b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276" +SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5" +SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066" SRC_URI += "\ - file://dso-link-change.patch \ - file://Fix_elf_cvt_gunhash.patch \ - file://fixheadercheck.patch \ - file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \ - file://0001-remove-the-unneed-checking.patch \ - file://0001-fix-a-stack-usage-warning.patch \ - file://aarch64_uio.patch \ - file://Fix_one_GCC7_warning.patch \ - file://shadow.patch \ + file://0001-dso-link-change.patch \ + file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ + file://0003-fixheadercheck.patch \ + file://0004-Disable-the-test-to-convert-euc-jp.patch \ + file://0005-fix-a-stack-usage-warning.patch \ + file://0006-Fix-build-on-aarch64-musl.patch \ + file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ " +SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch" -# pick the patch from debian +# Pick patches from debian # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz SRC_URI += "\ file://debian/hppa_backend.diff \ file://debian/arm_backend.diff \ - file://debian/mips_backend.diff \ - file://debian/testsuite-ignore-elflint.diff \ + file://debian/mips_backend.patch \ file://debian/mips_readelf_w.patch \ - file://debian/kfreebsd_path.patch \ file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ - file://debian/hurd_path.patch \ - file://debian/ignore_strmerge.diff \ " # Fix the patches from Debian with GCC7 -SRC_URI += "file://fallthrough.patch" -SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch " +SRC_URI += "file://debian/fallthrough.patch" # The buildsystem wants to generate 2 .h files from source using a binary it just built, # which can not pass the cross compiling, so let's work around it by adding 2 .h files diff --git a/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch new file mode 100644 index 0000000000..28c57f236c --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch @@ -0,0 +1,52 @@ +From 0a69a26c9f7487daca900db87cd1195857a4603f Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:10:57 +0800 +Subject: [PATCH 1/7] dso link change + +Upstream-Status: Pending + +This patch makes the link to the dependencies of libdw explicit, as +recent ld no longer implicitly links them. See +http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html +as a similar example of the error message you can encounter without this +patch, and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and +https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for +more details. + +Rebase to 0.170 + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + src/Makefile.am | 2 +- + tests/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 2b1c0dc..9305b84 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -44,7 +44,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.a -lz + else + libasm = ../libasm/libasm.so +-libdw = ../libdw/libdw.so ++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + endif + libebl = ../libebl/libebl.a +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 3735084..528615d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -400,7 +400,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.a -lz + libasm = ../libasm/libasm.a + else +-libdw = ../libdw/libdw.so ++libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl + libelf = ../libelf/libelf.so + libasm = ../libasm/libasm.so + endif +-- +1.8.3.1 + diff --git a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch index f861e8990e..2f718eb827 100644 --- a/meta/recipes-devtools/elfutils/elfutils/Fix_elf_cvt_gunhash.patch +++ b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch @@ -1,4 +1,7 @@ -Fix elf_cvt_gunhash if dest and src are same. +From e98670f7c7b4c73fb65534949716fd8d043960d5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:13:59 +0800 +Subject: [PATCH 2/7] Fix elf_cvt_gunhash if dest and src are same. Upstream-Status: Pending @@ -6,6 +9,13 @@ The 'dest' and 'src' can be same, we need to save the value of src32[2] before swaping it. Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com> + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + libelf/gnuhash_xlate.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h index 6faf113..04d9ca1 100644 --- a/libelf/gnuhash_xlate.h @@ -27,3 +37,6 @@ index 6faf113..04d9ca1 100644 /* Now the 64 bit words. */ Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4]; +-- +1.8.3.1 + diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch index 5de3b24c85..7c49fced10 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/fixheadercheck.patch +++ b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch @@ -1,13 +1,27 @@ -For some binaries we can get a invalid section alignment, for example if -sh_align = 1 and sh_addralign is 0. In the case of a zero size section like -".note.GNU-stack", this is irrelavent as far as I can tell and we shouldn't +From 565d5935abf5b58773f9c8385c00189221980d98 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:17:20 +0800 +Subject: [PATCH 3/7] fixheadercheck + +For some binaries we can get a invalid section alignment, for example if +sh_align = 1 and sh_addralign is 0. In the case of a zero size section +like +".note.GNU-stack", this is irrelavent as far as I can tell and we +shouldn't error in this case. RP 2014/6/11 Upstream-Status: Pending +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + libelf/elf32_updatenull.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c +index d83c0b3..a51bf70 100644 --- a/libelf/elf32_updatenull.c +++ b/libelf/elf32_updatenull.c @@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) @@ -21,3 +35,6 @@ diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c { __libelf_seterrno (ELF_E_INVALID_ALIGN); return -1; +-- +1.8.3.1 + diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch b/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch index 5be92d705a..d893ad68f6 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-remove-the-unneed-checking.patch +++ b/meta/recipes-devtools/elfutils/files/0004-Disable-the-test-to-convert-euc-jp.patch @@ -1,4 +1,7 @@ -Disable the test to convert euc-jp +From bb7ed11950101798aae82f7fda8b3dcb05f755c5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:24:06 +0800 +Subject: [PATCH 4/7] Disable the test to convert euc-jp Remove the test "Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided" @@ -9,6 +12,9 @@ iconv support and will cause guild-native building fail. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Roy Li <rongqing.li@windriver.com> + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- m4/iconv.m4 | 2 ++ 1 file changed, 2 insertions(+) @@ -34,5 +40,5 @@ index a503646..299f1eb 100644 }]])], [am_cv_func_iconv_works=yes], -- -2.0.1 +1.8.3.1 diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch index 6923bf7053..22a01cfa71 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-fix-a-stack-usage-warning.patch +++ b/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch @@ -1,17 +1,24 @@ -[PATCH] fix a stack-usage warning +From dd6dbf6af396519380f48c0ef1ce6cf4dd77f6d7 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:25:16 +0800 +Subject: [PATCH 5/7] fix a stack-usage warning Upstream-Status: Pending -not use a variable to as a array size, otherwise the warning to error that +not use a variable to as a array size, otherwise the warning to error +that stack usage might be unbounded [-Werror=stack-usage=] will happen Signed-off-by: Roy Li <rongqing.li@windriver.com> + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- backends/ppc_initreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c -index 64f5379..52dde3e 100644 +index 69d623b..de41dec 100644 --- a/backends/ppc_initreg.c +++ b/backends/ppc_initreg.c @@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), @@ -24,5 +31,5 @@ index 64f5379..52dde3e 100644 dwarf_regs[gpr] = user_regs.r.gpr[gpr]; if (! setfunc (0, gprs, dwarf_regs, arg)) -- -1.9.1 +1.8.3.1 diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch b/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch index 38dc57befc..5f29a03759 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/aarch64_uio.patch +++ b/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch @@ -1,4 +1,7 @@ -Fix build on aarch64/musl +From e57ad47fc8549353ca80c23b9b4f38f31fde13e5 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:27:30 +0800 +Subject: [PATCH 6/7] Fix build on aarch64/musl Errors @@ -10,20 +13,28 @@ error: redefinition ^ Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> -Index: elfutils-0.163/backends/aarch64_initreg.c -=================================================================== ---- elfutils-0.163.orig/backends/aarch64_initreg.c -+++ elfutils-0.163/backends/aarch64_initreg.c + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + backends/aarch64_initreg.c | 4 ++-- + backends/arm_initreg.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c +index daf6f37..6445276 100644 +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c @@ -33,7 +33,7 @@ #include "system.h" #include <assert.h> - #ifdef __aarch64__ + #if defined(__aarch64__) && defined(__linux__) -# include <linux/uio.h> +# include <sys/uio.h> # include <sys/user.h> # include <sys/ptrace.h> /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ -@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t +@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), Dwarf_Word dwarf_fregs[32]; for (int r = 0; r < 32; r++) @@ -32,11 +43,11 @@ Index: elfutils-0.163/backends/aarch64_initreg.c if (! setfunc (64, 32, dwarf_fregs, arg)) return false; -Index: elfutils-0.163/backends/arm_initreg.c -=================================================================== ---- elfutils-0.163.orig/backends/arm_initreg.c -+++ elfutils-0.163/backends/arm_initreg.c -@@ -37,7 +37,7 @@ +diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c +index efcabaf..062bb9e 100644 +--- a/backends/arm_initreg.c ++++ b/backends/arm_initreg.c +@@ -38,7 +38,7 @@ #endif #ifdef __aarch64__ @@ -45,3 +56,6 @@ Index: elfutils-0.163/backends/arm_initreg.c # include <sys/user.h> # include <sys/ptrace.h> /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ +-- +1.8.3.1 + diff --git a/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch b/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch new file mode 100644 index 0000000000..224770478d --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch @@ -0,0 +1,45 @@ +From 1e91c1d4e37c05cf95058b4b3c3f352d72886f58 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:31:38 +0800 +Subject: [PATCH 7/7] Fix control path where we have str as uninitialized + string + +| +/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: +In function 'i386_disasm': +| +/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: +error: 'str' may be used uninitialized in this function +[-Werror=maybe-uninitialized] +| memcpy (buf + bufcnt, _str, _len); \ +| ^ +| +/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: +note: 'str' was declared here +| const char *str; + +Signed-off-by: Khe |
