diff options
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 @@ | |||
| 1 | From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Fri, 10 Apr 2015 00:29:18 +0200 | ||
| 4 | Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false | ||
| 5 | positive | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 9 | --- | ||
| 10 | libelf/elf_getarsym.c | 9 +++++++-- | ||
| 11 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c | ||
| 14 | index d0bb28a..08954d2 100644 | ||
| 15 | --- a/libelf/elf_getarsym.c | ||
| 16 | +++ b/libelf/elf_getarsym.c | ||
| 17 | @@ -165,8 +165,13 @@ elf_getarsym (elf, ptr) | ||
| 18 | int w = index64_p ? 8 : 4; | ||
| 19 | |||
| 20 | /* We have an archive. The first word in there is the number of | ||
| 21 | - entries in the table. */ | ||
| 22 | - uint64_t n; | ||
| 23 | + entries in the table. | ||
| 24 | + Set to SIZE_MAX just to silence -Werror=maybe-uninitialized | ||
| 25 | + elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function | ||
| 26 | + The read_number_entries function doesn't initialize n only when returning | ||
| 27 | + -1 which in turn ensures to jump over usage of this uninitialized variable. | ||
| 28 | + */ | ||
| 29 | + uint64_t n = SIZE_MAX; | ||
| 30 | size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); | ||
| 31 | if (read_number_entries (&n, elf, &off, index64_p) < 0) | ||
| 32 | { | ||
| 33 | -- | ||
| 34 | 2.3.5 | ||
| 35 | |||
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 @@ | |||
| 1 | From 93c51144c3f664d4e9709da75a1d0fa00ea0fe95 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] 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 | --- | ||
| 19 | libasm/ChangeLog | 6 +++++- | ||
| 20 | libasm/asm_newsym.c | 6 ++++-- | ||
| 21 | 2 files changed, 9 insertions(+), 3 deletions(-) | ||
| 22 | |||
| 23 | Index: elfutils-0.168/libasm/asm_newsym.c | ||
| 24 | =================================================================== | ||
| 25 | --- elfutils-0.168.orig/libasm/asm_newsym.c | ||
| 26 | +++ elfutils-0.168/libasm/asm_newsym.c | ||
| 27 | @@ -1,5 +1,5 @@ | ||
| 28 | /* Define new symbol for current position in given section. | ||
| 29 | - Copyright (C) 2002, 2005, 2016 Red Hat, Inc. | ||
| 30 | + Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc. | ||
| 31 | This file is part of elfutils. | ||
| 32 | Written by Ulrich Drepper <drepper@redhat.com>, 2002. | ||
| 33 | |||
| 34 | @@ -44,7 +44,9 @@ AsmSym_t * | ||
| 35 | asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, | ||
| 36 | int type, int binding) | ||
| 37 | { | ||
| 38 | -#define TEMPSYMLEN 10 | ||
| 39 | +/* We don't really expect labels with many digits, but in theory it could | ||
| 40 | + be 10 digits (plus ".L" and a zero terminator). */ | ||
| 41 | +#define TEMPSYMLEN 13 | ||
| 42 | char tempsym[TEMPSYMLEN]; | ||
| 43 | AsmSym_t *result; | ||
| 44 | |||
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 @@ | |||
| 1 | Upstream-Status: Backport [from debian] | ||
| 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | |||
| 4 | Index: elfutils-0.165/tests/run-native-test.sh | ||
| 5 | =================================================================== | ||
| 6 | --- elfutils-0.165.orig/tests/run-native-test.sh | ||
| 7 | +++ elfutils-0.165/tests/run-native-test.sh | ||
| 8 | @@ -83,6 +83,9 @@ native_test() | ||
| 9 | # "cannot attach to process: Function not implemented". | ||
| 10 | [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 | ||
| 11 | |||
| 12 | +# hurd's /proc/$PID/maps does not give paths yet. | ||
| 13 | +[ "$(uname)" = "GNU" ] && exit 77 | ||
| 14 | + | ||
| 15 | native_test ${abs_builddir}/allregs | ||
| 16 | native_test ${abs_builddir}/funcretval | ||
| 17 | |||
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 @@ | |||
| 1 | Upstream-Status: Backport [from debian] | ||
| 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | |||
| 4 | --- elfutils-0.165.orig/tests/run-strip-strmerge.sh | ||
| 5 | +++ elfutils-0.165/tests/run-strip-strmerge.sh | ||
| 6 | @@ -30,7 +30,7 @@ remerged=remerged.elf | ||
| 7 | tempfiles $merged $stripped $debugfile $remerged | ||
| 8 | |||
| 9 | echo elflint $input | ||
| 10 | -testrun ${abs_top_builddir}/src/elflint --gnu $input | ||
| 11 | +testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input | ||
| 12 | echo elfstrmerge | ||
| 13 | testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input | ||
| 14 | 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 @@ | |||
| 1 | Upstream-Status: Backport [from debian] | ||
| 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | |||
| 4 | Index: b/tests/run-native-test.sh | ||
| 5 | =================================================================== | ||
| 6 | --- a/tests/run-native-test.sh | ||
| 7 | +++ b/tests/run-native-test.sh | ||
| 8 | @@ -77,6 +77,12 @@ native_test() | ||
| 9 | test $native -eq 0 || testrun "$@" -p $native > /dev/null | ||
| 10 | } | ||
| 11 | |||
| 12 | +# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does | ||
| 13 | +# not give absolute paths due to sbuild's bind mounts (bug #570805) | ||
| 14 | +# therefore the next two test programs are expected to fail with | ||
| 15 | +# "cannot attach to process: Function not implemented". | ||
| 16 | +[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 | ||
| 17 | + | ||
| 18 | native_test ${abs_builddir}/allregs | ||
| 19 | native_test ${abs_builddir}/funcretval | ||
| 20 | |||
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 @@ | |||
| 1 | On many architectures this test fails because binaries/libs produced by | ||
| 2 | binutils don't pass elflint. However elfutils shouldn't FTBFS because of this. | ||
| 3 | |||
| 4 | So we run the tests on all archs to see what breaks, but if it breaks we ignore | ||
| 5 | the result (exitcode 77 means: this test was skipped). | ||
| 6 | |||
| 7 | Upstream-Status: Backport [from debian] | ||
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 9 | |||
| 10 | Index: b/tests/run-elflint-self.sh | ||
| 11 | =================================================================== | ||
| 12 | --- a/tests/run-elflint-self.sh | ||
| 13 | +++ b/tests/run-elflint-self.sh | ||
| 14 | @@ -18,4 +18,4 @@ | ||
| 15 | |||
| 16 | . $srcdir/test-subr.sh | ||
| 17 | |||
| 18 | -testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld | ||
| 19 | +testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld | ||
| 20 | Index: b/tests/test-subr.sh | ||
| 21 | =================================================================== | ||
| 22 | --- a/tests/test-subr.sh | ||
| 23 | +++ b/tests/test-subr.sh | ||
| 24 | @@ -152,3 +152,18 @@ testrun_on_self_quiet() | ||
| 25 | # Only exit if something failed | ||
| 26 | if test $exit_status != 0; then exit $exit_status; fi | ||
| 27 | } | ||
| 28 | + | ||
| 29 | +# Same as testrun_on_self(), but skip on failure. | ||
| 30 | +testrun_on_self_skip() | ||
| 31 | +{ | ||
| 32 | + exit_status=0 | ||
| 33 | + | ||
| 34 | + for file in $self_test_files; do | ||
| 35 | + testrun $* $file \ | ||
| 36 | + || { echo "*** failure in $* $file"; exit_status=77; } | ||
| 37 | + done | ||
| 38 | + | ||
| 39 | + # Only exit if something failed | ||
| 40 | + if test $exit_status != 0; then exit $exit_status; fi | ||
| 41 | +} | ||
| 42 | + | ||
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 @@ | |||
| 1 | Fix control path where we have str as uninitialized string | ||
| 2 | |||
| 3 | | /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': | ||
| 4 | | /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] | ||
| 5 | | memcpy (buf + bufcnt, _str, _len); \ | ||
| 6 | | ^ | ||
| 7 | | /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 | ||
| 8 | | const char *str; | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | Upstream-Status: Pending | ||
| 12 | Index: elfutils-0.164/libcpu/i386_disasm.c | ||
| 13 | =================================================================== | ||
| 14 | --- elfutils-0.164.orig/libcpu/i386_disasm.c | ||
| 15 | +++ elfutils-0.164/libcpu/i386_disasm.c | ||
| 16 | @@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con | ||
| 17 | } | ||
| 18 | |||
| 19 | default: | ||
| 20 | + str = ""; | ||
| 21 | assert (! "INVALID not handled"); | ||
| 22 | } | ||
| 23 | } | ||
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 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | # This patch makes the link to the dependencies of libdw explicit, as recent | ||
| 4 | # ld no longer implicitly links them. See | ||
| 5 | # http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html as | ||
| 6 | # a similar example of the error message you can encounter without this patch, | ||
| 7 | # and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and | ||
| 8 | # https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for more | ||
| 9 | # details. | ||
| 10 | |||
| 11 | --- elfutils-0.148.orig/src/Makefile.am | ||
| 12 | +++ elfutils-0.148/src/Makefile.am | ||
| 13 | @@ -86,7 +86,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l | ||
| 14 | libelf = ../libelf/libelf.a | ||
| 15 | else | ||
| 16 | libasm = ../libasm/libasm.so | ||
| 17 | -libdw = ../libdw/libdw.so | ||
| 18 | +libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl | ||
| 19 | libelf = ../libelf/libelf.so | ||
| 20 | endif | ||
| 21 | libebl = ../libebl/libebl.a | ||
| 22 | --- elfutils-0.148.orig/tests/Makefile.am | ||
| 23 | +++ elfutils-0.148/tests/Makefile.am | ||
| 24 | @@ -172,7 +172,7 @@ libdw = ../libdw/libdw.a $(zip_LIBS) $(l | ||
| 25 | libelf = ../libelf/libelf.a | ||
| 26 | libasm = ../libasm/libasm.a | ||
| 27 | else | ||
| 28 | -libdw = ../libdw/libdw.so | ||
| 29 | +libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl | ||
| 30 | libelf = ../libelf/libelf.so | ||
| 31 | libasm = ../libasm/libasm.so | ||
| 32 | 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" | |||
| 6 | DEPENDS = "libtool bzip2 zlib virtual/libintl" | 6 | DEPENDS = "libtool bzip2 zlib virtual/libintl" |
| 7 | DEPENDS_append_libc-musl = " argp-standalone fts " | 7 | DEPENDS_append_libc-musl = " argp-standalone fts " |
| 8 | SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2" | 8 | SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2" |
| 9 | SRC_URI[md5sum] = "52adfa40758d0d39e5d5c57689bf38d6" | 9 | SRC_URI[md5sum] = "03599aee98c9b726c7a732a2dd0245d5" |
| 10 | SRC_URI[sha256sum] = "b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276" | 10 | SRC_URI[sha256sum] = "1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066" |
| 11 | 11 | ||
| 12 | SRC_URI += "\ | 12 | SRC_URI += "\ |
| 13 | file://dso-link-change.patch \ | 13 | file://0001-dso-link-change.patch \ |
| 14 | file://Fix_elf_cvt_gunhash.patch \ | 14 | file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ |
| 15 | file://fixheadercheck.patch \ | 15 | file://0003-fixheadercheck.patch \ |
| 16 | file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \ | 16 | file://0004-Disable-the-test-to-convert-euc-jp.patch \ |
| 17 | file://0001-remove-the-unneed-checking.patch \ | 17 | file://0005-fix-a-stack-usage-warning.patch \ |
| 18 | file://0001-fix-a-stack-usage-warning.patch \ | 18 | file://0006-Fix-build-on-aarch64-musl.patch \ |
| 19 | file://aarch64_uio.patch \ | 19 | file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ |
| 20 | file://Fix_one_GCC7_warning.patch \ | ||
| 21 | file://shadow.patch \ | ||
| 22 | " | 20 | " |
| 21 | SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch" | ||
| 23 | 22 | ||
| 24 | # pick the patch from debian | 23 | # Pick patches from debian |
| 25 | # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz | 24 | # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.168-0.2.debian.tar.xz |
| 26 | SRC_URI += "\ | 25 | SRC_URI += "\ |
| 27 | file://debian/hppa_backend.diff \ | 26 | file://debian/hppa_backend.diff \ |
| 28 | file://debian/arm_backend.diff \ | 27 | file://debian/arm_backend.diff \ |
| 29 | file://debian/mips_backend.diff \ | 28 | file://debian/mips_backend.patch \ |
| 30 | file://debian/testsuite-ignore-elflint.diff \ | ||
| 31 | file://debian/mips_readelf_w.patch \ | 29 | file://debian/mips_readelf_w.patch \ |
| 32 | file://debian/kfreebsd_path.patch \ | ||
| 33 | file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ | 30 | file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ |
| 34 | file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ | 31 | file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ |
| 35 | file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ | 32 | file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ |
| 36 | file://debian/hurd_path.patch \ | ||
| 37 | file://debian/ignore_strmerge.diff \ | ||
| 38 | " | 33 | " |
| 39 | # Fix the patches from Debian with GCC7 | 34 | # Fix the patches from Debian with GCC7 |
| 40 | SRC_URI += "file://fallthrough.patch" | 35 | SRC_URI += "file://debian/fallthrough.patch" |
| 41 | SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch " | ||
| 42 | 36 | ||
| 43 | # The buildsystem wants to generate 2 .h files from source using a binary it just built, | 37 | # The buildsystem wants to generate 2 .h files from source using a binary it just built, |
| 44 | # which can not pass the cross compiling, so let's work around it by adding 2 .h files | 38 | # 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 @@ | |||
| 1 | From 0a69a26c9f7487daca900db87cd1195857a4603f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Tue, 15 Aug 2017 17:10:57 +0800 | ||
| 4 | Subject: [PATCH 1/7] dso link change | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | This patch makes the link to the dependencies of libdw explicit, as | ||
| 9 | recent ld no longer implicitly links them. See | ||
| 10 | http://lists.fedoraproject.org/pipermail/devel/2010-March/133601.html | ||
| 11 | as a similar example of the error message you can encounter without this | ||
| 12 | patch, and https://fedoraproject.org/wiki/UnderstandingDSOLinkChange and | ||
| 13 | https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking for | ||
| 14 | more details. | ||
| 15 | |||
| 16 | Rebase to 0.170 | ||
| 17 | |||
| 18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 19 | --- | ||
| 20 | src/Makefile.am | 2 +- | ||
| 21 | tests/Makefile.am | 2 +- | ||
| 22 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
| 25 | index 2b1c0dc..9305b84 100644 | ||
| 26 | --- a/src/Makefile.am | ||
| 27 | +++ b/src/Makefile.am | ||
| 28 | @@ -44,7 +44,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl | ||
| 29 | libelf = ../libelf/libelf.a -lz | ||
| 30 | else | ||
| 31 | libasm = ../libasm/libasm.so | ||
| 32 | -libdw = ../libdw/libdw.so | ||
| 33 | +libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl | ||
| 34 | libelf = ../libelf/libelf.so | ||
| 35 | endif | ||
| 36 | libebl = ../libebl/libebl.a | ||
| 37 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
| 38 | index 3735084..528615d 100644 | ||
| 39 | --- a/tests/Makefile.am | ||
| 40 | +++ b/tests/Makefile.am | ||
| 41 | @@ -400,7 +400,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl | ||
| 42 | libelf = ../libelf/libelf.a -lz | ||
| 43 | libasm = ../libasm/libasm.a | ||
| 44 | else | ||
| 45 | -libdw = ../libdw/libdw.so | ||
| 46 | +libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl | ||
| 47 | libelf = ../libelf/libelf.so | ||
| 48 | libasm = ../libasm/libasm.so | ||
| 49 | endif | ||
| 50 | -- | ||
| 51 | 1.8.3.1 | ||
| 52 | |||
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 @@ | |||
| 1 | Fix elf_cvt_gunhash if dest and src are same. | 1 | From e98670f7c7b4c73fb65534949716fd8d043960d5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Tue, 15 Aug 2017 17:13:59 +0800 | ||
| 4 | Subject: [PATCH 2/7] Fix elf_cvt_gunhash if dest and src are same. | ||
| 2 | 5 | ||
| 3 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
| 4 | 7 | ||
| @@ -6,6 +9,13 @@ The 'dest' and 'src' can be same, we need to save the value of src32[2] | |||
| 6 | before swaping it. | 9 | before swaping it. |
| 7 | 10 | ||
| 8 | Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com> | 11 | Signed-off-by: Baoshan Pang <BaoShan.Pang@windriver.com> |
| 12 | |||
| 13 | Rebase to 0.170 | ||
| 14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 15 | --- | ||
| 16 | libelf/gnuhash_xlate.h | 3 ++- | ||
| 17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 9 | diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h | 19 | diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h |
| 10 | index 6faf113..04d9ca1 100644 | 20 | index 6faf113..04d9ca1 100644 |
| 11 | --- a/libelf/gnuhash_xlate.h | 21 | --- a/libelf/gnuhash_xlate.h |
| @@ -27,3 +37,6 @@ index 6faf113..04d9ca1 100644 | |||
| 27 | 37 | ||
| 28 | /* Now the 64 bit words. */ | 38 | /* Now the 64 bit words. */ |
| 29 | Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4]; | 39 | Elf64_Xword *dest64 = (Elf64_Xword *) &dest32[4]; |
| 40 | -- | ||
| 41 | 1.8.3.1 | ||
| 42 | |||
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 @@ | |||
| 1 | For some binaries we can get a invalid section alignment, for example if | 1 | From 565d5935abf5b58773f9c8385c00189221980d98 Mon Sep 17 00:00:00 2001 |
| 2 | sh_align = 1 and sh_addralign is 0. In the case of a zero size section like | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | ".note.GNU-stack", this is irrelavent as far as I can tell and we shouldn't | 3 | Date: Tue, 15 Aug 2017 17:17:20 +0800 |
| 4 | Subject: [PATCH 3/7] fixheadercheck | ||
| 5 | |||
| 6 | For some binaries we can get a invalid section alignment, for example if | ||
| 7 | sh_align = 1 and sh_addralign is 0. In the case of a zero size section | ||
| 8 | like | ||
| 9 | ".note.GNU-stack", this is irrelavent as far as I can tell and we | ||
| 10 | shouldn't | ||
| 4 | error in this case. | 11 | error in this case. |
| 5 | 12 | ||
| 6 | RP 2014/6/11 | 13 | RP 2014/6/11 |
| 7 | 14 | ||
| 8 | Upstream-Status: Pending | 15 | Upstream-Status: Pending |
| 9 | 16 | ||
| 17 | Rebase to 0.170 | ||
| 18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 19 | --- | ||
| 20 | libelf/elf32_updatenull.c | 4 ++-- | ||
| 21 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 22 | |||
| 10 | diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c | 23 | diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c |
| 24 | index d83c0b3..a51bf70 100644 | ||
| 11 | --- a/libelf/elf32_updatenull.c | 25 | --- a/libelf/elf32_updatenull.c |
| 12 | +++ b/libelf/elf32_updatenull.c | 26 | +++ b/libelf/elf32_updatenull.c |
| 13 | @@ -339,8 +339,8 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | 27 | @@ -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 | |||
| 21 | { | 35 | { |
| 22 | __libelf_seterrno (ELF_E_INVALID_ALIGN); | 36 | __libelf_seterrno (ELF_E_INVALID_ALIGN); |
| 23 | return -1; | 37 | return -1; |
| 38 | -- | ||
| 39 | 1.8.3.1 | ||
| 40 | |||
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 @@ | |||
| 1 | Disable the test to convert euc-jp | 1 | From bb7ed11950101798aae82f7fda8b3dcb05f755c5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Tue, 15 Aug 2017 17:24:06 +0800 | ||
| 4 | Subject: [PATCH 4/7] Disable the test to convert euc-jp | ||
| 2 | 5 | ||
| 3 | Remove the test "Test against HP-UX 11.11 bug: | 6 | Remove the test "Test against HP-UX 11.11 bug: |
| 4 | No converter from EUC-JP to UTF-8 is provided" | 7 | No converter from EUC-JP to UTF-8 is provided" |
| @@ -9,6 +12,9 @@ iconv support and will cause guild-native building fail. | |||
| 9 | Upstream-Status: Inappropriate [OE specific] | 12 | Upstream-Status: Inappropriate [OE specific] |
| 10 | 13 | ||
| 11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | 14 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 15 | |||
| 16 | Rebase to 0.170 | ||
| 17 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 12 | --- | 18 | --- |
| 13 | m4/iconv.m4 | 2 ++ | 19 | m4/iconv.m4 | 2 ++ |
| 14 | 1 file changed, 2 insertions(+) | 20 | 1 file changed, 2 insertions(+) |
| @@ -34,5 +40,5 @@ index a503646..299f1eb 100644 | |||
| 34 | }]])], | 40 | }]])], |
| 35 | [am_cv_func_iconv_works=yes], | 41 | [am_cv_func_iconv_works=yes], |
| 36 | -- | 42 | -- |
| 37 | 2.0.1 | 43 | 1.8.3.1 |
| 38 | 44 | ||
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 @@ | |||
| 1 | [PATCH] fix a stack-usage warning | 1 | From dd6dbf6af396519380f48c0ef1ce6cf4dd77f6d7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Tue, 15 Aug 2017 17:25:16 +0800 | ||
| 4 | Subject: [PATCH 5/7] fix a stack-usage warning | ||
| 2 | 5 | ||
| 3 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
| 4 | 7 | ||
| 5 | not use a variable to as a array size, otherwise the warning to error that | 8 | not use a variable to as a array size, otherwise the warning to error |
| 9 | that | ||
| 6 | stack usage might be unbounded [-Werror=stack-usage=] will happen | 10 | stack usage might be unbounded [-Werror=stack-usage=] will happen |
| 7 | 11 | ||
| 8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | 12 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 13 | |||
| 14 | Rebase to 0.170 | ||
| 15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 9 | --- | 16 | --- |
| 10 | backends/ppc_initreg.c | 2 +- | 17 | backends/ppc_initreg.c | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | 19 | ||
| 13 | diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c | 20 | diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c |
| 14 | index 64f5379..52dde3e 100644 | 21 | index 69d623b..de41dec 100644 |
| 15 | --- a/backends/ppc_initreg.c | 22 | --- a/backends/ppc_initreg.c |
| 16 | +++ b/backends/ppc_initreg.c | 23 | +++ b/backends/ppc_initreg.c |
| 17 | @@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), | 24 | @@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), |
| @@ -24,5 +31,5 @@ index 64f5379..52dde3e 100644 | |||
| 24 | dwarf_regs[gpr] = user_regs.r.gpr[gpr]; | 31 | dwarf_regs[gpr] = user_regs.r.gpr[gpr]; |
| 25 | if (! setfunc (0, gprs, dwarf_regs, arg)) | 32 | if (! setfunc (0, gprs, dwarf_regs, arg)) |
| 26 | -- | 33 | -- |
| 27 | 1.9.1 | 34 | 1.8.3.1 |
| 28 | 35 | ||
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 @@ | |||
| 1 | Fix build on aarch64/musl | 1 | From e57ad47fc8549353ca80c23b9b4f38f31fde13e5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Tue, 15 Aug 2017 17:27:30 +0800 | ||
| 4 | Subject: [PATCH 6/7] Fix build on aarch64/musl | ||
| 2 | 5 | ||
| 3 | Errors | 6 | Errors |
| 4 | 7 | ||
| @@ -10,20 +13,28 @@ error: redefinition | |||
| 10 | ^ | 13 | ^ |
| 11 | Upstream-Status: Pending | 14 | Upstream-Status: Pending |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 13 | Index: elfutils-0.163/backends/aarch64_initreg.c | 16 | |
| 14 | =================================================================== | 17 | Rebase to 0.170 |
| 15 | --- elfutils-0.163.orig/backends/aarch64_initreg.c | 18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 16 | +++ elfutils-0.163/backends/aarch64_initreg.c | 19 | --- |
| 20 | backends/aarch64_initreg.c | 4 ++-- | ||
| 21 | backends/arm_initreg.c | 2 +- | ||
| 22 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c | ||
| 25 | index daf6f37..6445276 100644 | ||
| 26 | --- a/backends/aarch64_initreg.c | ||
| 27 | +++ b/backends/aarch64_initreg.c | ||
| 17 | @@ -33,7 +33,7 @@ | 28 | @@ -33,7 +33,7 @@ |
| 18 | #include "system.h" | 29 | #include "system.h" |
| 19 | #include <assert.h> | 30 | #include <assert.h> |
| 20 | #ifdef __aarch64__ | 31 | #if defined(__aarch64__) && defined(__linux__) |
| 21 | -# include <linux/uio.h> | 32 | -# include <linux/uio.h> |
| 22 | +# include <sys/uio.h> | 33 | +# include <sys/uio.h> |
| 23 | # include <sys/user.h> | 34 | # include <sys/user.h> |
| 24 | # include <sys/ptrace.h> | 35 | # include <sys/ptrace.h> |
| 25 | /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ | 36 | /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ |
| 26 | @@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t | 37 | @@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), |
| 27 | 38 | ||
| 28 | Dwarf_Word dwarf_fregs[32]; | 39 | Dwarf_Word dwarf_fregs[32]; |
| 29 | for (int r = 0; r < 32; r++) | 40 | for (int r = 0; r < 32; r++) |
| @@ -32,11 +43,11 @@ Index: elfutils-0.163/backends/aarch64_initreg.c | |||
| 32 | 43 | ||
| 33 | if (! setfunc (64, 32, dwarf_fregs, arg)) | 44 | if (! setfunc (64, 32, dwarf_fregs, arg)) |
| 34 | return false; | 45 | return false; |
| 35 | Index: elfutils-0.163/backends/arm_initreg.c | 46 | diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c |
| 36 | =================================================================== | 47 | index efcabaf..062bb9e 100644 |
| 37 | --- elfutils-0.163.orig/backends/arm_initreg.c | 48 | --- a/backends/arm_initreg.c |
| 38 | +++ elfutils-0.163/backends/arm_initreg.c | 49 | +++ b/backends/arm_initreg.c |
| 39 | @@ -37,7 +37,7 @@ | 50 | @@ -38,7 +38,7 @@ |
| 40 | #endif | 51 | #endif |
| 41 | 52 | ||
| 42 | #ifdef __aarch64__ | 53 | #ifdef __aarch64__ |
| @@ -45,3 +56,6 @@ Index: elfutils-0.163/backends/arm_initreg.c | |||
| 45 | # include <sys/user.h> | 56 | # include <sys/user.h> |
| 46 | # include <sys/ptrace.h> | 57 | # include <sys/ptrace.h> |
| 47 | /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ | 58 | /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ |
| 59 | -- | ||
| 60 | 1.8.3.1 | ||
| 61 | |||
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 @@ | |||
| 1 | From 1e91c1d4e37c05cf95058b4b3c3f352d72886f58 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Tue, 15 Aug 2017 17:31:38 +0800 | ||
| 4 | Subject: [PATCH 7/7] Fix control path where we have str as uninitialized | ||
| 5 | string | ||
| 6 | |||
| 7 | | | ||
| 8 | /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: | ||
| 9 | In function 'i386_disasm': | ||
| 10 | | | ||
| 11 | /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: | ||
| 12 | error: 'str' may be used uninitialized in this function | ||
| 13 | [-Werror=maybe-uninitialized] | ||
| 14 | | memcpy (buf + bufcnt, _str, _len); \ | ||
| 15 | | ^ | ||
| 16 | | | ||
| 17 | /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: | ||
| 18 | note: 'str' was declared here | ||
| 19 | | const char *str; | ||
| 20 | |||
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 22 | Upstream-Status: Pending | ||
| 23 | |||
| 24 | Rebase to 0.170 | ||
| 25 | |||
| 26 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 27 | --- | ||
| 28 | libcpu/i386_disasm.c | 1 + | ||
| 29 | 1 file changed, 1 insertion(+) | ||
| 30 | |||
| 31 | diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c | ||
| 32 | index 831afbe..60fd6d4 100644 | ||
| 33 | --- a/libcpu/i386_disasm.c | ||
| 34 | +++ b/libcpu/i386_disasm.c | ||
| 35 | @@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)), | ||
| 36 | } | ||
| 37 | /* Fallthrough */ | ||
| 38 | default: | ||
| 39 | + str = ""; | ||
| 40 | assert (! "INVALID not handled"); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | -- | ||
| 44 | 1.8.3.1 | ||
| 45 | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch index 020ffa141b..8864d44369 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch +++ b/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch | |||
| @@ -1,18 +1,18 @@ | |||
| 1 | From 054fedda5ab9b84160d40d90cb967f2f5822b889 Mon Sep 17 00:00:00 2001 | 1 | From 010b0c57e748440eb1ceb3d977875f2488d2b4ce Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 31 Dec 2015 06:35:34 +0000 | 3 | Date: Wed, 16 Aug 2017 10:06:26 +0800 |
| 4 | Subject: [PATCH] build: Provide alternatives for glibc assumptions helps | 4 | Subject: [PATCH] build: Provide alternatives for glibc assumptions helps |
| 5 | compiling it on musl | 5 | compiling it on musl |
| 6 | 6 | ||
| 7 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | 9 | ||
| 10 | Rebase to 0.68 | 10 | Rebase to 0.170 |
| 11 | |||
| 11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 12 | --- | 13 | --- |
| 13 | Makefile.am | 2 +- | 14 | Makefile.am | 2 +- |
| 14 | lib/color.c | 3 ++- | 15 | lib/color.c | 3 ++- |
| 15 | lib/crc32_file.c | 1 + | ||
| 16 | lib/fixedsizehash.h | 1 - | 16 | lib/fixedsizehash.h | 1 - |
| 17 | lib/system.h | 10 ++++++++++ | 17 | lib/system.h | 10 ++++++++++ |
| 18 | lib/xmalloc.c | 2 +- | 18 | lib/xmalloc.c | 2 +- |
| @@ -21,13 +21,13 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
| 21 | libcpu/i386_gendis.c | 2 +- | 21 | libcpu/i386_gendis.c | 2 +- |
| 22 | libcpu/i386_lex.c | 2 +- | 22 | libcpu/i386_lex.c | 2 +- |
| 23 | libcpu/i386_parse.c | 2 +- | 23 | libcpu/i386_parse.c | 2 +- |
| 24 | libdw/Makefile.am | 4 +++- | 24 | libdw/Makefile.am | 3 ++- |
| 25 | libdw/libdw_alloc.c | 2 +- | 25 | libdw/libdw_alloc.c | 2 +- |
| 26 | libdwfl/dwfl_build_id_find_elf.c | 3 ++- | 26 | libdwfl/dwfl_build_id_find_elf.c | 3 ++- |
| 27 | libdwfl/dwfl_error.c | 4 +++- | 27 | libdwfl/dwfl_error.c | 4 +++- |
| 28 | libdwfl/dwfl_module_getdwarf.c | 1 + | 28 | libdwfl/dwfl_module_getdwarf.c | 1 + |
| 29 | libdwfl/find-debuginfo.c | 2 +- | 29 | libdwfl/find-debuginfo.c | 2 +- |
| 30 | libdwfl/libdwfl_crc32_file.c | 10 ++++++++++ | 30 | libdwfl/libdwfl_crc32_file.c | 9 +++++++++ |
| 31 | libdwfl/linux-kernel-modules.c | 1 + | 31 | libdwfl/linux-kernel-modules.c | 1 + |
| 32 | libebl/eblopenbackend.c | 2 +- | 32 | libebl/eblopenbackend.c | 2 +- |
| 33 | libelf/elf.h | 8 ++++++-- | 33 | libelf/elf.h | 8 ++++++-- |
| @@ -80,7 +80,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
| 80 | tests/sectiondump.c | 2 +- | 80 | tests/sectiondump.c | 2 +- |
| 81 | tests/varlocs.c | 2 +- | 81 | tests/varlocs.c | 2 +- |
| 82 | tests/vdsosyms.c | 2 +- | 82 | tests/vdsosyms.c | 2 +- |
| 83 | 70 files changed, 98 insertions(+), 64 deletions(-) | 83 | 69 files changed, 95 insertions(+), 64 deletions(-) |
| 84 | 84 | ||
| 85 | diff --git a/Makefile.am b/Makefile.am | 85 | diff --git a/Makefile.am b/Makefile.am |
| 86 | index 2ff444e..41f77df 100644 | 86 | index 2ff444e..41f77df 100644 |
| @@ -96,10 +96,10 @@ index 2ff444e..41f77df 100644 | |||
| 96 | EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ | 96 | EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ |
| 97 | COPYING COPYING-GPLV2 COPYING-LGPLV3 | 97 | COPYING COPYING-GPLV2 COPYING-LGPLV3 |
| 98 | diff --git a/lib/color.c b/lib/color.c | 98 | diff --git a/lib/color.c b/lib/color.c |
| 99 | index fde2d9d..73292ac 100644 | 99 | index f62389d..a2a84b4 100644 |
| 100 | --- a/lib/color.c | 100 | --- a/lib/color.c |
| 101 | +++ b/lib/color.c | 101 | +++ b/lib/color.c |
| 102 | @@ -32,12 +32,13 @@ | 102 | @@ -32,13 +32,14 @@ |
| 103 | #endif | 103 | #endif |
| 104 | 104 | ||
| 105 | #include <argp.h> | 105 | #include <argp.h> |
| @@ -110,22 +110,11 @@ index fde2d9d..73292ac 100644 | |||
| 110 | #include <string.h> | 110 | #include <string.h> |
| 111 | #include <unistd.h> | 111 | #include <unistd.h> |
| 112 | #include "libeu.h" | 112 | #include "libeu.h" |
| 113 | #include "color.h" | ||
| 113 | +#include "system.h" | 114 | +#include "system.h" |
| 114 | 115 | ||
| 115 | |||
| 116 | /* Prototype for option handler. */ | 116 | /* Prototype for option handler. */ |
| 117 | diff --git a/lib/crc32_file.c b/lib/crc32_file.c | 117 | static error_t parse_opt (int key, char *arg, struct argp_state *state); |
| 118 | index a8434d4..57e4298 100644 | ||
| 119 | --- a/lib/crc32_file.c | ||
| 120 | +++ b/lib/crc32_file.c | ||
| 121 | @@ -35,6 +35,7 @@ | ||
| 122 | #include <unistd.h> | ||
| 123 | #include <sys/stat.h> | ||
| 124 | #include <sys/mman.h> | ||
| 125 | +#include "system.h" | ||
| 126 | |||
| 127 | int | ||
| 128 | crc32_file (int fd, uint32_t *resp) | ||
| 129 | diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h | 118 | diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h |
| 130 | index dac2a5f..43016fc 100644 | 119 | index dac2a5f..43016fc 100644 |
| 131 | --- a/lib/fixedsizehash.h | 120 | --- a/lib/fixedsizehash.h |
| @@ -139,10 +128,10 @@ index dac2a5f..43016fc 100644 | |||
| 139 | #include <system.h> | 128 | #include <system.h> |
| 140 | 129 | ||
| 141 | diff --git a/lib/system.h b/lib/system.h | 130 | diff --git a/lib/system.h b/lib/system.h |
| 142 | index ccd99d6..0e93e60 100644 | 131 | index 9203335..1a60131 100644 |
| 143 | --- a/lib/system.h | 132 | --- a/lib/system.h |
| 144 | +++ b/lib/system.h | 133 | +++ b/lib/system.h |
| 145 | @@ -55,6 +55,16 @@ | 134 | @@ -50,6 +50,16 @@ |
| 146 | #else | 135 | #else |
| 147 | # error "Unknown byte order" | 136 | # error "Unknown byte order" |
| 148 | #endif | 137 | #endif |
| @@ -173,7 +162,7 @@ index 0cde384..217b054 100644 | |||
| 173 | #include <stddef.h> | 162 | #include <stddef.h> |
| 174 | #include <stdlib.h> | 163 | #include <stdlib.h> |
| 175 | diff --git a/libasm/asm_end.c b/libasm/asm_end.c | 164 | diff --git a/libasm/asm_end.c b/libasm/asm_end.c |
| 176 | index 191a535..bf5ab06 100644 | 165 | index ced24f5..4ad918c 100644 |
| 177 | --- a/libasm/asm_end.c | 166 | --- a/libasm/asm_end.c |
| 178 | +++ b/libasm/asm_end.c | 167 | +++ b/libasm/asm_end.c |
| 179 | @@ -32,7 +32,7 @@ | 168 | @@ -32,7 +32,7 @@ |
| @@ -212,10 +201,10 @@ index aae5eae..6d76016 100644 | |||
| 212 | #include <stdio.h> | 201 | #include <stdio.h> |
| 213 | #include <stdlib.h> | 202 | #include <stdlib.h> |
| 214 | diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c | 203 | diff --git a/libcpu/i386_lex.c b/libcpu/i386_lex.c |
| 215 | index b670608..b842c25 100644 | 204 | index ba5f4aa..b1e4191 100644 |
| 216 | --- a/libcpu/i386_lex.c | 205 | --- a/libcpu/i386_lex.c |
| 217 | +++ b/libcpu/i386_lex.c | 206 | +++ b/libcpu/i386_lex.c |
| 218 | @@ -592,7 +592,7 @@ char *i386_text; | 207 | @@ -577,7 +577,7 @@ char *i386_text; |
| 219 | #endif | 208 | #endif |
| 220 | 209 | ||
| 221 | #include <ctype.h> | 210 | #include <ctype.h> |
| @@ -225,7 +214,7 @@ index b670608..b842c25 100644 | |||
| 225 | 214 | ||
| 226 | #include <libeu.h> | 215 | #include <libeu.h> |
| 227 | diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c | 216 | diff --git a/libcpu/i386_parse.c b/libcpu/i386_parse.c |
| 228 | index 724addf..5b67802 100644 | 217 | index ef1ac35..48f2e64 100644 |
| 229 | --- a/libcpu/i386_parse.c | 218 | --- a/libcpu/i386_parse.c |
| 230 | +++ b/libcpu/i386_parse.c | 219 | +++ b/libcpu/i386_parse.c |
| 231 | @@ -107,7 +107,7 @@ | 220 | @@ -107,7 +107,7 @@ |
| @@ -238,27 +227,19 @@ index 724addf..5b67802 100644 | |||
| 238 | #include <libintl.h> | 227 | #include <libintl.h> |
| 239 | #include <math.h> | 228 | #include <math.h> |
| 240 | diff --git a/libdw/Makefile.am b/libdw/Makefile.am | 229 | diff --git a/libdw/Makefile.am b/libdw/Makefile.am |
| 241 | index 082d96c..51cbea0 100644 | 230 | index ff8c291..89e792a 100644 |
| 242 | --- a/libdw/Makefile.am | 231 | --- a/libdw/Makefile.am |
| 243 | +++ b/libdw/Makefile.am | 232 | +++ b/libdw/Makefile.am |
| 244 | @@ -102,6 +102,8 @@ endif | 233 | @@ -105,7 +105,8 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) |
| 245 | libdw_pic_a_SOURCES = | 234 | libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ |
| 246 | am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) | 235 | ../libdwfl/libdwfl_pic.a ../libebl/libebl.a |
| 247 | 236 | libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so | |
| 237 | -libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) | ||
| 248 | +fts_LDADD = -lfts | 238 | +fts_LDADD = -lfts |
| 249 | + | 239 | +libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD) |
| 250 | libdw_so_SOURCES = | 240 | libdw_so_SOURCES = |
| 251 | libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ | 241 | libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) |
| 252 | ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ | 242 | # The rpath is necessary for libebl because its $ORIGIN use will |
| 253 | @@ -112,7 +114,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ | ||
| 254 | -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ | ||
| 255 | -Wl,--version-script,$<,--no-undefined \ | ||
| 256 | -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ | ||
| 257 | - -ldl -lz $(argp_LDADD) $(zip_LIBS) | ||
| 258 | + -ldl -lz $(argp_LDADD) $(zip_LIBS) $(fts_LDADD) | ||
| 259 | @$(textrel_check) | ||
| 260 | $(AM_V_at)ln -fs $@ $@.$(VERSION) | ||
| 261 | |||
| 262 | diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c | 243 | diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c |
| 263 | index 28a8cf6..29aeb3f 100644 | 244 | index 28a8cf6..29aeb3f 100644 |
| 264 | --- a/libdw/libdw_alloc.c | 245 | --- a/libdw/libdw_alloc.c |
| @@ -273,18 +254,18 @@ index 28a8cf6..29aeb3f 100644 | |||
| 273 | #include <stdlib.h> | 254 | #include <stdlib.h> |
| 274 | #include "libdwP.h" | 255 | #include "libdwP.h" |
| 275 | diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c | 256 | diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c |
| 276 | index 903e193..b00d10c 100644 | 257 | index ee0c164..b06ab59 100644 |
| 277 | --- a/libdwfl/dwfl_build_id_find_elf.c | 258 | --- a/libdwfl/dwfl_build_id_find_elf.c |
| 278 | +++ b/libdwfl/dwfl_build_id_find_elf.c | 259 | +++ b/libdwfl/dwfl_build_id_find_elf.c |
| 279 | @@ -27,6 +27,7 @@ | 260 | @@ -31,6 +31,7 @@ |
| 280 | not, see <http://www.gnu.org/licenses/>. */ | 261 | #endif |
| 281 | 262 | ||
| 282 | #include "libdwflP.h" | 263 | #include "libdwflP.h" |
| 283 | +#include "system.h" | 264 | +#include "system.h" |
| 284 | #include <inttypes.h> | 265 | #include <inttypes.h> |
| 285 | #include <fcntl.h> | 266 | #include <fcntl.h> |
| 286 | #include <unistd.h> | 267 | #include <unistd.h> |
| 287 | @@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, | 268 | @@ -99,7 +100,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, |
| 288 | { | 269 | { |
| 289 | if (*file_name != NULL) | 270 | if (*file_name != NULL) |
| 290 | free (*file_name); | 271 | free (*file_name); |
| @@ -316,22 +297,22 @@ index 7bcf61c..c345797 100644 | |||
| 316 | return elf_errmsg (error & 0xffff); | 297 | return elf_errmsg (error & 0xffff); |
| 317 | case OTHER_ERROR (LIBDW): | 298 | case OTHER_ERROR (LIBDW): |
| 318 | diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c | 299 | diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c |
| 319 | index 0e8810b..82ad665 100644 | 300 | index 9775ace..511c4a6 100644 |
| 320 | --- a/libdwfl/dwfl_module_getdwarf.c | 301 | --- a/libdwfl/dwfl_module_getdwarf.c |
| 321 | +++ b/libdwfl/dwfl_module_getdwarf.c | 302 | +++ b/libdwfl/dwfl_module_getdwarf.c |
| 322 | @@ -31,6 +31,7 @@ | 303 | @@ -35,6 +35,7 @@ |
| 323 | #include <fcntl.h> | 304 | #include <fcntl.h> |
| 324 | #include <string.h> | 305 | #include <string.h> |
| 325 | #include <unistd.h> | 306 | #include <unistd.h> |
| 326 | +#include "system.h" | 307 | +#include "system.h" |
| 327 | #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ | 308 | #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */ |
| 328 | #include "../libelf/libelfP.h" | 309 | #include "../libelf/libelfP.h" |
| 329 | 310 | #include "system.h" | |
| 330 | diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c | 311 | diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c |
| 331 | index 80515db..80b0148 100644 | 312 | index 6d5a42a..9267788 100644 |
| 332 | --- a/libdwfl/find-debuginfo.c | 313 | --- a/libdwfl/find-debuginfo.c |
| 333 | +++ b/libdwfl/find-debuginfo.c | 314 | +++ b/libdwfl/find-debuginfo.c |
| 334 | @@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, | 315 | @@ -389,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, |
| 335 | /* If FILE_NAME is a symlink, the debug file might be associated | 316 | /* If FILE_NAME is a symlink, the debug file might be associated |
| 336 | with the symlink target name instead. */ | 317 | with the symlink target name instead. */ |
| 337 | 318 | ||
| @@ -341,32 +322,31 @@ index 80515db..80b0148 100644 | |||
| 341 | fd = find_debuginfo_in_path (mod, canon, | 322 | fd = find_debuginfo_in_path (mod, canon, |
| 342 | debuglink_file, debuglink_crc, | 323 | debuglink_file, debuglink_crc, |
| 343 | diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c | 324 | diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c |
| 344 | index 6b6b7d3..debc4a4 100644 | 325 | index f849128..6f0aca1 100644 |
| 345 | --- a/libdwfl/libdwfl_crc32_file.c | 326 | --- a/libdwfl/libdwfl_crc32_file.c |
| 346 | +++ b/libdwfl/libdwfl_crc32_file.c | 327 | +++ b/libdwfl/libdwfl_crc32_file.c |
| 347 | @@ -31,6 +31,16 @@ | 328 | @@ -29,6 +29,15 @@ |
| 329 | # include <config.h> | ||
| 330 | #endif | ||
| 348 | 331 | ||
| 349 | #define crc32_file attribute_hidden __libdwfl_crc32_file | ||
| 350 | #define crc32 __libdwfl_crc32 | ||
| 351 | + | ||
| 352 | +#ifndef TEMP_FAILURE_RETRY | 332 | +#ifndef TEMP_FAILURE_RETRY |
| 353 | +#define TEMP_FAILURE_RETRY(expression) \ | 333 | +#define TEMP_FAILURE_RETRY(expression) \ |
| 354 | + (__extension__ \ | 334 | + (__extension__ \ |
| 355 | + ({ long int __result; \ | 335 | + ({ long int __result; \ |
| 356 | + do __result = (long int) (expression); \ | 336 | + do __result = (long int) (expression); \ |
| 357 | + while (__result == -1L && errno == EINTR); \ | 337 | + while (__result == -1L && errno == EINTR); \ |
| 358 | + __result; })) | 338 | + __result; })) |
| 359 | +#endif | 339 | +#endif |
| 360 | + | 340 | + |
| 361 | #define LIB_SYSTEM_H 1 | 341 | #define crc32_file attribute_hidden __libdwfl_crc32_file |
| 342 | #define crc32 __libdwfl_crc32 | ||
| 362 | #include <libdwflP.h> | 343 | #include <libdwflP.h> |
| 363 | #include "../lib/crc32_file.c" | ||
| 364 | diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c | 344 | diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c |
| 365 | index 9cd8ea9..4dbf4c5 100644 | 345 | index 9d0fef2..9fc09b8 100644 |
| 366 | --- a/libdwfl/linux-kernel-modules.c | 346 | --- a/libdwfl/linux-kernel-modules.c |
| 367 | +++ b/libdwfl/linux-kernel-modules.c | 347 | +++ b/libdwfl/linux-kernel-modules.c |
| 368 | @@ -36,6 +36,7 @@ | 348 | @@ -40,6 +40,7 @@ |
| 369 | #include <config.h> | 349 | #include <system.h> |
| 370 | 350 | ||
| 371 | #include "libdwflP.h" | 351 | #include "libdwflP.h" |
| 372 | +#include "system.h" | 352 | +#include "system.h" |
| @@ -374,7 +354,7 @@ index 9cd8ea9..4dbf4c5 100644 | |||
| 374 | #include <errno.h> | 354 | #include <errno.h> |
| 375 | #include <stdio.h> | 355 | #include <stdio.h> |
| 376 | diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c | 356 | diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c |
| 377 | index 34d439a..56d2345 100644 | 357 | index 5371396..2e66dfd 100644 |
| 378 | --- a/libebl/eblopenbackend.c | 358 | --- a/libebl/eblopenbackend.c |
| 379 | +++ b/libebl/eblopenbackend.c | 359 | +++ b/libebl/eblopenbackend.c |
| 380 | @@ -32,7 +32,7 @@ | 360 | @@ -32,7 +32,7 @@ |
| @@ -387,7 +367,7 @@ index 34d439a..56d2345 100644 | |||
| 387 | #include <dwarf.h> | 367 | #include <dwarf.h> |
| 388 | #include <stdlib.h> | 368 | #include <stdlib.h> |
| 389 | diff --git a/libelf/elf.h b/libelf/elf.h | 369 | diff --git a/libelf/elf.h b/libelf/elf.h |
| 390 | index 74654d6..81eee8b 100644 | 370 | index 5cf2b93..990b3af 100644 |
| 391 | --- a/libelf/elf.h | 371 | --- a/libelf/elf.h |
| 392 | +++ b/libelf/elf.h | 372 | +++ b/libelf/elf.h |
| 393 | @@ -21,7 +21,9 @@ | 373 | @@ -21,7 +21,9 @@ |
| @@ -401,7 +381,7 @@ index 74654d6..81eee8b 100644 | |||
| 401 | 381 | ||
| 402 | /* Standard ELF types. */ | 382 | /* Standard ELF types. */ |
| 403 | 383 | ||
| 404 | @@ -3704,6 +3706,8 @@ enum | 384 | @@ -3705,6 +3707,8 @@ enum |
| 405 | #define R_BPF_NONE 0 /* No reloc */ | 385 | #define R_BPF_NONE 0 /* No reloc */ |
| 406 | #define R_BPF_MAP_FD 1 /* Map fd to pointer */ | 386 | #define R_BPF_MAP_FD 1 /* Map fd to pointer */ |
| 407 | 387 | ||
| @@ -412,7 +392,7 @@ index 74654d6..81eee8b 100644 | |||
| 412 | 392 | ||
| 413 | #endif /* elf.h */ | 393 | #endif /* elf.h */ |
| 414 | diff --git a/libelf/libelf.h b/libelf/libelf.h | 394 | diff --git a/libelf/libelf.h b/libelf/libelf.h |
| 415 | index c0d6389..38a68fd 100644 | 395 | index 547c0f5..dd78799 100644 |
| 416 | --- a/libelf/libelf.h | 396 | --- a/libelf/libelf.h |
| 417 | +++ b/libelf/libelf.h | 397 | +++ b/libelf/libelf.h |
| 418 | @@ -29,6 +29,7 @@ | 398 | @@ -29,6 +29,7 @@ |
| @@ -424,10 +404,10 @@ index c0d6389..38a68fd 100644 | |||
| 424 | #include <sys/types.h> | 404 | #include <sys/types.h> |
| 425 | 405 | ||
| 426 | diff --git a/libelf/libelfP.h b/libelf/libelfP.h | 406 | diff --git a/libelf/libelfP.h b/libelf/libelfP.h |
| 427 | index 4459982..1296f20 100644 | 407 | index 7ee6625..5840899 100644 |
| 428 | --- a/libelf/libelfP.h | 408 | --- a/libelf/libelfP.h |
| 429 | +++ b/libelf/libelfP.h | 409 | +++ b/libelf/libelfP.h |
| 430 | @@ -36,6 +36,7 @@ | 410 | @@ -32,6 +32,7 @@ |
| 431 | 411 | ||
| 432 | #include <ar.h> | 412 | #include <ar.h> |
| 433 | #include <gelf.h> | 413 | #include <gelf.h> |
| @@ -436,7 +416,7 @@ index 4459982..1296f20 100644 | |||
| 436 | #include <errno.h> | 416 | #include <errno.h> |
| 437 | #include <stdbool.h> | 417 | #include <stdbool.h> |
| 438 | diff --git a/src/addr2line.c b/src/addr2line.c | 418 | diff --git a/src/addr2line.c b/src/addr2line.c |
| 439 | index 0222088..cd6a9a6 100644 | 419 | index ba414a7..04b7116 100644 |
| 440 | --- a/src/addr2line.c | 420 | --- a/src/addr2line.c |
| 441 | +++ b/src/addr2line.c | 421 | +++ b/src/addr2line.c |
| 442 | @@ -23,7 +23,7 @@ | 422 | @@ -23,7 +23,7 @@ |
| @@ -449,7 +429,7 @@ index 0222088..cd6a9a6 100644 | |||
| 449 | #include <inttypes.h> | 429 | #include <inttypes.h> |
| 450 | #include <libdwfl.h> | 430 | #include <libdwfl.h> |
| 451 | diff --git a/src/ar.c b/src/ar.c | 431 | diff --git a/src/ar.c b/src/ar.c |
| 452 | index f2f322b..6e70031 100644 | 432 | index ec32cee..4efd729 100644 |
| 453 | --- a/src/ar.c | 433 | --- a/src/ar.c |
| 454 | +++ b/src/ar.c | 434 | +++ b/src/ar.c |
| 455 | @@ -22,7 +22,7 @@ | 435 | @@ -22,7 +22,7 @@ |
| @@ -488,7 +468,7 @@ index 553fc57..46443d0 100644 | |||
| 488 | #include <limits.h> | 468 | #include <limits.h> |
| 489 | #include <string.h> | 469 | #include <string.h> |
| 490 | diff --git a/src/elfcmp.c b/src/elfcmp.c | 470 | diff --git a/src/elfcmp.c b/src/elfcmp.c |
| 491 | index 401ab31..873d253 100644 | 471 | index 5046420..cff183f 100644 |
| 492 | --- a/src/elfcmp.c | 472 | --- a/src/elfcmp.c |
| 493 | +++ b/src/elfcmp.c | 473 | +++ b/src/elfcmp.c |
| 494 | @@ -23,7 +23,7 @@ | 474 | @@ -23,7 +23,7 @@ |
| @@ -501,7 +481,7 @@ index 401ab31..873d253 100644 | |||
| 501 | #include <locale.h> | 481 | #include <locale.h> |
| 502 | #include <libintl.h> | 482 | #include <libintl.h> |
| 503 | diff --git a/src/elflint.c b/src/elflint.c | 483 | diff --git a/src/elflint.c b/src/elflint.c |
| 504 | index 7d3f227..074d21c 100644 | 484 | index 51e53c2..da0b0dc 100644 |
| 505 | --- a/src/elflint.c | 485 | --- a/src/elflint.c |
| 506 | +++ b/src/elflint.c | 486 | +++ b/src/elflint.c |
| 507 | @@ -24,7 +24,7 @@ | 487 | @@ -24,7 +24,7 @@ |
| @@ -514,7 +494,7 @@ index 7d3f227..074d21c 100644 | |||
| 514 | #include <gelf.h> | 494 | #include <gelf.h> |
| 515 | #include <inttypes.h> | 495 | #include <inttypes.h> |
| 516 | diff --git a/src/findtextrel.c b/src/findtextrel.c | 496 | diff --git a/src/findtextrel.c b/src/findtextrel.c |
| 517 | index dc41502..325888c 100644 | 497 | index 8f1e239..71463af 100644 |
| 518 | --- a/src/findtextrel.c | 498 | --- a/src/findtextrel.c |
| 519 | +++ b/src/findtextrel.c | 499 | +++ b/src/findtextrel.c |
| 520 | @@ -23,7 +23,7 @@ | 500 | @@ -23,7 +23,7 @@ |
| @@ -527,7 +507,7 @@ index dc41502..325888c 100644 | |||
| 527 | #include <gelf.h> | 507 | #include <gelf.h> |
| 528 | #include <libdw.h> | 508 | #include <libdw.h> |
| 529 | diff --git a/src/nm.c b/src/nm.c | 509 | diff --git a/src/nm.c b/src/nm.c |
| 530 | index c54e96f..9e031d9 100644 | 510 | index 969c6d3..3113c04 100644 |
| 531 | --- a/src/nm.c | 511 | --- a/src/nm.c |
| 532 | +++ b/src/nm.c | 512 | +++ b/src/nm.c |
| 533 | @@ -26,7 +26,7 @@ | 513 | @@ -26,7 +26,7 @@ |
| @@ -540,7 +520,7 @@ index c54e96f..9e031d9 100644 | |||
| 540 | #include <gelf.h> | 520 | #include <gelf.h> |
| 541 | #include <inttypes.h> | 521 | #include <inttypes.h> |
| 542 | diff --git a/src/objdump.c b/src/objdump.c | 522 | diff --git a/src/objdump.c b/src/objdump.c |
| 543 | index fff4b81..4b1f966 100644 | 523 | index 860cfac..61e67bf 100644 |
| 544 | --- a/src/objdump.c | 524 | --- a/src/objdump.c |
| 545 | +++ b/src/objdump.c | 525 | +++ b/src/objdump.c |
| 546 | @@ -21,7 +21,7 @@ | 526 | @@ -21,7 +21,7 @@ |
| @@ -553,7 +533,7 @@ index fff4b81..4b1f966 100644 | |||
| 553 | #include <inttypes.h> | 533 | #include <inttypes.h> |
| 554 | #include <libintl.h> | 534 | #include <libintl.h> |
| 555 | diff --git a/src/ranlib.c b/src/ranlib.c | 535 | diff --git a/src/ranlib.c b/src/ranlib.c |
| 556 | index 41a3bcf..0c7da2c 100644 | 536 | index cc0ee23..ae851e4 100644 |
| 557 | --- a/src/ranlib.c | 537 | --- a/src/ranlib.c |
| 558 | +++ b/src/ranlib.c | 538 | +++ b/src/ranlib.c |
| 559 | @@ -24,7 +24,7 @@ | 539 | @@ -24,7 +24,7 @@ |
| @@ -566,7 +546,7 @@ index 41a3bcf..0c7da2c 100644 | |||
| 566 | #include <gelf.h> | 546 | #include <gelf.h> |
| 567 | #include <libintl.h> | 547 | #include <libintl.h> |
| 568 | diff --git a/src/readelf.c b/src/readelf.c | 548 | diff --git a/src/readelf.c b/src/readelf.c |
| 569 | index d18a4b7..a6cfb35 100644 | 549 | index 346eccd..c831aa8 100644 |
| 570 | --- a/src/readelf.c | 550 | --- a/src/readelf.c |
| 571 | +++ b/src/readelf.c | 551 | +++ b/src/readelf.c |
| 572 | @@ -25,7 +25,7 @@ | 552 | @@ -25,7 +25,7 @@ |
| @@ -579,7 +559,7 @@ index d18a4b7..a6cfb35 100644 | |||
| 579 | #include <gelf.h> | 559 | #include <gelf.h> |
| 580 | #include <inttypes.h> | 560 | #include <inttypes.h> |
| 581 | diff --git a/src/size.c b/src/size.c | 561 | diff --git a/src/size.c b/src/size.c |
| 582 | index de0d791..4639d42 100644 | 562 | index ad8dbcb..fd83be0 100644 |
| 583 | --- a/src/size.c | 563 | --- a/src/size.c |
| 584 | +++ b/src/size.c | 564 | +++ b/src/size.c |
| 585 | @@ -21,7 +21,7 @@ | 565 | @@ -21,7 +21,7 @@ |
| @@ -592,7 +572,7 @@ index de0d791..4639d42 100644 | |||
| 592 | #include <gelf.h> | 572 | #include <gelf.h> |
| 593 | #include <inttypes.h> | 573 | #include <inttypes.h> |
| 594 | diff --git a/src/stack.c b/src/stack.c | 574 | diff --git a/src/stack.c b/src/stack.c |
| 595 | index a5a7beb..4c075bc 100644 | 575 | index 6f2ff69..6da0243 100644 |
| 596 | --- a/src/stack.c | 576 | --- a/src/stack.c |
| 597 | +++ b/src/stack.c | 577 | +++ b/src/stack.c |
| 598 | @@ -18,7 +18,7 @@ | 578 | @@ -18,7 +18,7 @@ |
| @@ -605,7 +585,7 @@ index a5a7beb..4c075bc 100644 | |||
| 605 | #include <inttypes.h> | 585 | #include <inttypes.h> |
| 606 | #include <stdio.h> | 586 | #include <stdio.h> |
| 607 | diff --git a/src/strings.c b/src/strings.c | 587 | diff --git a/src/strings.c b/src/strings.c |
| 608 | index 49aab8b..09d5b1c 100644 | 588 | index d214356..76cb26b 100644 |
| 609 | --- a/src/strings.c | 589 | --- a/src/strings.c |
| 610 | +++ b/src/strings.c | 590 | +++ b/src/strings.c |
| 611 | @@ -25,7 +25,7 @@ | 591 | @@ -25,7 +25,7 @@ |
| @@ -618,7 +598,7 @@ index 49aab8b..09d5b1c 100644 | |||
| 618 | #include <gelf.h> | 598 | #include <gelf.h> |
| 619 | #include <inttypes.h> | 599 | #include <inttypes.h> |
| 620 | diff --git a/src/strip.c b/src/strip.c | 600 | diff --git a/src/strip.c b/src/strip.c |
| 621 | index a875ddf..fd76f7f 100644 | 601 | index c7830ec..0d7f148 100644 |
| 622 | --- a/src/strip.c | 602 | --- a/src/strip.c |
| 623 | +++ b/src/strip.c | 603 | +++ b/src/strip.c |
| 624 | @@ -24,7 +24,7 @@ | 604 | @@ -24,7 +24,7 @@ |
| @@ -628,10 +608,10 @@ index a875ddf..fd76f7f 100644 | |||
| 628 | -#include <error.h> | 608 | -#include <error.h> |
| 629 | +#include <err.h> | 609 | +#include <err.h> |
| 630 | #include <fcntl.h> | 610 | #include <fcntl.h> |
| 611 | #include <fnmatch.h> | ||
| 631 | #include <gelf.h> | 612 | #include <gelf.h> |
| 632 | #include <libelf.h> | ||
| 633 | diff --git a/src/unstrip.c b/src/unstrip.c | 613 | diff --git a/src/unstrip.c b/src/unstrip.c |
| 634 | index d838ae9..0108272 100644 | 614 | index 5074909..3d4f952 100644 |
| 635 | --- a/src/unstrip.c | 615 | --- a/src/unstrip.c |
| 636 | +++ b/src/unstrip.c | 616 | +++ b/src/unstrip.c |
| 637 | @@ -31,7 +31,7 @@ | 617 | @@ -31,7 +31,7 @@ |
| @@ -670,7 +650,7 @@ index 286f7e3..c9de089 100644 | |||
| 670 | #include <argp.h> | 650 | #include <argp.h> |
| 671 | #include <assert.h> | 651 | #include <assert.h> |
| 672 | diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c | 652 | diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c |
| 673 | index b7158da..354fa6a 100644 | 653 | index a387d8f..955c27d 100644 |
| 674 | --- a/tests/backtrace-data.c | 654 | --- a/tests/backtrace-data.c |
| 675 | +++ b/tests/backtrace-data.c | 655 | +++ b/tests/backtrace-data.c |
| 676 | @@ -27,7 +27,7 @@ | 656 | @@ -27,7 +27,7 @@ |
| @@ -683,7 +663,7 @@ index b7158da..354fa6a 100644 | |||
| 683 | #include <dwarf.h> | 663 | #include <dwarf.h> |
| 684 | #if defined(__x86_64__) && defined(__linux__) | 664 | #if defined(__x86_64__) && defined(__linux__) |
| 685 | diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c | 665 | diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c |
| 686 | index a644c8a..b8cbe27 100644 | 666 | index 2dc8a9a..24ca7fb 100644 |
| 687 | --- a/tests/backtrace-dwarf.c | 667 | --- a/tests/backtrace-dwarf.c |
| 688 | +++ b/tests/backtrace-dwarf.c | 668 | +++ b/tests/backtrace-dwarf.c |
| 689 | @@ -22,7 +22,7 @@ | 669 | @@ -22,7 +22,7 @@ |
| @@ -693,10 +673,10 @@ index a644c8a..b8cbe27 100644 | |||
| 693 | -#include <error.h> | 673 | -#include <error.h> |
| 694 | +#include <err.h> | 674 | +#include <err.h> |
| 695 | #include <unistd.h> | 675 | #include <unistd.h> |
| 696 | #include <sys/ptrace.h> | ||
| 697 | #include <sys/types.h> | 676 | #include <sys/types.h> |
| 677 | #include <sys/wait.h> | ||
| 698 | diff --git a/tests/backtrace.c b/tests/backtrace.c | 678 | diff --git a/tests/backtrace.c b/tests/backtrace.c |
| 699 | index 1ff6353..47e3f7b 100644 | 679 | index 21abe8a..d733248 100644 |
| 700 | --- a/tests/backtrace.c | 680 | --- a/tests/backtrace.c |
| 701 | +++ b/tests/backtrace.c | 681 | +++ b/tests/backtrace.c |
| 702 | @@ -24,7 +24,7 @@ | 682 | @@ -24,7 +24,7 @@ |
| @@ -1047,5 +1027,5 @@ index b876c10..afb2823 100644 | |||
| 1047 | #include <stdio.h> | 1027 | #include <stdio.h> |
| 1048 | #include <string.h> | 1028 | #include <string.h> |
| 1049 | -- | 1029 | -- |
| 1050 | 2.8.1 | 1030 | 1.8.3.1 |
| 1051 | 1031 | ||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch index e0291b4cf3..e0291b4cf3 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch +++ b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch index b17498f5fa..b17498f5fa 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch +++ b/meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch b/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch index 2a5f8628d9..2a5f8628d9 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/0003-Add-mips-n64-relocation-format-hack.patch +++ b/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff index 50f4b059e3..50f4b059e3 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/arm_backend.diff +++ b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch b/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch index b2623f9d2e..b2623f9d2e 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/fallthrough.patch +++ b/meta/recipes-devtools/elfutils/files/debian/fallthrough.patch | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff index 44fda7f305..44fda7f305 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/hppa_backend.diff +++ b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff | |||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff b/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch index a5e76dda4a..2e0e54b0c7 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_backend.diff +++ b/meta/recipes-devtools/elfutils/files/debian/mips_backend.patch | |||
| @@ -1,8 +1,60 @@ | |||
| 1 | From 46d0d0ca718093486eeeedf1b44134e9e29b56f7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Wed, 16 Aug 2017 09:18:59 +0800 | ||
| 4 | Subject: [PATCH] mips backends | ||
| 5 | |||
| 1 | Upstream-Status: Backport [from debian] | 6 | Upstream-Status: Backport [from debian] |
| 7 | |||
| 8 | Rebase to 0.170 | ||
| 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 9 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 10 | --- | ||
| 11 | backends/Makefile.am | 8 +- | ||
| 12 | backends/mips_init.c | 59 +++++++++ | ||
| 13 | backends/mips_regs.c | 104 ++++++++++++++++ | ||
| 14 | backends/mips_reloc.def | 79 ++++++++++++ | ||
| 15 | backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++ | ||
| 16 | backends/mips_symbol.c | 52 ++++++++ | ||
| 17 | libebl/eblopenbackend.c | 2 + | ||
| 18 | 7 files changed, 623 insertions(+), 2 deletions(-) | ||
| 19 | create mode 100644 backends/mips_init.c | ||
| 20 | create mode 100644 backends/mips_regs.c | ||
| 21 | create mode 100644 backends/mips_reloc.def | ||
| 22 | create mode 100644 backends/mips_retval.c | ||
| 23 | create mode 100644 backends/mips_symbol.c | ||
| 3 | 24 | ||
| 4 | Index: b/backends/mips_init.c | 25 | diff --git a/backends/Makefile.am b/backends/Makefile.am |
| 5 | =================================================================== | 26 | index 7f1f5d4..91baf6e 100644 |
| 27 | --- a/backends/Makefile.am | ||
| 28 | +++ b/backends/Makefile.am | ||
| 29 | @@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ | ||
| 30 | |||
| 31 | |||
| 32 | modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ | ||
| 33 | - tilegx m68k bpf parisc | ||
| 34 | + tilegx m68k bpf parisc mips | ||
| 35 | libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ | ||
| 36 | libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ | ||
| 37 | libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ | ||
| 38 | libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ | ||
| 39 | - libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a | ||
| 40 | + libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a | ||
| 41 | noinst_LIBRARIES = $(libebl_pic) | ||
| 42 | noinst_DATA = $(libebl_pic:_pic.a=.so) | ||
| 43 | |||
| 44 | @@ -128,6 +128,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c | ||
| 45 | libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) | ||
| 46 | am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) | ||
| 47 | |||
| 48 | +mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c | ||
| 49 | +libebl_mips_pic_a_SOURCES = $(mips_SRCS) | ||
| 50 | +am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) | ||
| 51 | + | ||
| 52 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) | ||
| 53 | @rm -f $(@:.so=.map) | ||
| 54 | $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ | ||
| 55 | diff --git a/backends/mips_init.c b/backends/mips_init.c | ||
| 56 | new file mode 100644 | ||
| 57 | index 0000000..975c04e | ||
| 6 | --- /dev/null | 58 | --- /dev/null |
| 7 | +++ b/backends/mips_init.c | 59 | +++ b/backends/mips_init.c |
| 8 | @@ -0,0 +1,59 @@ | 60 | @@ -0,0 +1,59 @@ |
| @@ -65,8 +117,9 @@ Index: b/backends/mips_init.c | |||
| 65 | + | 117 | + |
| 66 | + return MODVERSION; | 118 | + return MODVERSION; |
| 67 | +} | 119 | +} |
| 68 | Index: b/backends/mips_regs.c | 120 | diff --git a/backends/mips_regs.c b/backends/mips_regs.c |
| 69 | =================================================================== | 121 | new file mode 100644 |
| 122 | index 0000000..44f86cb | ||
| 70 | --- /dev/null | 123 | --- /dev/null |
| 71 | +++ b/backends/mips_regs.c | 124 | +++ b/backends/mips_regs.c |
| 72 | @@ -0,0 +1,104 @@ | 125 | @@ -0,0 +1,104 @@ |
| @@ -174,8 +227,9 @@ Index: b/backends/mips_regs.c | |||
| 174 | + name[namelen++] = '\0'; | 227 | + name[namelen++] = '\0'; |
| 175 | + return namelen; | 228 | + return namelen; |
| 176 | +} | 229 | +} |
| 177 | Index: b/backends/mips_reloc.def | 230 | diff --git a/backends/mips_reloc.def b/backends/mips_reloc.def |
| 178 | =================================================================== | 231 | new file mode 100644 |
| 232 | index 0000000..4579970 | ||
| 179 | --- /dev/null | 233 | --- /dev/null |
| 180 | +++ b/backends/mips_reloc.def | 234 | +++ b/backends/mips_reloc.def |
| 181 | @@ -0,0 +1,79 @@ | 235 | @@ -0,0 +1,79 @@ |
| @@ -258,8 +312,9 @@ Index: b/backends/mips_reloc.def | |||
| 258 | + | 312 | + |
| 259 | +#define NO_COPY_RELOC 1 | 313 | +#define NO_COPY_RELOC 1 |
| 260 | +#define NO_RELATIVE_RELOC 1 | 314 | +#define NO_RELATIVE_RELOC 1 |
| 261 | Index: b/backends/mips_retval.c | 315 | diff --git a/backends/mips_retval.c b/backends/mips_retval.c |
| 262 | =================================================================== | 316 | new file mode 100644 |
| 317 | index 0000000..656cd1f | ||
| 263 | --- /dev/null | 318 | --- /dev/null |
| 264 | +++ b/backends/mips_retval.c | 319 | +++ b/backends/mips_retval.c |
| 265 | @@ -0,0 +1,321 @@ | 320 | @@ -0,0 +1,321 @@ |
| @@ -584,8 +639,9 @@ Index: b/backends/mips_retval.c | |||
| 584 | + DWARF and might be valid. */ | 639 | + DWARF and might be valid. */ |
| 585 | + return -2; | 640 | + return -2; |
| 586 | +} | 641 | +} |
| 587 | Index: b/backends/mips_symbol.c | 642 | diff --git a/backends/mips_symbol.c b/backends/mips_symbol.c |
| 588 | =================================================================== | 643 | new file mode 100644 |
| 644 | index 0000000..ba465fe | ||
| 589 | --- /dev/null | 645 | --- /dev/null |
| 590 | +++ b/backends/mips_symbol.c | 646 | +++ b/backends/mips_symbol.c |
| 591 | @@ -0,0 +1,52 @@ | 647 | @@ -0,0 +1,52 @@ |
| @@ -641,11 +697,11 @@ Index: b/backends/mips_symbol.c | |||
| 641 | + return ELF_T_NUM; | 697 | + return ELF_T_NUM; |
| 642 | + } | 698 | + } |
| 643 | +} | 699 | +} |
| 644 | Index: b/libebl/eblopenbackend.c | 700 | diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c |
| 645 | =================================================================== | 701 | index 1f81477..5371396 100644 |
| 646 | --- a/libebl/eblopenbackend.c | 702 | --- a/libebl/eblopenbackend.c |
| 647 | +++ b/libebl/eblopenbackend.c | 703 | +++ b/libebl/eblopenbackend.c |
| 648 | @@ -71,6 +71,8 @@ static const struct | 704 | @@ -72,6 +72,8 @@ static const struct |
| 649 | { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, | 705 | { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, |
| 650 | { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, | 706 | { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, |
| 651 | { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, | 707 | { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, |
| @@ -654,33 +710,6 @@ Index: b/libebl/eblopenbackend.c | |||
| 654 | 710 | ||
| 655 | { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, | 711 | { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, |
| 656 | { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, | 712 | { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, |
| 657 | Index: b/backends/Makefile.am | 713 | -- |
| 658 | =================================================================== | 714 | 1.8.3.1 |
| 659 | --- a/backends/Makefile.am | 715 | |
| 660 | +++ b/backends/Makefile.am | ||
| 661 | @@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I | ||
| 662 | |||
| 663 | |||
| 664 | modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ | ||
| 665 | - tilegx m68k bpf parisc | ||
| 666 | + tilegx m68k bpf parisc mips | ||
| 667 | libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ | ||
| 668 | libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ | ||
| 669 | libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ | ||
| 670 | libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ | ||
| 671 | - libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a | ||
| 672 | + libebl_m68k_pic.a libebl_bpf_pic.a libebl_parisc_pic.a libebl_mips_pic.a | ||
| 673 | noinst_LIBRARIES = $(libebl_pic) | ||
| 674 | noinst_DATA = $(libebl_pic:_pic.a=.so) | ||
| 675 | |||
| 676 | @@ -132,6 +132,10 @@ parisc_SRCS = parisc_init.c parisc_symbo | ||
| 677 | libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) | ||
| 678 | am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) | ||
| 679 | |||
| 680 | +mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c | ||
| 681 | +libebl_mips_pic_a_SOURCES = $(mips_SRCS) | ||
| 682 | +am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) | ||
| 683 | + | ||
| 684 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) | ||
| 685 | @rm -f $(@:.so=.map) | ||
| 686 | $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ | ||
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch index 790930cf35..790930cf35 100644 --- a/meta/recipes-devtools/elfutils/elfutils-0.168/debian/mips_readelf_w.patch +++ b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch | |||
