diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2018-11-23 15:47:20 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-23 23:35:19 +0000 |
commit | 43413f8dd6a9ab05badbfd97b45a5a78202e70a8 (patch) | |
tree | fc4f2c9fa8b3c28db1d77076a2c3cf25f45fddda /meta | |
parent | fec5323dba7e23a42073995020c7336f3e6a7de1 (diff) | |
download | poky-43413f8dd6a9ab05badbfd97b45a5a78202e70a8.tar.gz |
elfutils: 0.174 -> 0.175
- Drop backport CVE patches
0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch
0001-size-Handle-recursive-ELF-ar-files.patch
0001-arlib-Check-that-sh_entsize-isn-t-zero.patch
- Drop patches that upstream has fixed
0005-fix-a-stack-usage-warning.patch [9a74c19 backends: ppc use define
instead of const for size of dwarf_regs array.]
- Update debian patches to 0.175
- Rebase local patch to 0.175
0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
(From OE-Core rev: 8748de4df5a4ece303f07f8bbb248920a199478a)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
20 files changed, 403 insertions, 780 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.174.bb b/meta/recipes-devtools/elfutils/elfutils_0.175.bb index c30265b539..b0b9ddc736 100644 --- a/meta/recipes-devtools/elfutils/elfutils_0.174.bb +++ b/meta/recipes-devtools/elfutils/elfutils_0.175.bb | |||
@@ -6,36 +6,32 @@ 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 | # The Debian patches below are from: | 8 | # The Debian patches below are from: |
9 | # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | 9 | # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.175-1.debian.tar.xz |
10 | SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ | 10 | SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ |
11 | file://0001-dso-link-change.patch \ | 11 | file://0001-dso-link-change.patch \ |
12 | file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ | 12 | file://0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch \ |
13 | file://0003-fixheadercheck.patch \ | 13 | file://0003-fixheadercheck.patch \ |
14 | file://0004-Disable-the-test-to-convert-euc-jp.patch \ | 14 | file://0004-Disable-the-test-to-convert-euc-jp.patch \ |
15 | file://0005-fix-a-stack-usage-warning.patch \ | ||
16 | file://0006-Fix-build-on-aarch64-musl.patch \ | 15 | file://0006-Fix-build-on-aarch64-musl.patch \ |
17 | file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ | 16 | file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \ |
18 | file://0001-libasm-may-link-with-libbz2-if-found.patch \ | 17 | file://0001-libasm-may-link-with-libbz2-if-found.patch \ |
19 | file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ | 18 | file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ |
20 | file://0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch \ | 19 | file://debian/hppa_backend.diff \ |
21 | file://0001-size-Handle-recursive-ELF-ar-files.patch \ | 20 | file://debian/arm_backend.diff \ |
22 | file://0001-arlib-Check-that-sh_entsize-isn-t-zero.patch \ | 21 | file://debian/mips_backend.diff \ |
23 | file://debian/0001-hppa_backend.patch \ | 22 | file://debian/mips_readelf_w.patch \ |
24 | file://debian/0001-arm_backend.patch \ | 23 | file://debian/kfreebsd_path.patch \ |
25 | file://debian/0001-mips_backend.patch \ | ||
26 | file://debian/0001-testsuite-ignore-elflint.patch \ | ||
27 | file://debian/0001-mips_readelf_w.patch \ | ||
28 | file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ | 24 | file://debian/0001-Ignore-differences-between-mips-machine-identifiers.patch \ |
29 | file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ | 25 | file://debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \ |
30 | file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ | 26 | file://debian/0003-Add-mips-n64-relocation-format-hack.patch \ |
27 | file://debian/hurd_path.patch \ | ||
31 | file://debian/ignore_strmerge.diff \ | 28 | file://debian/ignore_strmerge.diff \ |
32 | file://debian/0001-fix-gcc7-ftbfs.patch \ | 29 | file://debian/disable_werror.patch \ |
33 | file://debian/0001-disable_werror.patch \ | ||
34 | " | 30 | " |
35 | SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch" | 31 | SRC_URI_append_libc-musl = " file://0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch" |
36 | 32 | ||
37 | SRC_URI[md5sum] = "48bec24c0c8b2c16820326956dff9378" | 33 | SRC_URI[md5sum] = "9a02b0382b78cc2d515fb950275d4c02" |
38 | SRC_URI[sha256sum] = "cdf27e70076e10a29539d89e367101d516bc4aa11b0d7777fe52139e3fcad08a" | 34 | SRC_URI[sha256sum] = "f7ef925541ee32c6d15ae5cb27da5f119e01a5ccdbe9fe57bf836730d7b7a65b" |
39 | 35 | ||
40 | inherit autotools gettext | 36 | inherit autotools gettext |
41 | 37 | ||
diff --git a/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch b/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch deleted file mode 100644 index 86cf7c8d50..0000000000 --- a/meta/recipes-devtools/elfutils/files/0001-arlib-Check-that-sh_entsize-isn-t-zero.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From b518841fbc1431d7c5baa016e35f10fb647b5958 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Wielaard <mark@klomp.org> | ||
3 | Date: Thu, 18 Oct 2018 19:01:52 +0200 | ||
4 | Subject: [PATCH] arlib: Check that sh_entsize isn't zero. | ||
5 | |||
6 | A bogus ELF file could have sh_entsize as zero. Don't divide by zero, | ||
7 | but just assume there are no symbols in the section. | ||
8 | |||
9 | https://sourceware.org/bugzilla/show_bug.cgi?id=23786 | ||
10 | |||
11 | Signed-off-by: Mark Wielaard <mark@klomp.org> | ||
12 | |||
13 | CVE: CVE-2018-18521 | ||
14 | Upstream-Status: Backport [http://sourceware.org/git/elfutils.git] | ||
15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
16 | --- | ||
17 | src/arlib.c | 3 +++ | ||
18 | 1 file changed, 3 insertions(+) | ||
19 | |||
20 | diff --git a/src/arlib.c b/src/arlib.c | ||
21 | index 778e087..a6521e3 100644 | ||
22 | --- a/src/arlib.c | ||
23 | +++ b/src/arlib.c | ||
24 | @@ -252,6 +252,9 @@ arlib_add_symbols (Elf *elf, const char *arfname, const char *membername, | ||
25 | if (data == NULL) | ||
26 | continue; | ||
27 | |||
28 | + if (shdr->sh_entsize == 0) | ||
29 | + continue; | ||
30 | + | ||
31 | int nsyms = shdr->sh_size / shdr->sh_entsize; | ||
32 | for (int ndx = shdr->sh_info; ndx < nsyms; ++ndx) | ||
33 | { | ||
34 | -- | ||
35 | 2.7.4 | ||
36 | |||
diff --git a/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch b/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch deleted file mode 100644 index 2c74a8d5d7..0000000000 --- a/meta/recipes-devtools/elfutils/files/0001-libdwfl-Sanity-check-partial-core-file-data-reads.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 8cbb2f8de89d65ca52d4242f213a6206b48d2c8d Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 2 Nov 2018 14:22:31 +0800 | ||
4 | Subject: [PATCH] libdwfl: Sanity check partial core file data reads. | ||
5 | |||
6 | There were two issues when reading note data from a core file. | ||
7 | We didn't check if the data we already had in a buffer was big | ||
8 | enough. And if we did get the data, we should check if we got | ||
9 | everything, or just a part of the data. | ||
10 | |||
11 | https://sourceware.org/bugzilla/show_bug.cgi?id=23752 | ||
12 | |||
13 | Signed-off-by: Mark Wielaard <mark@klomp.org> | ||
14 | |||
15 | CVE: CVE-2018-18310 | ||
16 | Upstream-Status: Backport [http://sourceware.org/git/elfutils.git] | ||
17 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
18 | --- | ||
19 | libdwfl/dwfl_segment_report_module.c | 13 +++++++++++-- | ||
20 | 1 file changed, 11 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c | ||
23 | index 36e5c82..8749884 100644 | ||
24 | --- a/libdwfl/dwfl_segment_report_module.c | ||
25 | +++ b/libdwfl/dwfl_segment_report_module.c | ||
26 | @@ -1,5 +1,5 @@ | ||
27 | /* Sniff out modules from ELF headers visible in memory segments. | ||
28 | - Copyright (C) 2008-2012, 2014, 2015 Red Hat, Inc. | ||
29 | + Copyright (C) 2008-2012, 2014, 2015, 2018 Red Hat, Inc. | ||
30 | This file is part of elfutils. | ||
31 | |||
32 | This file is free software; you can redistribute it and/or modify | ||
33 | @@ -301,7 +301,10 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, | ||
34 | inline bool read_portion (void **data, size_t *data_size, | ||
35 | GElf_Addr vaddr, size_t filesz) | ||
36 | { | ||
37 | - if (vaddr - start + filesz > buffer_available | ||
38 | + /* Check whether we will have to read the segment data, or if it | ||
39 | + can be returned from the existing buffer. */ | ||
40 | + if (filesz > buffer_available | ||
41 | + || vaddr - start > buffer_available - filesz | ||
42 | /* If we're in string mode, then don't consider the buffer we have | ||
43 | sufficient unless it contains the terminator of the string. */ | ||
44 | || (filesz == 0 && memchr (vaddr - start + buffer, '\0', | ||
45 | @@ -459,6 +462,12 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name, | ||
46 | if (read_portion (&data, &data_size, vaddr, filesz)) | ||
47 | return; | ||
48 | |||
49 | + /* data_size will be zero if we got everything from the initial | ||
50 | + buffer, otherwise it will be the size of the new buffer that | ||
51 | + could be read. */ | ||
52 | + if (data_size != 0) | ||
53 | + filesz = data_size; | ||
54 | + | ||
55 | assert (sizeof (Elf32_Nhdr) == sizeof (Elf64_Nhdr)); | ||
56 | |||
57 | void *notes; | ||
58 | -- | ||
59 | 2.7.4 | ||
60 | |||
diff --git a/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch b/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch deleted file mode 100644 index 6fed82692c..0000000000 --- a/meta/recipes-devtools/elfutils/files/0001-size-Handle-recursive-ELF-ar-files.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 440d34d0ee37964453245895d38d7fc31bcf3d7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Wielaard <mark@klomp.org> | ||
3 | Date: Thu, 18 Oct 2018 23:15:48 +0200 | ||
4 | Subject: [PATCH] size: Handle recursive ELF ar files. | ||
5 | |||
6 | eu-size didn't handle an ELF ar file that contained an ar file itself | ||
7 | correctly. handle_ar would recursively call itself but close the ELF | ||
8 | file before returning. Only close the ELF file at the top-level. | ||
9 | |||
10 | https://sourceware.org/bugzilla/show_bug.cgi?id=23787 | ||
11 | |||
12 | Signed-off-by: Mark Wielaard <mark@klomp.org> | ||
13 | |||
14 | CVE: CVE-2018-18520 | ||
15 | Upstream-Status: Backport [http://sourceware.org/git/elfutils.git] | ||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
17 | --- | ||
18 | src/size.c | 6 ++++-- | ||
19 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/src/size.c b/src/size.c | ||
22 | index 5ff3f2a..f01fd88 100644 | ||
23 | --- a/src/size.c | ||
24 | +++ b/src/size.c | ||
25 | @@ -374,8 +374,10 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname) | ||
26 | INTERNAL_ERROR (fname); | ||
27 | } | ||
28 | |||
29 | - if (unlikely (elf_end (elf) != 0)) | ||
30 | - INTERNAL_ERROR (fname); | ||
31 | + /* Only close ELF handle if this was a "top level" ar file. */ | ||
32 | + if (prefix == NULL) | ||
33 | + if (unlikely (elf_end (elf) != 0)) | ||
34 | + INTERNAL_ERROR (fname); | ||
35 | |||
36 | return result; | ||
37 | } | ||
38 | -- | ||
39 | 2.7.4 | ||
40 | |||
diff --git a/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch b/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch deleted file mode 100644 index e2966cbea4..0000000000 --- a/meta/recipes-devtools/elfutils/files/0005-fix-a-stack-usage-warning.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 4d7ea681932556ad881f6841de90d0bfff56f8d7 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 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | not use a variable to as a array size, otherwise the warning to error | ||
9 | that | ||
10 | stack usage might be unbounded [-Werror=stack-usage=] will happen | ||
11 | |||
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> | ||
16 | --- | ||
17 | backends/ppc_initreg.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c | ||
21 | index 3e4432f..59c2d97 100644 | ||
22 | --- a/backends/ppc_initreg.c | ||
23 | +++ b/backends/ppc_initreg.c | ||
24 | @@ -94,7 +94,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), | ||
25 | return false; | ||
26 | } | ||
27 | const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr); | ||
28 | - Dwarf_Word dwarf_regs[gprs]; | ||
29 | + Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr)]; | ||
30 | for (unsigned gpr = 0; gpr < gprs; gpr++) | ||
31 | dwarf_regs[gpr] = user_regs.r.gpr[gpr]; | ||
32 | if (! setfunc (0, gprs, dwarf_regs, arg)) | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch index 0f01a3218e..41981f4aad 100644 --- a/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch +++ b/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch | |||
@@ -7,7 +7,7 @@ Subject: [PATCH] build: Provide alternatives for glibc assumptions helps | |||
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.174 | 10 | Rebase to 0.175 |
11 | 11 | ||
12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
13 | --- | 13 | --- |
@@ -129,7 +129,7 @@ index 7bcf61c..c345797 100644 | |||
129 | return elf_errmsg (error & 0xffff); | 129 | return elf_errmsg (error & 0xffff); |
130 | case OTHER_ERROR (LIBDW): | 130 | case OTHER_ERROR (LIBDW): |
131 | diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c | 131 | diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c |
132 | index af6838a..c079d6a 100644 | 132 | index 56e6105..f4a0649 100644 |
133 | --- a/libdwfl/dwfl_module_getdwarf.c | 133 | --- a/libdwfl/dwfl_module_getdwarf.c |
134 | +++ b/libdwfl/dwfl_module_getdwarf.c | 134 | +++ b/libdwfl/dwfl_module_getdwarf.c |
135 | @@ -35,6 +35,7 @@ | 135 | @@ -35,6 +35,7 @@ |
@@ -161,12 +161,12 @@ index f849128..6f0aca1 100644 | |||
161 | #define crc32 __libdwfl_crc32 | 161 | #define crc32 __libdwfl_crc32 |
162 | #include <libdwflP.h> | 162 | #include <libdwflP.h> |
163 | diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c | 163 | diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c |
164 | index 9d0fef2..9fc09b8 100644 | 164 | index 360e4ee..b5aa397 100644 |
165 | --- a/libdwfl/linux-kernel-modules.c | 165 | --- a/libdwfl/linux-kernel-modules.c |
166 | +++ b/libdwfl/linux-kernel-modules.c | 166 | +++ b/libdwfl/linux-kernel-modules.c |
167 | @@ -40,6 +40,7 @@ | 167 | @@ -41,6 +41,7 @@ |
168 | #include <system.h> | ||
169 | 168 | ||
169 | #include "libelfP.h" | ||
170 | #include "libdwflP.h" | 170 | #include "libdwflP.h" |
171 | +#include "system.h" | 171 | +#include "system.h" |
172 | #include <inttypes.h> | 172 | #include <inttypes.h> |
@@ -198,7 +198,7 @@ index 5dc632b..14da1b7 100644 | |||
198 | 198 | ||
199 | #endif /* elf.h */ | 199 | #endif /* elf.h */ |
200 | diff --git a/libelf/libelf.h b/libelf/libelf.h | 200 | diff --git a/libelf/libelf.h b/libelf/libelf.h |
201 | index d11358c..4cf9272 100644 | 201 | index 1ff11c9..c21e018 100644 |
202 | --- a/libelf/libelf.h | 202 | --- a/libelf/libelf.h |
203 | +++ b/libelf/libelf.h | 203 | +++ b/libelf/libelf.h |
204 | @@ -29,6 +29,7 @@ | 204 | @@ -29,6 +29,7 @@ |
@@ -210,7 +210,7 @@ index d11358c..4cf9272 100644 | |||
210 | #include <sys/types.h> | 210 | #include <sys/types.h> |
211 | 211 | ||
212 | diff --git a/libelf/libelfP.h b/libelf/libelfP.h | 212 | diff --git a/libelf/libelfP.h b/libelf/libelfP.h |
213 | index ed216c8..415e6f6 100644 | 213 | index 9f3e8e9..10a347a 100644 |
214 | --- a/libelf/libelfP.h | 214 | --- a/libelf/libelfP.h |
215 | +++ b/libelf/libelfP.h | 215 | +++ b/libelf/libelfP.h |
216 | @@ -32,6 +32,7 @@ | 216 | @@ -32,6 +32,7 @@ |
diff --git a/meta/recipes-devtools/elfutils/files/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 8c48f4d1b1..fa3a3c66b1 100644 --- a/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch +++ b/meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch | |||
@@ -1,6 +1,3 @@ | |||
1 | Upstream-Status: Pending [from debian] | ||
2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | |||
4 | From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001 | 1 | From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001 |
5 | From: James Cowgill <james410@cowgill.org.uk> | 2 | From: James Cowgill <james410@cowgill.org.uk> |
6 | Date: Mon, 5 Jan 2015 15:16:58 +0000 | 3 | Date: Mon, 5 Jan 2015 15:16:58 +0000 |
@@ -11,6 +8,8 @@ from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the | |||
11 | kernel will not load binaries containing it). | 8 | kernel will not load binaries containing it). |
12 | 9 | ||
13 | Signed-off-by: James Cowgill <james410@cowgill.org.uk> | 10 | Signed-off-by: James Cowgill <james410@cowgill.org.uk> |
11 | Upstream-Status: Pending [from debian] | ||
12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
14 | --- | 13 | --- |
15 | backends/mips_init.c | 6 +----- | 14 | backends/mips_init.c | 6 +----- |
16 | 1 file changed, 1 insertion(+), 5 deletions(-) | 15 | 1 file changed, 1 insertion(+), 5 deletions(-) |
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch b/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch deleted file mode 100644 index 0f32b8742c..0000000000 --- a/meta/recipes-devtools/elfutils/files/debian/0001-disable_werror.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 5d45565e71ddab3d7848077b61eb0ca73c0bcbcc Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 29 Jun 2018 16:01:14 +0800 | ||
4 | Subject: [PATCH] disable -Werror as it tends to break with new gcc versions | ||
5 | |||
6 | Bug-Debian: https://bugs.debian.org/886004 | ||
7 | Last-Update: 2018-01-01 | ||
8 | |||
9 | Signed-off-by: Helmut Grohne <helmut@subdivi.de> | ||
10 | |||
11 | Upstream-Status: Pending [from debian] | ||
12 | mdisable_werror.patc and rebase to 0.172 | ||
13 | |||
14 | http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | ||
15 | |||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
17 | --- | ||
18 | config/eu.am | 1 - | ||
19 | 1 file changed, 1 deletion(-) | ||
20 | |||
21 | diff --git a/config/eu.am b/config/eu.am | ||
22 | index c2cc349..99b368e 100644 | ||
23 | --- a/config/eu.am | ||
24 | +++ b/config/eu.am | ||
25 | @@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ | ||
26 | -Wold-style-definition -Wstrict-prototypes \ | ||
27 | $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ | ||
28 | $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ | ||
29 | - $(if $($(*F)_no_Werror),,-Werror) \ | ||
30 | $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ | ||
31 | $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ | ||
32 | $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \ | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch b/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch deleted file mode 100644 index 26869a3a7d..0000000000 --- a/meta/recipes-devtools/elfutils/files/debian/0001-fix-gcc7-ftbfs.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From 91c0a0da2a8932f163d57db5d9d847bed6822502 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 29 Jun 2018 15:59:57 +0800 | ||
4 | Subject: [PATCH] fix gcc7 ftbfs | ||
5 | |||
6 | Upstream-Status: Pending [from debian] | ||
7 | fix-gcc7-ftbfs.diff and rebase to 0.172 | ||
8 | |||
9 | http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
12 | --- | ||
13 | backends/mips_retval.c | 1 + | ||
14 | backends/parisc_retval.c | 1 + | ||
15 | src/ar.c | 2 +- | ||
16 | 3 files changed, 3 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/backends/mips_retval.c b/backends/mips_retval.c | ||
19 | index 57487bb..e7973a8 100644 | ||
20 | --- a/backends/mips_retval.c | ||
21 | +++ b/backends/mips_retval.c | ||
22 | @@ -390,6 +390,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) | ||
23 | } | ||
24 | |||
25 | /* Fallthrough to handle large types */ | ||
26 | + /* Fall through. */ | ||
27 | |||
28 | case DW_TAG_array_type: | ||
29 | large: | ||
30 | diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c | ||
31 | index df7ec3a..988e1fe 100644 | ||
32 | --- a/backends/parisc_retval.c | ||
33 | +++ b/backends/parisc_retval.c | ||
34 | @@ -167,6 +167,7 @@ parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, in | ||
35 | |||
36 | /* Else fall through. */ | ||
37 | } | ||
38 | + /* Fall through. */ | ||
39 | |||
40 | case DW_TAG_structure_type: | ||
41 | case DW_TAG_class_type: | ||
42 | diff --git a/src/ar.c b/src/ar.c | ||
43 | index 818115b..c77e9f4 100644 | ||
44 | --- a/src/ar.c | ||
45 | +++ b/src/ar.c | ||
46 | @@ -1073,7 +1073,7 @@ do_oper_delete (const char *arfname, char **argv, int argc, | ||
47 | static bool | ||
48 | no0print (bool ofmt, char *buf, int bufsize, long int val) | ||
49 | { | ||
50 | - char tmpbuf[bufsize + 1]; | ||
51 | + char tmpbuf[bufsize + 1 + 4]; | ||
52 | int ret = snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", | ||
53 | bufsize, val); | ||
54 | if (ret >= (int) sizeof (tmpbuf)) | ||
55 | -- | ||
56 | 2.7.4 | ||
57 | |||
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch b/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch deleted file mode 100644 index f3ab3da8d2..0000000000 --- a/meta/recipes-devtools/elfutils/files/debian/0001-mips_readelf_w.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From a188ea1ada6b990b72b91266ae02da058dcd9523 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kurt Roeckx <kurt@roeckx.be> | ||
3 | Date: Fri, 29 Jun 2018 15:49:32 +0800 | ||
4 | Subject: [PATCH] Make readelf -w output debug information on mips | ||
5 | |||
6 | Bug-Debian: http://bugs.debian.org/662041 | ||
7 | Forwarded: not-needed | ||
8 | |||
9 | Upstreams wants a change where this is handled by a hook that needs | ||
10 | to be filled in by the backend for the arch. | ||
11 | |||
12 | Signed-off-by: Kurt Roeckx <kurt@roeckx.be> | ||
13 | |||
14 | Upstream-Status: Pending [from debian] | ||
15 | mips_readelf_w.patch and rebase to 0.172 | ||
16 | |||
17 | http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | ||
18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
19 | --- | ||
20 | src/readelf.c | 3 ++- | ||
21 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/src/readelf.c b/src/readelf.c | ||
24 | index f185897..0db197c 100644 | ||
25 | --- a/src/readelf.c | ||
26 | +++ b/src/readelf.c | ||
27 | @@ -10979,7 +10979,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) | ||
28 | GElf_Shdr shdr_mem; | ||
29 | GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); | ||
30 | |||
31 | - if (shdr != NULL && shdr->sh_type == SHT_PROGBITS) | ||
32 | + if (shdr != NULL && ( | ||
33 | + (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF))) | ||
34 | { | ||
35 | static const struct | ||
36 | { | ||
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch b/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch deleted file mode 100644 index f4c6f40fc5..0000000000 --- a/meta/recipes-devtools/elfutils/files/debian/0001-testsuite-ignore-elflint.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From fe7613a3b9f2443cc11917826348d4521f267c96 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 29 Jun 2018 15:48:33 +0800 | ||
4 | Subject: [PATCH] testsuite ignore elflint | ||
5 | |||
6 | On many architectures this test fails because binaries/libs produced by | ||
7 | binutils don't pass elflint. However elfutils shouldn't FTBFS because of this. | ||
8 | |||
9 | So we run the tests on all archs to see what breaks, but if it breaks we ignore | ||
10 | the result (exitcode 77 means: this test was skipped). | ||
11 | |||
12 | Upstream-Status: Pending [from debian] | ||
13 | testsuite-ignore-elflint.diff and rebase to 0.172 | ||
14 | |||
15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
16 | --- | ||
17 | tests/run-elflint-self.sh | 2 +- | ||
18 | tests/test-subr.sh | 15 +++++++++++++++ | ||
19 | 2 files changed, 16 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh | ||
22 | index 58fa7d0..85d21a5 100755 | ||
23 | --- a/tests/run-elflint-self.sh | ||
24 | +++ b/tests/run-elflint-self.sh | ||
25 | @@ -18,5 +18,5 @@ | ||
26 | |||
27 | . $srcdir/test-subr.sh | ||
28 | |||
29 | -testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld | ||
30 | +testrun_on_self_skip ${abs_top_builddir}/src/elflint --quiet --gnu-ld | ||
31 | testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld | ||
32 | diff --git a/tests/test-subr.sh b/tests/test-subr.sh | ||
33 | index 09f428d..26f61f1 100644 | ||
34 | --- a/tests/test-subr.sh | ||
35 | +++ b/tests/test-subr.sh | ||
36 | @@ -201,3 +201,18 @@ testrun_on_self_quiet() | ||
37 | # Only exit if something failed | ||
38 | if test $exit_status != 0; then exit $exit_status; fi | ||
39 | } | ||
40 | + | ||
41 | +# Same as testrun_on_self(), but skip on failure. | ||
42 | +testrun_on_self_skip() | ||
43 | +{ | ||
44 | + exit_status=0 | ||
45 | + | ||
46 | + for file in $self_test_files; do | ||
47 | + testrun $* $file \ | ||
48 | + || { echo "*** failure in $* $file"; exit_status=77; } | ||
49 | + done | ||
50 | + | ||
51 | + # Only exit if something failed | ||
52 | + if test $exit_status != 0; then exit $exit_status; fi | ||
53 | +} | ||
54 | + | ||
55 | -- | ||
56 | 2.7.4 | ||
57 | |||
diff --git a/meta/recipes-devtools/elfutils/files/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 4bdb1ff3cf..1ab704e67b 100644 --- a/meta/recipes-devtools/elfutils/files/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 | |||
@@ -1,12 +1,11 @@ | |||
1 | Upstream-Status: Pending [from debian] | ||
2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | |||
4 | From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001 | 1 | From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001 |
5 | From: James Cowgill <james410@cowgill.org.uk> | 2 | From: James Cowgill <james410@cowgill.org.uk> |
6 | Date: Mon, 5 Jan 2015 15:17:01 +0000 | 3 | Date: Mon, 5 Jan 2015 15:17:01 +0000 |
7 | Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c | 4 | Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c |
8 | 5 | ||
9 | Signed-off-by: James Cowgill <james410@cowgill.org.uk> | 6 | Signed-off-by: James Cowgill <james410@cowgill.org.uk> |
7 | Upstream-Status: Pending [from debian] | ||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
10 | --- | 9 | --- |
11 | backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++----- | 10 | backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++----- |
12 | 1 file changed, 94 insertions(+), 10 deletions(-) | 11 | 1 file changed, 94 insertions(+), 10 deletions(-) |
diff --git a/meta/recipes-devtools/elfutils/files/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 d27ce6dc9c..b196802bc1 100644 --- a/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch +++ b/meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch | |||
@@ -1,6 +1,3 @@ | |||
1 | Upstream-Status: Pending [from debian] | ||
2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | |||
4 | From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001 | 1 | From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001 |
5 | From: James Cowgill <james410@cowgill.org.uk> | 2 | From: James Cowgill <james410@cowgill.org.uk> |
6 | Date: Mon, 5 Jan 2015 15:17:02 +0000 | 3 | Date: Mon, 5 Jan 2015 15:17:02 +0000 |
@@ -15,6 +12,8 @@ This patch also ensures that strip.c sets the correct value of e_machine | |||
15 | before manipulating relocations so that these changes take effect. | 12 | before manipulating relocations so that these changes take effect. |
16 | 13 | ||
17 | Signed-off-by: James Cowgill <james410@cowgill.org.uk> | 14 | Signed-off-by: James Cowgill <james410@cowgill.org.uk> |
15 | Upstream-Status: Pending [from debian] | ||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
18 | --- | 17 | --- |
19 | libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- | 18 | libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- |
20 | libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- | 19 | libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- |
@@ -23,10 +22,10 @@ Signed-off-by: James Cowgill <james410@cowgill.org.uk> | |||
23 | src/strip.c | 17 +++++++++++++++++ | 22 | src/strip.c | 17 +++++++++++++++++ |
24 | 5 files changed, 101 insertions(+), 6 deletions(-) | 23 | 5 files changed, 101 insertions(+), 6 deletions(-) |
25 | 24 | ||
26 | Index: b/libelf/gelf_getrel.c | 25 | Index: elfutils-0.175/libelf/gelf_getrel.c |
27 | =================================================================== | 26 | =================================================================== |
28 | --- a/libelf/gelf_getrel.c | 27 | --- elfutils-0.175.orig/libelf/gelf_getrel.c |
29 | +++ b/libelf/gelf_getrel.c | 28 | +++ elfutils-0.175/libelf/gelf_getrel.c |
30 | @@ -36,6 +36,7 @@ | 29 | @@ -36,6 +36,7 @@ |
31 | 30 | ||
32 | #include "libelfP.h" | 31 | #include "libelfP.h" |
@@ -66,10 +65,10 @@ Index: b/libelf/gelf_getrel.c | |||
66 | } | 65 | } |
67 | 66 | ||
68 | rwlock_unlock (scn->elf->lock); | 67 | rwlock_unlock (scn->elf->lock); |
69 | Index: b/libelf/gelf_getrela.c | 68 | Index: elfutils-0.175/libelf/gelf_getrela.c |
70 | =================================================================== | 69 | =================================================================== |
71 | --- a/libelf/gelf_getrela.c | 70 | --- elfutils-0.175.orig/libelf/gelf_getrela.c |
72 | +++ b/libelf/gelf_getrela.c | 71 | +++ elfutils-0.175/libelf/gelf_getrela.c |
73 | @@ -36,6 +36,7 @@ | 72 | @@ -36,6 +36,7 @@ |
74 | 73 | ||
75 | #include "libelfP.h" | 74 | #include "libelfP.h" |
@@ -109,10 +108,10 @@ Index: b/libelf/gelf_getrela.c | |||
109 | } | 108 | } |
110 | 109 | ||
111 | rwlock_unlock (scn->elf->lock); | 110 | rwlock_unlock (scn->elf->lock); |
112 | Index: b/libelf/gelf_update_rel.c | 111 | Index: elfutils-0.175/libelf/gelf_update_rel.c |
113 | =================================================================== | 112 | =================================================================== |
114 | --- a/libelf/gelf_update_rel.c | 113 | --- elfutils-0.175.orig/libelf/gelf_update_rel.c |
115 | +++ b/libelf/gelf_update_rel.c | 114 | +++ elfutils-0.175/libelf/gelf_update_rel.c |
116 | @@ -36,6 +36,7 @@ | 115 | @@ -36,6 +36,7 @@ |
117 | 116 | ||
118 | #include "libelfP.h" | 117 | #include "libelfP.h" |
@@ -154,10 +153,10 @@ Index: b/libelf/gelf_update_rel.c | |||
154 | } | 153 | } |
155 | 154 | ||
156 | result = 1; | 155 | result = 1; |
157 | Index: b/libelf/gelf_update_rela.c | 156 | Index: elfutils-0.175/libelf/gelf_update_rela.c |
158 | =================================================================== | 157 | =================================================================== |
159 | --- a/libelf/gelf_update_rela.c | 158 | --- elfutils-0.175.orig/libelf/gelf_update_rela.c |
160 | +++ b/libelf/gelf_update_rela.c | 159 | +++ elfutils-0.175/libelf/gelf_update_rela.c |
161 | @@ -36,6 +36,7 @@ | 160 | @@ -36,6 +36,7 @@ |
162 | 161 | ||
163 | #include "libelfP.h" | 162 | #include "libelfP.h" |
@@ -199,11 +198,11 @@ Index: b/libelf/gelf_update_rela.c | |||
199 | } | 198 | } |
200 | 199 | ||
201 | result = 1; | 200 | result = 1; |
202 | Index: b/src/strip.c | 201 | Index: elfutils-0.175/src/strip.c |
203 | =================================================================== | 202 | =================================================================== |
204 | --- a/src/strip.c | 203 | --- elfutils-0.175.orig/src/strip.c |
205 | +++ b/src/strip.c | 204 | +++ elfutils-0.175/src/strip.c |
206 | @@ -598,6 +598,23 @@ handle_elf (int fd, Elf *elf, const char | 205 | @@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char |
207 | goto fail; | 206 | goto fail; |
208 | } | 207 | } |
209 | 208 | ||
@@ -225,5 +224,5 @@ Index: b/src/strip.c | |||
225 | + } | 224 | + } |
226 | + | 225 | + |
227 | /* Copy over the old program header if needed. */ | 226 | /* Copy over the old program header if needed. */ |
228 | if (ehdr->e_type != ET_REL) | 227 | if (phnum > 0) |
229 | for (cnt = 0; cnt < phnum; ++cnt) | 228 | { |
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-arm_backend.patch b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff index 4ed81194b3..f7258a8d22 100644 --- a/meta/recipes-devtools/elfutils/files/debian/0001-arm_backend.patch +++ b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff | |||
@@ -1,30 +1,10 @@ | |||
1 | From a95f370bc2690c150c46f215543de278469900eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 29 Jun 2018 15:42:39 +0800 | ||
4 | Subject: [PATCH] arm_backend | ||
5 | |||
6 | Upstream-Status: Pending [from debian] | 1 | Upstream-Status: Pending [from debian] |
7 | arm_backend.diff and rebase to 0.172 | ||
8 | |||
9 | http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
12 | --- | ||
13 | backends/arm_init.c | 18 ++++- | ||
14 | backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++ | ||
15 | backends/arm_retval.c | 43 +++++++++++- | ||
16 | backends/libebl_arm.h | 9 +++ | ||
17 | libelf/elf.h | 11 +++ | ||
18 | tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++- | ||
19 | tests/run-allregs.sh | 95 +++++++++++++++++++++++++- | ||
20 | tests/run-readelf-mixed-corenote.sh | 11 ++- | ||
21 | 8 files changed, 400 insertions(+), 12 deletions(-) | ||
22 | create mode 100644 backends/libebl_arm.h | ||
23 | 3 | ||
24 | diff --git a/backends/arm_init.c b/backends/arm_init.c | 4 | Index: elfutils-0.175/backends/arm_init.c |
25 | index f2b1b11..1b71f16 100644 | 5 | =================================================================== |
26 | --- a/backends/arm_init.c | 6 | --- elfutils-0.175.orig/backends/arm_init.c |
27 | +++ b/backends/arm_init.c | 7 | +++ elfutils-0.175/backends/arm_init.c |
28 | @@ -35,20 +35,31 @@ | 8 | @@ -35,20 +35,31 @@ |
29 | #define RELOC_PREFIX R_ARM_ | 9 | #define RELOC_PREFIX R_ARM_ |
30 | #include "libebl_CPU.h" | 10 | #include "libebl_CPU.h" |
@@ -58,7 +38,7 @@ index f2b1b11..1b71f16 100644 | |||
58 | /* We handle it. */ | 38 | /* We handle it. */ |
59 | eh->name = "ARM"; | 39 | eh->name = "ARM"; |
60 | arm_init_reloc (eh); | 40 | arm_init_reloc (eh); |
61 | @@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unused)), | 41 | @@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse |
62 | HOOK (eh, core_note); | 42 | HOOK (eh, core_note); |
63 | HOOK (eh, auxv_info); | 43 | HOOK (eh, auxv_info); |
64 | HOOK (eh, check_object_attribute); | 44 | HOOK (eh, check_object_attribute); |
@@ -70,10 +50,10 @@ index f2b1b11..1b71f16 100644 | |||
70 | HOOK (eh, abi_cfi); | 50 | HOOK (eh, abi_cfi); |
71 | HOOK (eh, check_reloc_target_type); | 51 | HOOK (eh, check_reloc_target_type); |
72 | HOOK (eh, symbol_type_name); | 52 | HOOK (eh, symbol_type_name); |
73 | diff --git a/backends/arm_regs.c b/backends/arm_regs.c | 53 | Index: elfutils-0.175/backends/arm_regs.c |
74 | index a46a4c9..418c931 100644 | 54 | =================================================================== |
75 | --- a/backends/arm_regs.c | 55 | --- elfutils-0.175.orig/backends/arm_regs.c |
76 | +++ b/backends/arm_regs.c | 56 | +++ elfutils-0.175/backends/arm_regs.c |
77 | @@ -31,6 +31,7 @@ | 57 | @@ -31,6 +31,7 @@ |
78 | #endif | 58 | #endif |
79 | 59 | ||
@@ -82,7 +62,7 @@ index a46a4c9..418c931 100644 | |||
82 | #include <dwarf.h> | 62 | #include <dwarf.h> |
83 | 63 | ||
84 | #define BACKEND arm_ | 64 | #define BACKEND arm_ |
85 | @@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)), | 65 | @@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_ |
86 | break; | 66 | break; |
87 | 67 | ||
88 | case 16 + 0 ... 16 + 7: | 68 | case 16 + 0 ... 16 + 7: |
@@ -92,7 +72,7 @@ index a46a4c9..418c931 100644 | |||
92 | regno += 96 - 16; | 72 | regno += 96 - 16; |
93 | FALLTHROUGH; | 73 | FALLTHROUGH; |
94 | case 96 + 0 ... 96 + 7: | 74 | case 96 + 0 ... 96 + 7: |
95 | @@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)), | 75 | @@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_ |
96 | namelen = 2; | 76 | namelen = 2; |
97 | break; | 77 | break; |
98 | 78 | ||
@@ -232,10 +212,10 @@ index a46a4c9..418c931 100644 | |||
232 | *setname = "VFP"; | 212 | *setname = "VFP"; |
233 | *type = DW_ATE_float; | 213 | *type = DW_ATE_float; |
234 | *bits = 64; | 214 | *bits = 64; |
235 | diff --git a/backends/arm_retval.c b/backends/arm_retval.c | 215 | Index: elfutils-0.175/backends/arm_retval.c |
236 | index 1c28f01..313e4eb 100644 | 216 | =================================================================== |
237 | --- a/backends/arm_retval.c | 217 | --- elfutils-0.175.orig/backends/arm_retval.c |
238 | +++ b/backends/arm_retval.c | 218 | +++ elfutils-0.175/backends/arm_retval.c |
239 | @@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] = | 219 | @@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] = |
240 | #define nloc_intreg 1 | 220 | #define nloc_intreg 1 |
241 | #define nloc_intregs(n) (2 * (n)) | 221 | #define nloc_intregs(n) (2 * (n)) |
@@ -262,7 +242,7 @@ index 1c28f01..313e4eb 100644 | |||
262 | { | 242 | { |
263 | /* Start with the function's type, and get the DW_AT_type attribute, | 243 | /* Start with the function's type, and get the DW_AT_type attribute, |
264 | which is the type of the return value. */ | 244 | which is the type of the return value. */ |
265 | @@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) | 245 | @@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu |
266 | else | 246 | else |
267 | return -1; | 247 | return -1; |
268 | } | 248 | } |
@@ -284,7 +264,7 @@ index 1c28f01..313e4eb 100644 | |||
284 | if (size <= 16) | 264 | if (size <= 16) |
285 | { | 265 | { |
286 | intreg: | 266 | intreg: |
287 | @@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) | 267 | @@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu |
288 | } | 268 | } |
289 | 269 | ||
290 | aggregate: | 270 | aggregate: |
@@ -292,7 +272,7 @@ index 1c28f01..313e4eb 100644 | |||
292 | *locp = loc_aggregate; | 272 | *locp = loc_aggregate; |
293 | return nloc_aggregate; | 273 | return nloc_aggregate; |
294 | } | 274 | } |
295 | @@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) | 275 | @@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu |
296 | DWARF and might be valid. */ | 276 | DWARF and might be valid. */ |
297 | return -2; | 277 | return -2; |
298 | } | 278 | } |
@@ -311,26 +291,11 @@ index 1c28f01..313e4eb 100644 | |||
311 | + return arm_return_value_location_ (functypedie, locp, 0); | 291 | + return arm_return_value_location_ (functypedie, locp, 0); |
312 | +} | 292 | +} |
313 | + | 293 | + |
314 | diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h | 294 | Index: elfutils-0.175/libelf/elf.h |
315 | new file mode 100644 | 295 | =================================================================== |
316 | index 0000000..c00770c | 296 | --- elfutils-0.175.orig/libelf/elf.h |
317 | --- /dev/null | 297 | +++ elfutils-0.175/libelf/elf.h |
318 | +++ b/backends/libebl_arm.h | 298 | @@ -2694,6 +2694,9 @@ enum |
319 | @@ -0,0 +1,9 @@ | ||
320 | +#ifndef _LIBEBL_ARM_H | ||
321 | +#define _LIBEBL_ARM_H 1 | ||
322 | + | ||
323 | +#include <libdw.h> | ||
324 | + | ||
325 | +extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp); | ||
326 | +extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp); | ||
327 | + | ||
328 | +#endif | ||
329 | diff --git a/libelf/elf.h b/libelf/elf.h | ||
330 | index 6c9f61e..6d82fef 100644 | ||
331 | --- a/libelf/elf.h | ||
332 | +++ b/libelf/elf.h | ||
333 | @@ -2692,6 +2692,9 @@ enum | ||
334 | #define EF_ARM_EABI_VER4 0x04000000 | 299 | #define EF_ARM_EABI_VER4 0x04000000 |
335 | #define EF_ARM_EABI_VER5 0x05000000 | 300 | #define EF_ARM_EABI_VER5 0x05000000 |
336 | 301 | ||
@@ -340,7 +305,7 @@ index 6c9f61e..6d82fef 100644 | |||
340 | /* Additional symbol types for Thumb. */ | 305 | /* Additional symbol types for Thumb. */ |
341 | #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ | 306 | #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ |
342 | #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ | 307 | #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ |
343 | @@ -2709,12 +2712,19 @@ enum | 308 | @@ -2711,12 +2714,19 @@ enum |
344 | 309 | ||
345 | /* Processor specific values for the Phdr p_type field. */ | 310 | /* Processor specific values for the Phdr p_type field. */ |
346 | #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ | 311 | #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ |
@@ -360,7 +325,7 @@ index 6c9f61e..6d82fef 100644 | |||
360 | 325 | ||
361 | /* AArch64 relocs. */ | 326 | /* AArch64 relocs. */ |
362 | 327 | ||
363 | @@ -3007,6 +3017,7 @@ enum | 328 | @@ -3009,6 +3019,7 @@ enum |
364 | TLS block (LDR, STR). */ | 329 | TLS block (LDR, STR). */ |
365 | #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative | 330 | #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative |
366 | to GOT origin (LDR). */ | 331 | to GOT origin (LDR). */ |
@@ -368,121 +333,24 @@ index 6c9f61e..6d82fef 100644 | |||
368 | #define R_ARM_ME_TOO 128 /* Obsolete. */ | 333 | #define R_ARM_ME_TOO 128 /* Obsolete. */ |
369 | #define R_ARM_THM_TLS_DESCSEQ 129 | 334 | #define R_ARM_THM_TLS_DESCSEQ 129 |
370 | #define R_ARM_THM_TLS_DESCSEQ16 129 | 335 | #define R_ARM_THM_TLS_DESCSEQ16 129 |
371 | diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh | 336 | Index: elfutils-0.175/backends/libebl_arm.h |
372 | index fd89d02..462d7c5 100755 | 337 | =================================================================== |
373 | --- a/tests/run-addrcfi.sh | 338 | --- /dev/null |
374 | +++ b/tests/run-addrcfi.sh | 339 | +++ elfutils-0.175/backends/libebl_arm.h |
375 | @@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range | 340 | @@ -0,0 +1,9 @@ |
376 | FPA reg21 (f5): undefined | 341 | +#ifndef _LIBEBL_ARM_H |
377 | FPA reg22 (f6): undefined | 342 | +#define _LIBEBL_ARM_H 1 |
378 | FPA reg23 (f7): undefined | 343 | + |
379 | + VFP reg64 (s0): undefined | 344 | +#include <libdw.h> |
380 | + VFP reg65 (s1): undefined | 345 | + |
381 | + VFP reg66 (s2): undefined | 346 | +extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp); |
382 | + VFP reg67 (s3): undefined | 347 | +extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp); |
383 | + VFP reg68 (s4): undefined | 348 | + |
384 | + VFP reg69 (s5): undefined | 349 | +#endif |
385 | + VFP reg70 (s6): undefined | 350 | Index: elfutils-0.175/tests/run-allregs.sh |
386 | + VFP reg71 (s7): undefined | 351 | =================================================================== |
387 | + VFP reg72 (s8): undefined | 352 | --- elfutils-0.175.orig/tests/run-allregs.sh |
388 | + VFP reg73 (s9): undefined | 353 | +++ elfutils-0.175/tests/run-allregs.sh |
389 | + VFP reg74 (s10): undefined | ||
390 | + VFP reg75 (s11): undefined | ||
391 | + VFP reg76 (s12): undefined | ||
392 | + VFP reg77 (s13): undefined | ||
393 | + VFP reg78 (s14): undefined | ||
394 | + VFP reg79 (s15): undefined | ||
395 | + VFP reg80 (s16): undefined | ||
396 | + VFP reg81 (s17): undefined | ||
397 | + VFP reg82 (s18): undefined | ||
398 | + VFP reg83 (s19): undefined | ||
399 | + VFP reg84 (s20): undefined | ||
400 | + VFP reg85 (s21): undefined | ||
401 | + VFP reg86 (s22): undefined | ||
402 | + VFP reg87 (s23): undefined | ||
403 | + VFP reg88 (s24): undefined | ||
404 | + VFP reg89 (s25): undefined | ||
405 | + VFP reg90 (s26): undefined | ||
406 | + VFP reg91 (s27): undefined | ||
407 | + VFP reg92 (s28): undefined | ||
408 | + VFP reg93 (s29): undefined | ||
409 | + VFP reg94 (s30): undefined | ||
410 | + VFP reg95 (s31): undefined | ||
411 | FPA reg96 (f0): undefined | ||
412 | FPA reg97 (f1): undefined | ||
413 | FPA reg98 (f2): undefined | ||
414 | @@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range | ||
415 | FPA reg101 (f5): undefined | ||
416 | FPA reg102 (f6): undefined | ||
417 | FPA reg103 (f7): undefined | ||
418 | - integer reg128 (spsr): undefined | ||
419 | + MMX reg104 (wcgr0): undefined | ||
420 | + MMX reg105 (wcgr1): undefined | ||
421 | + MMX reg106 (wcgr2): undefined | ||
422 | + MMX reg107 (wcgr3): undefined | ||
423 | + MMX reg108 (wcgr4): undefined | ||
424 | + MMX reg109 (wcgr5): undefined | ||
425 | + MMX reg110 (wcgr6): undefined | ||
426 | + MMX reg111 (wcgr7): undefined | ||
427 | + MMX reg112 (wr0): undefined | ||
428 | + MMX reg113 (wr1): undefined | ||
429 | + MMX reg114 (wr2): undefined | ||
430 | + MMX reg115 (wr3): undefined | ||
431 | + MMX reg116 (wr4): undefined | ||
432 | + MMX reg117 (wr5): undefined | ||
433 | + MMX reg118 (wr6): undefined | ||
434 | + MMX reg119 (wr7): undefined | ||
435 | + MMX reg120 (wr8): undefined | ||
436 | + MMX reg121 (wr9): undefined | ||
437 | + MMX reg122 (wr10): undefined | ||
438 | + MMX reg123 (wr11): undefined | ||
439 | + MMX reg124 (wr12): undefined | ||
440 | + MMX reg125 (wr13): undefined | ||
441 | + MMX reg126 (wr14): undefined | ||
442 | + MMX reg127 (wr15): undefined | ||
443 | + state reg128 (spsr): undefined | ||
444 | + state reg129 (spsr_fiq): undefined | ||
445 | + state reg130 (spsr_irq): undefined | ||
446 | + state reg131 (spsr_abt): undefined | ||
447 | + state reg132 (spsr_und): undefined | ||
448 | + state reg133 (spsr_svc): undefined | ||
449 | + integer reg144 (r8_usr): undefined | ||
450 | + integer reg145 (r9_usr): undefined | ||
451 | + integer reg146 (r10_usr): undefined | ||
452 | + integer reg147 (r11_usr): undefined | ||
453 | + integer reg148 (r12_usr): undefined | ||
454 | + integer reg149 (r13_usr): undefined | ||
455 | + integer reg150 (r14_usr): undefined | ||
456 | + integer reg151 (r8_fiq): undefined | ||
457 | + integer reg152 (r9_fiq): undefined | ||
458 | + integer reg153 (r10_fiq): undefined | ||
459 | + integer reg154 (r11_fiq): undefined | ||
460 | + integer reg155 (r12_fiq): undefined | ||
461 | + integer reg156 (r13_fiq): undefined | ||
462 | + integer reg157 (r14_fiq): undefined | ||
463 | + integer reg158 (r13_irq): undefined | ||
464 | + integer reg159 (r14_irq): undefined | ||
465 | + integer reg160 (r13_abt): undefined | ||
466 | + integer reg161 (r14_abt): undefined | ||
467 | + integer reg162 (r13_und): undefined | ||
468 | + integer reg163 (r14_und): undefined | ||
469 | + integer reg164 (r13_svc): undefined | ||
470 | + integer reg165 (r14_svc): undefined | ||
471 | + MMX reg192 (wc0): undefined | ||
472 | + MMX reg193 (wc1): undefined | ||
473 | + MMX reg194 (wc2): undefined | ||
474 | + MMX reg195 (wc3): undefined | ||
475 | + MMX reg196 (wc4): undefined | ||
476 | + MMX reg197 (wc5): undefined | ||
477 | + MMX reg198 (wc6): undefined | ||
478 | + MMX reg199 (wc7): undefined | ||
479 | VFP reg256 (d0): undefined | ||
480 | VFP reg257 (d1): undefined | ||
481 | VFP reg258 (d2): undefined | ||
482 | diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh | ||
483 | index 7ddd452..a31dba4 100755 | ||
484 | --- a/tests/run-allregs.sh | ||
485 | +++ b/tests/run-allregs.sh | ||
486 | @@ -2672,7 +2672,28 @@ integer registers: | 354 | @@ -2672,7 +2672,28 @@ integer registers: |
487 | 13: sp (sp), address 32 bits | 355 | 13: sp (sp), address 32 bits |
488 | 14: lr (lr), address 32 bits | 356 | 14: lr (lr), address 32 bits |
@@ -600,11 +468,11 @@ index 7ddd452..a31dba4 100755 | |||
600 | EOF | 468 | EOF |
601 | 469 | ||
602 | # See run-readelf-mixed-corenote.sh for instructions to regenerate | 470 | # See run-readelf-mixed-corenote.sh for instructions to regenerate |
603 | diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh | 471 | Index: elfutils-0.175/tests/run-readelf-mixed-corenote.sh |
604 | index 86171c4..018612f 100755 | 472 | =================================================================== |
605 | --- a/tests/run-readelf-mixed-corenote.sh | 473 | --- elfutils-0.175.orig/tests/run-readelf-mixed-corenote.sh |
606 | +++ b/tests/run-readelf-mixed-corenote.sh | 474 | +++ elfutils-0.175/tests/run-readelf-mixed-corenote.sh |
607 | @@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x274: | 475 | @@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27 |
608 | pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 | 476 | pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 |
609 | utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000 | 477 | utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000 |
610 | orig_r0: -1, fpvalid: 1 | 478 | orig_r0: -1, fpvalid: 1 |
@@ -622,6 +490,114 @@ index 86171c4..018612f 100755 | |||
622 | CORE 124 PRPSINFO | 490 | CORE 124 PRPSINFO |
623 | state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 | 491 | state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 |
624 | uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 | 492 | uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 |
625 | -- | 493 | Index: elfutils-0.175/tests/run-addrcfi.sh |
626 | 2.7.4 | 494 | =================================================================== |
627 | 495 | --- elfutils-0.175.orig/tests/run-addrcfi.sh | |
496 | +++ elfutils-0.175/tests/run-addrcfi.sh | ||
497 | @@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc | ||
498 | FPA reg21 (f5): undefined | ||
499 | FPA reg22 (f6): undefined | ||
500 | FPA reg23 (f7): undefined | ||
501 | + VFP reg64 (s0): undefined | ||
502 | + VFP reg65 (s1): undefined | ||
503 | + VFP reg66 (s2): undefined | ||
504 | + VFP reg67 (s3): undefined | ||
505 | + VFP reg68 (s4): undefined | ||
506 | + VFP reg69 (s5): undefined | ||
507 | + VFP reg70 (s6): undefined | ||
508 | + VFP reg71 (s7): undefined | ||
509 | + VFP reg72 (s8): undefined | ||
510 | + VFP reg73 (s9): undefined | ||
511 | + VFP reg74 (s10): undefined | ||
512 | + VFP reg75 (s11): undefined | ||
513 | + VFP reg76 (s12): undefined | ||
514 | + VFP reg77 (s13): undefined | ||
515 | + VFP reg78 (s14): undefined | ||
516 | + VFP reg79 (s15): undefined | ||
517 | + VFP reg80 (s16): undefined | ||
518 | + VFP reg81 (s17): undefined | ||
519 | + VFP reg82 (s18): undefined | ||
520 | + VFP reg83 (s19): undefined | ||
521 | + VFP reg84 (s20): undefined | ||
522 | + VFP reg85 (s21): undefined | ||
523 | + VFP reg86 (s22): undefined | ||
524 | + VFP reg87 (s23): undefined | ||
525 | + VFP reg88 (s24): undefined | ||
526 | + VFP reg89 (s25): undefined | ||
527 | + VFP reg90 (s26): undefined | ||
528 | + VFP reg91 (s27): undefined | ||
529 | + VFP reg92 (s28): undefined | ||
530 | + VFP reg93 (s29): undefined | ||
531 | + VFP reg94 (s30): undefined | ||
532 | + VFP reg95 (s31): undefined | ||
533 | FPA reg96 (f0): undefined | ||
534 | FPA reg97 (f1): undefined | ||
535 | FPA reg98 (f2): undefined | ||
536 | @@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc | ||
537 | FPA reg101 (f5): undefined | ||
538 | FPA reg102 (f6): undefined | ||
539 | FPA reg103 (f7): undefined | ||
540 | - integer reg128 (spsr): undefined | ||
541 | + MMX reg104 (wcgr0): undefined | ||
542 | + MMX reg105 (wcgr1): undefined | ||
543 | + MMX reg106 (wcgr2): undefined | ||
544 | + MMX reg107 (wcgr3): undefined | ||
545 | + MMX reg108 (wcgr4): undefined | ||
546 | + MMX reg109 (wcgr5): undefined | ||
547 | + MMX reg110 (wcgr6): undefined | ||
548 | + MMX reg111 (wcgr7): undefined | ||
549 | + MMX reg112 (wr0): undefined | ||
550 | + MMX reg113 (wr1): undefined | ||
551 | + MMX reg114 (wr2): undefined | ||
552 | + MMX reg115 (wr3): undefined | ||
553 | + MMX reg116 (wr4): undefined | ||
554 | + MMX reg117 (wr5): undefined | ||
555 | + MMX reg118 (wr6): undefined | ||
556 | + MMX reg119 (wr7): undefined | ||
557 | + MMX reg120 (wr8): undefined | ||
558 | + MMX reg121 (wr9): undefined | ||
559 | + MMX reg122 (wr10): undefined | ||
560 | + MMX reg123 (wr11): undefined | ||
561 | + MMX reg124 (wr12): undefined | ||
562 | + MMX reg125 (wr13): undefined | ||
563 | + MMX reg126 (wr14): undefined | ||
564 | + MMX reg127 (wr15): undefined | ||
565 | + state reg128 (spsr): undefined | ||
566 | + state reg129 (spsr_fiq): undefined | ||
567 | + state reg130 (spsr_irq): undefined | ||
568 | + state reg131 (spsr_abt): undefined | ||
569 | + state reg132 (spsr_und): undefined | ||
570 | + state reg133 (spsr_svc): undefined | ||
571 | + integer reg144 (r8_usr): undefined | ||
572 | + integer reg145 (r9_usr): undefined | ||
573 | + integer reg146 (r10_usr): undefined | ||
574 | + integer reg147 (r11_usr): undefined | ||
575 | + integer reg148 (r12_usr): undefined | ||
576 | + integer reg149 (r13_usr): undefined | ||
577 | + integer reg150 (r14_usr): undefined | ||
578 | + integer reg151 (r8_fiq): undefined | ||
579 | + integer reg152 (r9_fiq): undefined | ||
580 | + integer reg153 (r10_fiq): undefined | ||
581 | + integer reg154 (r11_fiq): undefined | ||
582 | + integer reg155 (r12_fiq): undefined | ||
583 | + integer reg156 (r13_fiq): undefined | ||
584 | + integer reg157 (r14_fiq): undefined | ||
585 | + integer reg158 (r13_irq): undefined | ||
586 | + integer reg159 (r14_irq): undefined | ||
587 | + integer reg160 (r13_abt): undefined | ||
588 | + integer reg161 (r14_abt): undefined | ||
589 | + integer reg162 (r13_und): undefined | ||
590 | + integer reg163 (r14_und): undefined | ||
591 | + integer reg164 (r13_svc): undefined | ||
592 | + integer reg165 (r14_svc): undefined | ||
593 | + MMX reg192 (wc0): undefined | ||
594 | + MMX reg193 (wc1): undefined | ||
595 | + MMX reg194 (wc2): undefined | ||
596 | + MMX reg195 (wc3): undefined | ||
597 | + MMX reg196 (wc4): undefined | ||
598 | + MMX reg197 (wc5): undefined | ||
599 | + MMX reg198 (wc6): undefined | ||
600 | + MMX reg199 (wc7): undefined | ||
601 | VFP reg256 (d0): undefined | ||
602 | VFP reg257 (d1): undefined | ||
603 | VFP reg258 (d2): undefined | ||
diff --git a/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch b/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch new file mode 100644 index 0000000000..75736bff08 --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | From: Helmut Grohne <helmut@subdivi.de> | ||
2 | Subject: disable -Werror as it tends to break with new gcc versions | ||
3 | Bug-Debian: https://bugs.debian.org/886004 | ||
4 | Last-Update: 2018-01-01 | ||
5 | |||
6 | Upstream-Status: Pending [from debian] | ||
7 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
8 | |||
9 | Index: elfutils-0.175/config/eu.am | ||
10 | =================================================================== | ||
11 | --- elfutils-0.175.orig/config/eu.am | ||
12 | +++ elfutils-0.175/config/eu.am | ||
13 | @@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -W | ||
14 | -Wold-style-definition -Wstrict-prototypes \ | ||
15 | $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ | ||
16 | $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ | ||
17 | - $(if $($(*F)_no_Werror),,-Werror) \ | ||
18 | $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ | ||
19 | $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ | ||
20 | $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \ | ||
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-hppa_backend.patch b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff index 2c5d4fa4ba..105e3f430d 100644 --- a/meta/recipes-devtools/elfutils/files/debian/0001-hppa_backend.patch +++ b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff | |||
@@ -1,84 +1,10 @@ | |||
1 | From c510c6c8523246dd79c6ea28d1646b153c23e491 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 29 Jun 2018 15:39:46 +0800 | ||
4 | Subject: [PATCH] hppa_backend | ||
5 | |||
6 | Upstream-Status: Pending [from debian] | 1 | Upstream-Status: Pending [from debian] |
7 | hppa_backend.diff and rebase to 0.172 | ||
8 | |||
9 | http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | ||
10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
11 | --- | ||
12 | backends/Makefile.am | 9 +- | ||
13 | backends/libebl_parisc.h | 9 ++ | ||
14 | backends/parisc_init.c | 73 ++++++++++++++++ | ||
15 | backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++ | ||
16 | backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++ | ||
17 | backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
18 | backends/parisc_symbol.c | 112 ++++++++++++++++++++++++ | ||
19 | libelf/elf.h | 11 +++ | ||
20 | 8 files changed, 711 insertions(+), 3 deletions(-) | ||
21 | create mode 100644 backends/libebl_parisc.h | ||
22 | create mode 100644 backends/parisc_init.c | ||
23 | create mode 100644 backends/parisc_regs.c | ||
24 | create mode 100644 backends/parisc_reloc.def | ||
25 | create mode 100644 backends/parisc_retval.c | ||
26 | create mode 100644 backends/parisc_symbol.c | ||
27 | 3 | ||
28 | diff --git a/backends/Makefile.am b/backends/Makefile.am | 4 | Index: elfutils-0.175/backends/parisc_init.c |
29 | index 80aa00e..1e4b8e9 100644 | 5 | =================================================================== |
30 | --- a/backends/Makefile.am | ||
31 | +++ b/backends/Makefile.am | ||
32 | @@ -33,16 +33,16 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ | ||
33 | |||
34 | |||
35 | modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ | ||
36 | - tilegx m68k bpf riscv | ||
37 | + tilegx m68k bpf riscv parisc | ||
38 | libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ | ||
39 | libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ | ||
40 | libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ | ||
41 | libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ | ||
42 | - libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a | ||
43 | + libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ | ||
44 | + libebl_parisc_pic.a | ||
45 | noinst_LIBRARIES = $(libebl_pic) | ||
46 | noinst_DATA = $(libebl_pic:_pic.a=.so) | ||
47 | |||
48 | - | ||
49 | libelf = ../libelf/libelf.so | ||
50 | libdw = ../libdw/libdw.so | ||
51 | libeu = ../lib/libeu.a | ||
52 | @@ -135,6 +135,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c | ||
53 | libebl_riscv_pic_a_SOURCES = $(riscv_SRCS) | ||
54 | am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os) | ||
55 | |||
56 | +parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c | ||
57 | +libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) | ||
58 | +am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) | ||
59 | |||
60 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) | ||
61 | @rm -f $(@:.so=.map) | ||
62 | diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h | ||
63 | new file mode 100644 | ||
64 | index 0000000..f473b79 | ||
65 | --- /dev/null | ||
66 | +++ b/backends/libebl_parisc.h | ||
67 | @@ -0,0 +1,9 @@ | ||
68 | +#ifndef _LIBEBL_HPPA_H | ||
69 | +#define _LIBEBL_HPPA_H 1 | ||
70 | + | ||
71 | +#include <libdw.h> | ||
72 | + | ||
73 | +extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp); | ||
74 | +extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp); | ||
75 | + | ||
76 | +#endif | ||
77 | diff --git a/backends/parisc_init.c b/backends/parisc_init.c | ||
78 | new file mode 100644 | ||
79 | index 0000000..f1e401c | ||
80 | --- /dev/null | 6 | --- /dev/null |
81 | +++ b/backends/parisc_init.c | 7 | +++ elfutils-0.175/backends/parisc_init.c |
82 | @@ -0,0 +1,73 @@ | 8 | @@ -0,0 +1,73 @@ |
83 | +/* Initialization of PA-RISC specific backend library. | 9 | +/* Initialization of PA-RISC specific backend library. |
84 | + Copyright (C) 2002, 2005, 2006 Red Hat, Inc. | 10 | + Copyright (C) 2002, 2005, 2006 Red Hat, Inc. |
@@ -153,11 +79,10 @@ index 0000000..f1e401c | |||
153 | + | 79 | + |
154 | + return MODVERSION; | 80 | + return MODVERSION; |
155 | +} | 81 | +} |
156 | diff --git a/backends/parisc_regs.c b/backends/parisc_regs.c | 82 | Index: elfutils-0.175/backends/parisc_regs.c |
157 | new file mode 100644 | 83 | =================================================================== |
158 | index 0000000..3895f8e | ||
159 | --- /dev/null | 84 | --- /dev/null |
160 | +++ b/backends/parisc_regs.c | 85 | +++ elfutils-0.175/backends/parisc_regs.c |
161 | @@ -0,0 +1,159 @@ | 86 | @@ -0,0 +1,159 @@ |
162 | +/* Register names and numbers for PA-RISC DWARF. | 87 | +/* Register names and numbers for PA-RISC DWARF. |
163 | + Copyright (C) 2005, 2006 Red Hat, Inc. | 88 | + Copyright (C) 2005, 2006 Red Hat, Inc. |
@@ -318,11 +243,10 @@ index 0000000..3895f8e | |||
318 | + name[namelen++] = '\0'; | 243 | + name[namelen++] = '\0'; |
319 | + return namelen; | 244 | + return namelen; |
320 | +} | 245 | +} |
321 | diff --git a/backends/parisc_reloc.def b/backends/parisc_reloc.def | 246 | Index: elfutils-0.175/backends/parisc_reloc.def |
322 | new file mode 100644 | 247 | =================================================================== |
323 | index 0000000..1f875ba | ||
324 | --- /dev/null | 248 | --- /dev/null |
325 | +++ b/backends/parisc_reloc.def | 249 | +++ elfutils-0.175/backends/parisc_reloc.def |
326 | @@ -0,0 +1,128 @@ | 250 | @@ -0,0 +1,128 @@ |
327 | +/* List the relocation types for PA-RISC. -*- C -*- | 251 | +/* List the relocation types for PA-RISC. -*- C -*- |
328 | + Copyright (C) 2005 Red Hat, Inc. | 252 | + Copyright (C) 2005 Red Hat, Inc. |
@@ -452,11 +376,10 @@ index 0000000..1f875ba | |||
452 | +RELOC_TYPE (TLS_DTPMOD64, DYN) | 376 | +RELOC_TYPE (TLS_DTPMOD64, DYN) |
453 | + | 377 | + |
454 | +#define NO_RELATIVE_RELOC 1 | 378 | +#define NO_RELATIVE_RELOC 1 |
455 | diff --git a/backends/parisc_retval.c b/backends/parisc_retval.c | 379 | Index: elfutils-0.175/backends/parisc_retval.c |
456 | new file mode 100644 | 380 | =================================================================== |
457 | index 0000000..df7ec3a | ||
458 | --- /dev/null | 381 | --- /dev/null |
459 | +++ b/backends/parisc_retval.c | 382 | +++ elfutils-0.175/backends/parisc_retval.c |
460 | @@ -0,0 +1,213 @@ | 383 | @@ -0,0 +1,213 @@ |
461 | +/* Function return value location for Linux/PA-RISC ABI. | 384 | +/* Function return value location for Linux/PA-RISC ABI. |
462 | + Copyright (C) 2005 Red Hat, Inc. | 385 | + Copyright (C) 2005 Red Hat, Inc. |
@@ -671,12 +594,11 @@ index 0000000..df7ec3a | |||
671 | + return parisc_return_value_location_ (functypedie, locp, 1); | 594 | + return parisc_return_value_location_ (functypedie, locp, 1); |
672 | +} | 595 | +} |
673 | + | 596 | + |
674 | diff --git a/backends/parisc_symbol.c b/backends/parisc_symbol.c | 597 | Index: elfutils-0.175/backends/parisc_symbol.c |
675 | new file mode 100644 | 598 | =================================================================== |
676 | index 0000000..d111a76 | ||
677 | --- /dev/null | 599 | --- /dev/null |
678 | +++ b/backends/parisc_symbol.c | 600 | +++ elfutils-0.175/backends/parisc_symbol.c |
679 | @@ -0,0 +1,112 @@ | 601 | @@ -0,0 +1,113 @@ |
680 | +/* PA-RISC specific symbolic name handling. | 602 | +/* PA-RISC specific symbolic name handling. |
681 | + Copyright (C) 2002, 2005 Red Hat, Inc. | 603 | + Copyright (C) 2002, 2005 Red Hat, Inc. |
682 | + This file is part of Red Hat elfutils. | 604 | + This file is part of Red Hat elfutils. |
@@ -775,7 +697,8 @@ index 0000000..d111a76 | |||
775 | + | 697 | + |
776 | +/* Check for the simple reloc types. */ | 698 | +/* Check for the simple reloc types. */ |
777 | +Elf_Type | 699 | +Elf_Type |
778 | +parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) | 700 | +parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, |
701 | + int *addsub __attribute__ ((unused))) | ||
779 | +{ | 702 | +{ |
780 | + switch (type) | 703 | + switch (type) |
781 | + { | 704 | + { |
@@ -789,11 +712,55 @@ index 0000000..d111a76 | |||
789 | + return ELF_T_NUM; | 712 | + return ELF_T_NUM; |
790 | + } | 713 | + } |
791 | +} | 714 | +} |
792 | diff --git a/libelf/elf.h b/libelf/elf.h | 715 | Index: elfutils-0.175/backends/libebl_parisc.h |
793 | index f774898..6c9f61e 100644 | 716 | =================================================================== |
794 | --- a/libelf/elf.h | 717 | --- /dev/null |
795 | +++ b/libelf/elf.h | 718 | +++ elfutils-0.175/backends/libebl_parisc.h |
796 | @@ -2153,16 +2153,24 @@ enum | 719 | @@ -0,0 +1,9 @@ |
720 | +#ifndef _LIBEBL_HPPA_H | ||
721 | +#define _LIBEBL_HPPA_H 1 | ||
722 | + | ||
723 | +#include <libdw.h> | ||
724 | + | ||
725 | +extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp); | ||
726 | +extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp); | ||
727 | + | ||
728 | +#endif | ||
729 | Index: elfutils-0.175/backends/Makefile.am | ||
730 | =================================================================== | ||
731 | --- elfutils-0.175.orig/backends/Makefile.am | ||
732 | +++ elfutils-0.175/backends/Makefile.am | ||
733 | @@ -33,12 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I | ||
734 | |||
735 | |||
736 | modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ | ||
737 | - tilegx m68k bpf riscv | ||
738 | + tilegx m68k bpf riscv parisc | ||
739 | libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ | ||
740 | libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ | ||
741 | libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ | ||
742 | libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ | ||
743 | - libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a | ||
744 | + libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ | ||
745 | + libebl_parisc_pic.a | ||
746 | noinst_LIBRARIES = $(libebl_pic) | ||
747 | noinst_DATA = $(libebl_pic:_pic.a=.so) | ||
748 | |||
749 | @@ -136,6 +137,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c | ||
750 | libebl_riscv_pic_a_SOURCES = $(riscv_SRCS) | ||
751 | am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os) | ||
752 | |||
753 | +parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c | ||
754 | +libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) | ||
755 | +am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) | ||
756 | |||
757 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) | ||
758 | @rm -f $(@:.so=.map) | ||
759 | Index: elfutils-0.175/libelf/elf.h | ||
760 | =================================================================== | ||
761 | --- elfutils-0.175.orig/libelf/elf.h | ||
762 | +++ elfutils-0.175/libelf/elf.h | ||
763 | @@ -2155,16 +2155,24 @@ enum | ||
797 | #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ | 764 | #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ |
798 | #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ | 765 | #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ |
799 | #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ | 766 | #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ |
@@ -818,7 +785,7 @@ index f774898..6c9f61e 100644 | |||
818 | #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ | 785 | #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ |
819 | #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ | 786 | #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ |
820 | #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ | 787 | #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ |
821 | @@ -2171,6 +2179,7 @@ enum | 788 | @@ -2173,6 +2181,7 @@ enum |
822 | #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ | 789 | #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ |
823 | #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ | 790 | #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ |
824 | #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ | 791 | #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ |
@@ -826,7 +793,7 @@ index f774898..6c9f61e 100644 | |||
826 | #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ | 793 | #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ |
827 | #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ | 794 | #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ |
828 | #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ | 795 | #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ |
829 | @@ -2196,6 +2205,8 @@ enum | 796 | @@ -2198,6 +2207,8 @@ enum |
830 | #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ | 797 | #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ |
831 | #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ | 798 | #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ |
832 | #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ | 799 | #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ |
@@ -835,6 +802,3 @@ index f774898..6c9f61e 100644 | |||
835 | #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ | 802 | #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ |
836 | #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ | 803 | #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ |
837 | #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ | 804 | #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ |
838 | -- | ||
839 | 2.7.4 | ||
840 | |||
diff --git a/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch b/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch new file mode 100644 index 0000000000..8fa35a4523 --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Pending [from debian] | ||
2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Index: elfutils-0.165/tests/run-native-test.sh | ||
4 | =================================================================== | ||
5 | --- elfutils-0.165.orig/tests/run-native-test.sh | ||
6 | +++ elfutils-0.165/tests/run-native-test.sh | ||
7 | @@ -83,6 +83,9 @@ native_test() | ||
8 | # "cannot attach to process: Function not implemented". | ||
9 | [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 | ||
10 | |||
11 | +# hurd's /proc/$PID/maps does not give paths yet. | ||
12 | +[ "$(uname)" = "GNU" ] && exit 77 | ||
13 | + | ||
14 | native_test ${abs_builddir}/allregs | ||
15 | native_test ${abs_builddir}/funcretval | ||
16 | |||
diff --git a/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch b/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch new file mode 100644 index 0000000000..fe5159f3c2 --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Upstream-Status: Pending [from debian] | ||
2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Index: b/tests/run-native-test.sh | ||
4 | =================================================================== | ||
5 | --- a/tests/run-native-test.sh | ||
6 | +++ b/tests/run-native-test.sh | ||
7 | @@ -77,6 +77,12 @@ native_test() | ||
8 | test $native -eq 0 || testrun "$@" -p $native > /dev/null | ||
9 | } | ||
10 | |||
11 | +# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does | ||
12 | +# not give absolute paths due to sbuild's bind mounts (bug #570805) | ||
13 | +# therefore the next two test programs are expected to fail with | ||
14 | +# "cannot attach to process: Function not implemented". | ||
15 | +[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 | ||
16 | + | ||
17 | native_test ${abs_builddir}/allregs | ||
18 | native_test ${abs_builddir}/funcretval | ||
19 | |||
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-mips_backend.patch b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff index d04da72cc5..998fa04dc8 100644 --- a/meta/recipes-devtools/elfutils/files/debian/0001-mips_backend.patch +++ b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff | |||
@@ -1,65 +1,9 @@ | |||
1 | From 59ffb86bda845a68d3686afa7bc784131df678f7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 29 Jun 2018 15:45:58 +0800 | ||
4 | Subject: [PATCH] mips_backend | ||
5 | |||
6 | Upstream-Status: Pending [from debian] | 1 | Upstream-Status: Pending [from debian] |
7 | mips_backend.diff and rebase to 0.172 | ||
8 | |||
9 | http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.170-0.5.debian.tar.xz | ||
10 | |||
11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 2 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
12 | --- | 3 | Index: elfutils-0.175/backends/mips_init.c |
13 | backends/Makefile.am | 8 +- | 4 | =================================================================== |
14 | backends/mips_init.c | 59 +++++++++ | ||
15 | backends/mips_regs.c | 104 ++++++++++++++++ | ||
16 | backends/mips_reloc.def | 79 ++++++++++++ | ||
17 | backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++ | ||
18 | backends/mips_symbol.c | 52 ++++++++ | ||
19 | libebl/eblopenbackend.c | 2 + | ||
20 | 7 files changed, 623 insertions(+), 2 deletions(-) | ||
21 | create mode 100644 backends/mips_init.c | ||
22 | create mode 100644 backends/mips_regs.c | ||
23 | create mode 100644 backends/mips_reloc.def | ||
24 | create mode 100644 backends/mips_retval.c | ||
25 | create mode 100644 backends/mips_symbol.c | ||
26 | |||
27 | diff --git a/backends/Makefile.am b/backends/Makefile.am | ||
28 | index 1e4b8e9..e7bccf8 100644 | ||
29 | --- a/backends/Makefile.am | ||
30 | +++ b/backends/Makefile.am | ||
31 | @@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ | ||
32 | |||
33 | |||
34 | modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ | ||
35 | - tilegx m68k bpf riscv parisc | ||
36 | + tilegx m68k bpf riscv parisc mips | ||
37 | libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ | ||
38 | libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ | ||
39 | libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ | ||
40 | libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ | ||
41 | libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ | ||
42 | - libebl_parisc_pic.a | ||
43 | + libebl_parisc_pic.a libebl_mips_pic.a | ||
44 | noinst_LIBRARIES = $(libebl_pic) | ||
45 | noinst_DATA = $(libebl_pic:_pic.a=.so) | ||
46 | |||
47 | @@ -139,6 +139,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c | ||
48 | libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) | ||
49 | am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) | ||
50 | |||
51 | +mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c | ||
52 | +libebl_mips_pic_a_SOURCES = $(mips_SRCS) | ||
53 | +am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) | ||
54 | + | ||
55 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) | ||
56 | @rm -f $(@:.so=.map) | ||
57 | $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ | ||
58 | diff --git a/backends/mips_init.c b/backends/mips_init.c | ||
59 | new file mode 100644 | ||
60 | index 0000000..975c04e | ||
61 | --- /dev/null | 5 | --- /dev/null |
62 | +++ b/backends/mips_init.c | 6 | +++ elfutils-0.175/backends/mips_init.c |
63 | @@ -0,0 +1,59 @@ | 7 | @@ -0,0 +1,59 @@ |
64 | +/* Initialization of mips specific backend library. | 8 | +/* Initialization of mips specific backend library. |
65 | + Copyright (C) 2006 Red Hat, Inc. | 9 | + Copyright (C) 2006 Red Hat, Inc. |
@@ -120,11 +64,10 @@ index 0000000..975c04e | |||
120 | + | 64 | + |
121 | + return MODVERSION; | 65 | + return MODVERSION; |
122 | +} | 66 | +} |
123 | diff --git a/backends/mips_regs.c b/backends/mips_regs.c | 67 | Index: elfutils-0.175/backends/mips_regs.c |
124 | new file mode 100644 | 68 | =================================================================== |
125 | index 0000000..44f86cb | ||
126 | --- /dev/null | 69 | --- /dev/null |
127 | +++ b/backends/mips_regs.c | 70 | +++ elfutils-0.175/backends/mips_regs.c |
128 | @@ -0,0 +1,104 @@ | 71 | @@ -0,0 +1,104 @@ |
129 | +/* Register names and numbers for MIPS DWARF. | 72 | +/* Register names and numbers for MIPS DWARF. |
130 | + Copyright (C) 2006 Red Hat, Inc. | 73 | + Copyright (C) 2006 Red Hat, Inc. |
@@ -230,11 +173,10 @@ index 0000000..44f86cb | |||
230 | + name[namelen++] = '\0'; | 173 | + name[namelen++] = '\0'; |
231 | + return namelen; | 174 | + return namelen; |
232 | +} | 175 | +} |
233 | diff --git a/backends/mips_reloc.def b/backends/mips_reloc.def | 176 | Index: elfutils-0.175/backends/mips_reloc.def |
234 | new file mode 100644 | 177 | =================================================================== |
235 | index 0000000..4579970 | ||
236 | --- /dev/null | 178 | --- /dev/null |
237 | +++ b/backends/mips_reloc.def | 179 | +++ elfutils-0.175/backends/mips_reloc.def |
238 | @@ -0,0 +1,79 @@ | 180 | @@ -0,0 +1,79 @@ |
239 | +/* List the relocation types for mips. -*- C -*- | 181 | +/* List the relocation types for mips. -*- C -*- |
240 | + Copyright (C) 2006 Red Hat, Inc. | 182 | + Copyright (C) 2006 Red Hat, Inc. |
@@ -315,11 +257,10 @@ index 0000000..4579970 | |||
315 | + | 257 | + |
316 | +#define NO_COPY_RELOC 1 | 258 | +#define NO_COPY_RELOC 1 |
317 | +#define NO_RELATIVE_RELOC 1 | 259 | +#define NO_RELATIVE_RELOC 1 |
318 | diff --git a/backends/mips_retval.c b/backends/mips_retval.c | 260 | Index: elfutils-0.175/backends/mips_retval.c |
319 | new file mode 100644 | 261 | =================================================================== |
320 | index 0000000..656cd1f | ||
321 | --- /dev/null | 262 | --- /dev/null |
322 | +++ b/backends/mips_retval.c | 263 | +++ elfutils-0.175/backends/mips_retval.c |
323 | @@ -0,0 +1,321 @@ | 264 | @@ -0,0 +1,321 @@ |
324 | +/* Function return value location for Linux/mips ABI. | 265 | +/* Function return value location for Linux/mips ABI. |
325 | + Copyright (C) 2005 Red Hat, Inc. | 266 | + Copyright (C) 2005 Red Hat, Inc. |
@@ -642,12 +583,11 @@ index 0000000..656cd1f | |||
642 | + DWARF and might be valid. */ | 583 | + DWARF and might be valid. */ |
643 | + return -2; | 584 | + return -2; |
644 | +} | 585 | +} |
645 | diff --git a/backends/mips_symbol.c b/backends/mips_symbol.c | 586 | Index: elfutils-0.175/backends/mips_symbol.c |
646 | new file mode 100644 | 587 | =================================================================== |
647 | index 0000000..ba465fe | ||
648 | --- /dev/null | 588 | --- /dev/null |
649 | +++ b/backends/mips_symbol.c | 589 | +++ elfutils-0.175/backends/mips_symbol.c |
650 | @@ -0,0 +1,52 @@ | 590 | @@ -0,0 +1,53 @@ |
651 | +/* MIPS specific symbolic name handling. | 591 | +/* MIPS specific symbolic name handling. |
652 | + Copyright (C) 2002, 2003, 2005 Red Hat, Inc. | 592 | + Copyright (C) 2002, 2003, 2005 Red Hat, Inc. |
653 | + This file is part of Red Hat elfutils. | 593 | + This file is part of Red Hat elfutils. |
@@ -686,7 +626,8 @@ index 0000000..ba465fe | |||
686 | + | 626 | + |
687 | +/* Check for the simple reloc types. */ | 627 | +/* Check for the simple reloc types. */ |
688 | +Elf_Type | 628 | +Elf_Type |
689 | +mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) | 629 | +mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type, |
630 | + int *addsub __attribute__ ((unused))) | ||
690 | +{ | 631 | +{ |
691 | + switch (type) | 632 | + switch (type) |
692 | + { | 633 | + { |
@@ -700,11 +641,11 @@ index 0000000..ba465fe | |||
700 | + return ELF_T_NUM; | 641 | + return ELF_T_NUM; |
701 | + } | 642 | + } |
702 | +} | 643 | +} |
703 | diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c | 644 | Index: elfutils-0.175/libebl/eblopenbackend.c |
704 | index 8b063f4..5405b0c 100644 | 645 | =================================================================== |
705 | --- a/libebl/eblopenbackend.c | 646 | --- elfutils-0.175.orig/libebl/eblopenbackend.c |
706 | +++ b/libebl/eblopenbackend.c | 647 | +++ elfutils-0.175/libebl/eblopenbackend.c |
707 | @@ -72,6 +72,8 @@ static const struct | 648 | @@ -71,6 +71,8 @@ static const struct |
708 | { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, | 649 | { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, |
709 | { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, | 650 | { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, |
710 | { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, | 651 | { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, |
@@ -713,6 +654,34 @@ index 8b063f4..5405b0c 100644 | |||
713 | 654 | ||
714 | { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, | 655 | { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, |
715 | { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, | 656 | { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, |
716 | -- | 657 | Index: elfutils-0.175/backends/Makefile.am |
717 | 2.7.4 | 658 | =================================================================== |
718 | 659 | --- elfutils-0.175.orig/backends/Makefile.am | |
660 | +++ elfutils-0.175/backends/Makefile.am | ||
661 | @@ -33,13 +33,13 @@ 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 riscv parisc | ||
666 | + tilegx m68k bpf riscv 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_riscv_pic.a \ | ||
672 | - libebl_parisc_pic.a | ||
673 | + libebl_parisc_pic.a libebl_mips_pic.a | ||
674 | noinst_LIBRARIES = $(libebl_pic) | ||
675 | noinst_DATA = $(libebl_pic:_pic.a=.so) | ||
676 | |||
677 | @@ -141,6 +141,10 @@ parisc_SRCS = parisc_init.c parisc_symbo | ||
678 | libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) | ||
679 | am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) | ||
680 | |||
681 | +mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c | ||
682 | +libebl_mips_pic_a_SOURCES = $(mips_SRCS) | ||
683 | +am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os) | ||
684 | + | ||
685 | libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) | ||
686 | @rm -f $(@:.so=.map) | ||
687 | $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ | ||
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch new file mode 100644 index 0000000000..d26e72e28c --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From: Kurt Roeckx <kurt@roeckx.be> | ||
2 | Subject: Make readelf -w output debug information on mips | ||
3 | Bug-Debian: http://bugs.debian.org/662041 | ||
4 | Forwarded: not-needed | ||
5 | |||
6 | Upstreams wants a change where this is handled by a hook that needs | ||
7 | to be filled in by the backend for the arch. | ||
8 | |||
9 | Upstream-Status: Pending [from debian] | ||
10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
11 | |||
12 | Index: elfutils-0.175/src/readelf.c | ||
13 | =================================================================== | ||
14 | --- elfutils-0.175.orig/src/readelf.c | ||
15 | +++ elfutils-0.175/src/readelf.c | ||
16 | @@ -11133,7 +11133,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl * | ||
17 | GElf_Shdr shdr_mem; | ||
18 | GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); | ||
19 | |||
20 | - if (shdr != NULL && shdr->sh_type == SHT_PROGBITS) | ||
21 | + if (shdr != NULL && ( | ||
22 | + (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF))) | ||
23 | { | ||
24 | static const struct | ||
25 | { | ||