summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-08-23 11:02:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-16 23:02:43 +0100
commitcc5d6ca85a40199a077403a0d0af0bd22eeefa06 (patch)
tree518e9866a124caa48ff4f6b5e747b76bcd80ea0c
parent5b1e999c41a116a77bf22e3d6546eaabf67b2946 (diff)
downloadpoky-cc5d6ca85a40199a077403a0d0af0bd22eeefa06.tar.gz
elfutils: 0.176 -> 0.177
- Update Debian patches http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz - Rebase Debian patches to 0.177 debian/hppa_backend.diff debian/mips_backend.diff debian/arm_backend.diff debian/mips_readelf_w.patch debian/testsuite-ignore-elflint.diff debian/mips_cfi.patch - Fix build failure while applying debian patches 0001-fix-compile-failure-with-debian-patches.patch - Rebase musl patches (From OE-Core rev: 35143611034758cc670e9d88bc93f97fe33c52fc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.177.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.176.bb)8
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0001-Ignore-differences-between-mips-machine-identifiers.patch12
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch48
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch13
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/0003-Add-mips-n64-relocation-format-hack.patch60
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/arm_backend.diff39
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/disable_werror.patch19
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff57
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/hurd_path.patch17
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff15
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch13
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_backend.diff42
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch131
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch22
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff20
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-libs.patch39
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch29
-rw-r--r--meta/recipes-devtools/elfutils/files/musl-utils.patch37
18 files changed, 431 insertions, 190 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.176.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
index d98457e3f9..fcebb4b048 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.176.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6DEPENDS = "libtool bzip2 zlib virtual/libintl" 6DEPENDS = "libtool bzip2 zlib virtual/libintl"
7DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack " 7DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
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.175-1.debian.tar.xz 9# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
10SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \ 10SRC_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 \
@@ -28,6 +28,8 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
28 file://debian/ignore_strmerge.diff \ 28 file://debian/ignore_strmerge.diff \
29 file://debian/disable_werror.patch \ 29 file://debian/disable_werror.patch \
30 file://debian/testsuite-ignore-elflint.diff \ 30 file://debian/testsuite-ignore-elflint.diff \
31 file://debian/mips_cfi.patch \
32 file://debian/0001-fix-compile-failure-with-debian-patches.patch \
31 file://0001-skip-the-test-when-gcc-not-deployed.patch \ 33 file://0001-skip-the-test-when-gcc-not-deployed.patch \
32 file://run-ptest \ 34 file://run-ptest \
33 file://ptest.patch \ 35 file://ptest.patch \
@@ -38,8 +40,8 @@ SRC_URI_append_libc-musl = " \
38 file://musl-utils.patch \ 40 file://musl-utils.patch \
39 file://musl-tests.patch \ 41 file://musl-tests.patch \
40 " 42 "
41SRC_URI[md5sum] = "077e4f49320cad82bf17a997068b1db9" 43SRC_URI[md5sum] = "0b583722f911e1632544718d502aab87"
42SRC_URI[sha256sum] = "eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023" 44SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e"
43 45
44inherit autotools gettext ptest 46inherit autotools gettext ptest
45 47
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 892b8e8733..a2983c5770 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,25 +1,25 @@
1From 46d2c2f8fecad85baeed9fe211f5285820220442 Mon Sep 17 00:00:00 2001 1From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
2From: James Cowgill <james410@cowgill.org.uk> 2From: James Cowgill <james410@cowgill.org.uk>
3Date: Mon, 5 Jan 2015 15:16:58 +0000 3Date: Mon, 5 Jan 2015 15:16:58 +0000
4Subject: [PATCH] Ignore differences between mips machine identifiers 4Subject: [PATCH 1/3] Ignore differences between mips machine identifiers
5 5
6Little endian binaries actually use EM_MIPS so you can't tell the endianness 6Little endian binaries actually use EM_MIPS so you can't tell the endianness
7from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the 7from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the
8kernel will not load binaries containing it). 8kernel will not load binaries containing it).
9 9
10Signed-off-by: James Cowgill <james410@cowgill.org.uk> 10Signed-off-by: James Cowgill <james410@cowgill.org.uk>
11
11Upstream-Status: Pending [from debian] 12Upstream-Status: Pending [from debian]
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13
14--- 14---
15 backends/mips_init.c | 6 +----- 15 backends/mips_init.c | 6 +-----
16 1 file changed, 1 insertion(+), 5 deletions(-) 16 1 file changed, 1 insertion(+), 5 deletions(-)
17 17
18diff --git a/backends/mips_init.c b/backends/mips_init.c 18Index: b/backends/mips_init.c
19index 975c04e..8482e7f 100644 19===================================================================
20--- a/backends/mips_init.c 20--- a/backends/mips_init.c
21+++ b/backends/mips_init.c 21+++ b/backends/mips_init.c
22@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unused)), 22@@ -45,11 +45,7 @@ mips_init (Elf *elf __attribute__ ((unus
23 return NULL; 23 return NULL;
24 24
25 /* We handle it. */ 25 /* We handle it. */
diff --git a/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch b/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch
new file mode 100644
index 0000000000..19a2015062
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/0001-fix-compile-failure-with-debian-patches.patch
@@ -0,0 +1,48 @@
1From 3f3e7b16934ec58ab47d2bdc9982f54a55b07534 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 Aug 2019 16:25:33 +0800
4Subject: [PATCH] fix compile failure with debian patches
5
6While applying debian patches, there is a compile failure
7...
8elfutils-0.177/backends/mips_init.c:48:5: error: 'Ebl' {aka 'struct ebl'} has no member named 'name'
9...
10
11Since upstream applied commit [b323391 libdwelf: Add dwelf_elf_e_machine_string
12and use it in readelf], it remove 'name' from 'struct ebl'
13
14Upstream-Status: Pending
15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17---
18 backends/mips_init.c | 1 -
19 backends/parisc_init.c | 1 -
20 2 files changed, 2 deletions(-)
21
22diff --git a/backends/mips_init.c b/backends/mips_init.c
23index bce5abe..e1c65c8 100644
24--- a/backends/mips_init.c
25+++ b/backends/mips_init.c
26@@ -45,7 +45,6 @@ mips_init (Elf *elf __attribute__ ((unused)),
27 return NULL;
28
29 /* We handle it. */
30- eh->name = "MIPS";
31 mips_init_reloc (eh);
32 HOOK (eh, reloc_simple_type);
33 HOOK (eh, return_value_location);
34diff --git a/backends/parisc_init.c b/backends/parisc_init.c
35index f1e401c..97b4a8c 100644
36--- a/backends/parisc_init.c
37+++ b/backends/parisc_init.c
38@@ -56,7 +56,6 @@ parisc_init (Elf *elf __attribute__ ((unused)),
39 pa64 = 1;
40 }
41 /* We handle it. */
42- eh->name = "PA-RISC";
43 parisc_init_reloc (eh);
44 HOOK (eh, reloc_simple_type);
45 HOOK (eh, machine_flag_check);
46--
472.7.4
48
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 7c0b9c6dc6..aee00cba14 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,18 +1,18 @@
1From 93ae9bb7d25a1adbcbab23a9b8493f370a93f0a3 Mon Sep 17 00:00:00 2001 1From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001
2From: James Cowgill <james410@cowgill.org.uk> 2From: James Cowgill <james410@cowgill.org.uk>
3Date: Mon, 5 Jan 2015 15:17:01 +0000 3Date: Mon, 5 Jan 2015 15:17:01 +0000
4Subject: [PATCH] Add support for mips64 abis in mips_retval.c 4Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c
5 5
6Signed-off-by: James Cowgill <james410@cowgill.org.uk> 6Signed-off-by: James Cowgill <james410@cowgill.org.uk>
7
7Upstream-Status: Pending [from debian] 8Upstream-Status: Pending [from debian]
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9
10--- 10---
11 backends/mips_retval.c | 104 +++++++++++++++++++++++++++++++++++++---- 11 backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++-----
12 1 file changed, 94 insertions(+), 10 deletions(-) 12 1 file changed, 94 insertions(+), 10 deletions(-)
13 13
14diff --git a/backends/mips_retval.c b/backends/mips_retval.c 14diff --git a/backends/mips_retval.c b/backends/mips_retval.c
15index 656cd1f..57487bb 100644 15index 33f12a7..d5c6ef0 100644
16--- a/backends/mips_retval.c 16--- a/backends/mips_retval.c
17+++ b/backends/mips_retval.c 17+++ b/backends/mips_retval.c
18@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf) 18@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf)
@@ -166,3 +166,6 @@ index 656cd1f..57487bb 100644
166 *locp = loc_aggregate; 166 *locp = loc_aggregate;
167 return nloc_aggregate; 167 return nloc_aggregate;
168 } 168 }
169--
1702.1.4
171
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 17b98a7964..c949e96533 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,7 +1,7 @@
1From bce44aece915698a224a8aefa66784b27455675b Mon Sep 17 00:00:00 2001 1From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001
2From: James Cowgill <james410@cowgill.org.uk> 2From: James Cowgill <james410@cowgill.org.uk>
3Date: Mon, 5 Jan 2015 15:17:02 +0000 3Date: Mon, 5 Jan 2015 15:17:02 +0000
4Subject: [PATCH] Add mips n64 relocation format hack 4Subject: [PATCH 3/3] Add mips n64 relocation format hack
5 5
6MIPSEL N64 ELF files use a slightly different format for storing relocation 6MIPSEL N64 ELF files use a slightly different format for storing relocation
7entries which is incompatible with the normal R_SYM / R_INFO macros. 7entries which is incompatible with the normal R_SYM / R_INFO macros.
@@ -12,9 +12,9 @@ This patch also ensures that strip.c sets the correct value of e_machine
12before manipulating relocations so that these changes take effect. 12before manipulating relocations so that these changes take effect.
13 13
14Signed-off-by: James Cowgill <james410@cowgill.org.uk> 14Signed-off-by: James Cowgill <james410@cowgill.org.uk>
15
15Upstream-Status: Pending [from debian] 16Upstream-Status: Pending [from debian]
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 17Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17
18--- 18---
19 libelf/gelf_getrel.c | 25 +++++++++++++++++++++++-- 19 libelf/gelf_getrel.c | 25 +++++++++++++++++++++++--
20 libelf/gelf_getrela.c | 25 +++++++++++++++++++++++-- 20 libelf/gelf_getrela.c | 25 +++++++++++++++++++++++--
@@ -23,10 +23,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
23 src/strip.c | 17 +++++++++++++++++ 23 src/strip.c | 17 +++++++++++++++++
24 5 files changed, 101 insertions(+), 6 deletions(-) 24 5 files changed, 101 insertions(+), 6 deletions(-)
25 25
26diff --git a/libelf/gelf_getrel.c b/libelf/gelf_getrel.c 26Index: elfutils-0.175/libelf/gelf_getrel.c
27index 309e3d3..2a81a97 100644 27===================================================================
28--- a/libelf/gelf_getrel.c 28--- elfutils-0.175.orig/libelf/gelf_getrel.c
29+++ b/libelf/gelf_getrel.c 29+++ elfutils-0.175/libelf/gelf_getrel.c
30@@ -36,6 +36,7 @@ 30@@ -36,6 +36,7 @@
31 31
32 #include "libelfP.h" 32 #include "libelfP.h"
@@ -35,7 +35,7 @@ index 309e3d3..2a81a97 100644
35 35
36 GElf_Rel * 36 GElf_Rel *
37 gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) 37 gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
38@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst) 38@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE
39 result = NULL; 39 result = NULL;
40 } 40 }
41 else 41 else
@@ -66,10 +66,10 @@ index 309e3d3..2a81a97 100644
66 } 66 }
67 67
68 rwlock_unlock (scn->elf->lock); 68 rwlock_unlock (scn->elf->lock);
69diff --git a/libelf/gelf_getrela.c b/libelf/gelf_getrela.c 69Index: elfutils-0.175/libelf/gelf_getrela.c
70index d695f65..1f42a80 100644 70===================================================================
71--- a/libelf/gelf_getrela.c 71--- elfutils-0.175.orig/libelf/gelf_getrela.c
72+++ b/libelf/gelf_getrela.c 72+++ elfutils-0.175/libelf/gelf_getrela.c
73@@ -36,6 +36,7 @@ 73@@ -36,6 +36,7 @@
74 74
75 #include "libelfP.h" 75 #include "libelfP.h"
@@ -78,7 +78,7 @@ index d695f65..1f42a80 100644
78 78
79 GElf_Rela * 79 GElf_Rela *
80 gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) 80 gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
81@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst) 81@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G
82 result = NULL; 82 result = NULL;
83 } 83 }
84 else 84 else
@@ -109,10 +109,10 @@ index d695f65..1f42a80 100644
109 } 109 }
110 110
111 rwlock_unlock (scn->elf->lock); 111 rwlock_unlock (scn->elf->lock);
112diff --git a/libelf/gelf_update_rel.c b/libelf/gelf_update_rel.c 112Index: elfutils-0.175/libelf/gelf_update_rel.c
113index 14f62e9..9095556 100644 113===================================================================
114--- a/libelf/gelf_update_rel.c 114--- elfutils-0.175.orig/libelf/gelf_update_rel.c
115+++ b/libelf/gelf_update_rel.c 115+++ elfutils-0.175/libelf/gelf_update_rel.c
116@@ -36,6 +36,7 @@ 116@@ -36,6 +36,7 @@
117 117
118 #include "libelfP.h" 118 #include "libelfP.h"
@@ -121,7 +121,7 @@ index 14f62e9..9095556 100644
121 121
122 int 122 int
123 gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) 123 gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src)
124@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) 124@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx,
125 } 125 }
126 else 126 else
127 { 127 {
@@ -131,7 +131,7 @@ index 14f62e9..9095556 100644
131 /* Check whether we have to resize the data buffer. */ 131 /* Check whether we have to resize the data buffer. */
132 if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) 132 if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
133 { 133 {
134@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src) 134@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx,
135 goto out; 135 goto out;
136 } 136 }
137 137
@@ -154,10 +154,10 @@ index 14f62e9..9095556 100644
154 } 154 }
155 155
156 result = 1; 156 result = 1;
157diff --git a/libelf/gelf_update_rela.c b/libelf/gelf_update_rela.c 157Index: elfutils-0.175/libelf/gelf_update_rela.c
158index 8825270..4caa85f 100644 158===================================================================
159--- a/libelf/gelf_update_rela.c 159--- elfutils-0.175.orig/libelf/gelf_update_rela.c
160+++ b/libelf/gelf_update_rela.c 160+++ elfutils-0.175/libelf/gelf_update_rela.c
161@@ -36,6 +36,7 @@ 161@@ -36,6 +36,7 @@
162 162
163 #include "libelfP.h" 163 #include "libelfP.h"
@@ -166,7 +166,7 @@ index 8825270..4caa85f 100644
166 166
167 int 167 int
168 gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) 168 gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src)
169@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) 169@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx
170 } 170 }
171 else 171 else
172 { 172 {
@@ -176,7 +176,7 @@ index 8825270..4caa85f 100644
176 /* Check whether we have to resize the data buffer. */ 176 /* Check whether we have to resize the data buffer. */
177 if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) 177 if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
178 { 178 {
179@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src) 179@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx
180 goto out; 180 goto out;
181 } 181 }
182 182
@@ -199,11 +199,11 @@ index 8825270..4caa85f 100644
199 } 199 }
200 200
201 result = 1; 201 result = 1;
202diff --git a/src/strip.c b/src/strip.c 202Index: elfutils-0.175/src/strip.c
203index a73009d..75bd7ba 100644 203===================================================================
204--- a/src/strip.c 204--- elfutils-0.175.orig/src/strip.c
205+++ b/src/strip.c 205+++ elfutils-0.175/src/strip.c
206@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, 206@@ -1062,6 +1062,23 @@ handle_elf (int fd, Elf *elf, const char
207 goto fail; 207 goto fail;
208 } 208 }
209 209
diff --git a/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
index 9904f24150..ba0ce33bd4 100644
--- a/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/arm_backend.diff
@@ -1,25 +1,25 @@
1From f3384466475eab373c0f1cb79c61d45709913b00 Mon Sep 17 00:00:00 2001 1From 4e6fededb3d8c90694c44214c862ac216a69ecae Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 28 May 2014 16:49:57 +0800 3Date: Wed, 21 Aug 2019 16:50:33 +0800
4Subject: [PATCH] elfutils: upgrade to 0.158 4Subject: [PATCH] arm_backend
5 5
6Upstream-Status: Pending [from debian] 6Upstream-Status: Pending [from debian]
7Rebase to 0.177
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8
9--- 9---
10 backends/arm_init.c | 18 +++- 10 backends/arm_init.c | 18 ++++-
11 backends/arm_regs.c | 132 ++++++++++++++++++++++++++++ 11 backends/arm_regs.c | 132 ++++++++++++++++++++++++++++++++++++
12 backends/arm_retval.c | 43 ++++++++- 12 backends/arm_retval.c | 43 +++++++++++-
13 backends/libebl_arm.h | 9 ++ 13 backends/libebl_arm.h | 9 +++
14 libelf/elf.h | 11 +++ 14 libelf/elf.h | 11 +++
15 tests/run-addrcfi.sh | 93 +++++++++++++++++++- 15 tests/run-addrcfi.sh | 93 ++++++++++++++++++++++++-
16 tests/run-allregs.sh | 95 +++++++++++++++++++- 16 tests/run-allregs.sh | 95 +++++++++++++++++++++++++-
17 tests/run-readelf-mixed-corenote.sh | 11 ++- 17 tests/run-readelf-mixed-corenote.sh | 11 ++-
18 8 files changed, 400 insertions(+), 12 deletions(-) 18 8 files changed, 400 insertions(+), 12 deletions(-)
19 create mode 100644 backends/libebl_arm.h 19 create mode 100644 backends/libebl_arm.h
20 20
21diff --git a/backends/arm_init.c b/backends/arm_init.c 21diff --git a/backends/arm_init.c b/backends/arm_init.c
22index f2b1b11..1b71f16 100644 22index af023f0..ea2bcb7 100644
23--- a/backends/arm_init.c 23--- a/backends/arm_init.c
24+++ b/backends/arm_init.c 24+++ b/backends/arm_init.c
25@@ -35,20 +35,31 @@ 25@@ -35,20 +35,31 @@
@@ -53,9 +53,9 @@ index f2b1b11..1b71f16 100644
53+ } 53+ }
54+ 54+
55 /* We handle it. */ 55 /* We handle it. */
56 eh->name = "ARM";
57 arm_init_reloc (eh); 56 arm_init_reloc (eh);
58@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unused)), 57 HOOK (eh, segment_type_name);
58@@ -59,7 +70,10 @@ arm_init (Elf *elf __attribute__ ((unused)),
59 HOOK (eh, core_note); 59 HOOK (eh, core_note);
60 HOOK (eh, auxv_info); 60 HOOK (eh, auxv_info);
61 HOOK (eh, check_object_attribute); 61 HOOK (eh, check_object_attribute);
@@ -324,10 +324,10 @@ index 0000000..c00770c
324+ 324+
325+#endif 325+#endif
326diff --git a/libelf/elf.h b/libelf/elf.h 326diff --git a/libelf/elf.h b/libelf/elf.h
327index 6310054..5dc632b 100644 327index 01648bd..05b7e7e 100644
328--- a/libelf/elf.h 328--- a/libelf/elf.h
329+++ b/libelf/elf.h 329+++ b/libelf/elf.h
330@@ -2694,6 +2694,9 @@ enum 330@@ -2690,6 +2690,9 @@ enum
331 #define EF_ARM_EABI_VER4 0x04000000 331 #define EF_ARM_EABI_VER4 0x04000000
332 #define EF_ARM_EABI_VER5 0x05000000 332 #define EF_ARM_EABI_VER5 0x05000000
333 333
@@ -337,7 +337,7 @@ index 6310054..5dc632b 100644
337 /* Additional symbol types for Thumb. */ 337 /* Additional symbol types for Thumb. */
338 #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ 338 #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
339 #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ 339 #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
340@@ -2711,12 +2714,19 @@ enum 340@@ -2707,12 +2710,19 @@ enum
341 341
342 /* Processor specific values for the Phdr p_type field. */ 342 /* Processor specific values for the Phdr p_type field. */
343 #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ 343 #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
@@ -357,7 +357,7 @@ index 6310054..5dc632b 100644
357 357
358 /* AArch64 relocs. */ 358 /* AArch64 relocs. */
359 359
360@@ -3009,6 +3019,7 @@ enum 360@@ -3005,6 +3015,7 @@ enum
361 TLS block (LDR, STR). */ 361 TLS block (LDR, STR). */
362 #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative 362 #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
363 to GOT origin (LDR). */ 363 to GOT origin (LDR). */
@@ -366,7 +366,7 @@ index 6310054..5dc632b 100644
366 #define R_ARM_THM_TLS_DESCSEQ 129 366 #define R_ARM_THM_TLS_DESCSEQ 129
367 #define R_ARM_THM_TLS_DESCSEQ16 129 367 #define R_ARM_THM_TLS_DESCSEQ16 129
368diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh 368diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
369index fd89d02..462d7c5 100755 369index 64fa24d..1c2aa4d 100755
370--- a/tests/run-addrcfi.sh 370--- a/tests/run-addrcfi.sh
371+++ b/tests/run-addrcfi.sh 371+++ b/tests/run-addrcfi.sh
372@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range 372@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
@@ -619,3 +619,6 @@ index c960f1d..e4bf074 100755
619 CORE 124 PRPSINFO 619 CORE 124 PRPSINFO
620 state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500 620 state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
621 uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063 621 uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
622--
6232.7.4
624
diff --git a/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch b/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch
index bb5670a8db..bd98dae4b2 100644
--- a/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/disable_werror.patch
@@ -1,23 +1,16 @@
1From dece09fb8c59dbdab356b63fbe6b7554dd2461a4 Mon Sep 17 00:00:00 2001
2From: Helmut Grohne <helmut@subdivi.de> 1From: Helmut Grohne <helmut@subdivi.de>
3Date: Fri, 23 Nov 2018 15:47:20 +0800 2Subject: disable -Werror as it tends to break with new gcc versions
4Subject: [PATCH] disable -Werror as it tends to break with new gcc versions
5
6Bug-Debian: https://bugs.debian.org/886004 3Bug-Debian: https://bugs.debian.org/886004
7Last-Update: 2018-01-01 4Last-Update: 2018-01-01
8 5
9Upstream-Status: Pending [from debian] 6Upstream-Status: Pending [from debian]
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11 8
12--- 9Index: elfutils-0.176/config/eu.am
13 config/eu.am | 1 - 10===================================================================
14 1 file changed, 1 deletion(-) 11--- elfutils-0.176.orig/config/eu.am
15 12+++ elfutils-0.176/config/eu.am
16diff --git a/config/eu.am b/config/eu.am 13@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -W
17index 82acda3..dede5c6 100644
18--- a/config/eu.am
19+++ b/config/eu.am
20@@ -73,7 +73,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
21 -Wold-style-definition -Wstrict-prototypes -Wtrampolines \ 14 -Wold-style-definition -Wstrict-prototypes -Wtrampolines \
22 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ 15 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
23 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ 16 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
diff --git a/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
index afcc30abfe..4460d582c7 100644
--- a/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
@@ -1,21 +1,21 @@
1From 8fe468682c550606ea961a1f996a8618940eb084 Mon Sep 17 00:00:00 2001 1From 8efad9105b38985bea373416ae8fcacf21d1d129 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 16 Jul 2010 12:26:46 +0800 3Date: Wed, 21 Aug 2019 15:44:18 +0800
4Subject: [PATCH] elfutils: upgrade to version 0.148 4Subject: [PATCH] hppa backend
5 5
6Rebase to 0.177
6Upstream-Status: Pending [from debian] 7Upstream-Status: Pending [from debian]
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8
9--- 9---
10 backends/Makefile.am | 8 +- 10 backends/Makefile.am | 7 +-
11 backends/libebl_parisc.h | 9 ++ 11 backends/libebl_parisc.h | 9 ++
12 backends/parisc_init.c | 73 +++++++++++++ 12 backends/parisc_init.c | 73 ++++++++++++++++
13 backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++ 13 backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++
14 backends/parisc_reloc.def | 128 +++++++++++++++++++++++ 14 backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++
15 backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++ 15 backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++
16 backends/parisc_symbol.c | 113 ++++++++++++++++++++ 16 backends/parisc_symbol.c | 113 ++++++++++++++++++++++++
17 libelf/elf.h | 11 ++ 17 libelf/elf.h | 11 +++
18 8 files changed, 712 insertions(+), 2 deletions(-) 18 8 files changed, 711 insertions(+), 2 deletions(-)
19 create mode 100644 backends/libebl_parisc.h 19 create mode 100644 backends/libebl_parisc.h
20 create mode 100644 backends/parisc_init.c 20 create mode 100644 backends/parisc_init.c
21 create mode 100644 backends/parisc_regs.c 21 create mode 100644 backends/parisc_regs.c
@@ -24,35 +24,31 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24 create mode 100644 backends/parisc_symbol.c 24 create mode 100644 backends/parisc_symbol.c
25 25
26diff --git a/backends/Makefile.am b/backends/Makefile.am 26diff --git a/backends/Makefile.am b/backends/Makefile.am
27index 2126a2e..5671a32 100644 27index 175468f..91a38e2 100644
28--- a/backends/Makefile.am 28--- a/backends/Makefile.am
29+++ b/backends/Makefile.am 29+++ b/backends/Makefile.am
30@@ -33,12 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ 30@@ -33,16 +33,19 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
31 31
32 32
33 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 33 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
34- tilegx m68k bpf riscv 34- tilegx m68k bpf riscv csky
35+ tilegx m68k bpf riscv parisc 35+ tilegx m68k bpf riscv csky parisc
36 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ 36 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
37 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ 37 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
38 libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ 38 libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
39 libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ 39 libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
40- libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a 40 libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
41+ libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ 41- libebl_csky_pic.a
42+ libebl_parisc_pic.a 42+ libebl_csky_pic.a libebl_parisc_pic.a
43 noinst_LIBRARIES = $(libebl_pic) 43 noinst_LIBRARIES = $(libebl_pic)
44 noinst_DATA = $(libebl_pic:_pic.a=.so) 44 noinst_DATA = $(libebl_pic:_pic.a=.so)
45 45
46@@ -136,6 +137,9 @@ riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
47 libebl_riscv_pic_a_SOURCES = $(riscv_SRCS)
48 am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os)
49
50+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c 46+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
51+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) 47+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
52+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) 48+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
53 49
54 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) 50 libelf = ../libelf/libelf.so
55 @rm -f $(@:.so=.map) 51 libdw = ../libdw/libdw.so
56diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h 52diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h
57new file mode 100644 53new file mode 100644
58index 0000000..f473b79 54index 0000000..f473b79
@@ -785,10 +781,10 @@ index 0000000..5754bd8
785+ } 781+ }
786+} 782+}
787diff --git a/libelf/elf.h b/libelf/elf.h 783diff --git a/libelf/elf.h b/libelf/elf.h
788index 75043bc..6310054 100644 784index 01648bd..218ceb2 100644
789--- a/libelf/elf.h 785--- a/libelf/elf.h
790+++ b/libelf/elf.h 786+++ b/libelf/elf.h
791@@ -2155,16 +2155,24 @@ enum 787@@ -2162,16 +2162,24 @@ enum
792 #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ 788 #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
793 #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ 789 #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
794 #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ 790 #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
@@ -813,7 +809,7 @@ index 75043bc..6310054 100644
813 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ 809 #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
814 #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ 810 #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
815 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ 811 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
816@@ -2173,6 +2181,7 @@ enum 812@@ -2180,6 +2188,7 @@ enum
817 #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ 813 #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
818 #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ 814 #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
819 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ 815 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
@@ -821,7 +817,7 @@ index 75043bc..6310054 100644
821 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ 817 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
822 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ 818 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
823 #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ 819 #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
824@@ -2198,6 +2207,8 @@ enum 820@@ -2205,6 +2214,8 @@ enum
825 #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ 821 #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
826 #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ 822 #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
827 #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ 823 #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
@@ -830,3 +826,6 @@ index 75043bc..6310054 100644
830 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ 826 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
831 #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ 827 #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
832 #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ 828 #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
829--
8302.7.4
831
diff --git a/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch b/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch
index f014ae2a70..62a960f3a8 100644
--- a/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/hurd_path.patch
@@ -1,19 +1,10 @@
1From 2f54a8cf959ea83c452b1a22acbc47d2738b5fa0 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Nov 2018 15:47:20 +0800
4Subject: [PATCH] elfutils: 0.170 -> 0.172
5
6Upstream-Status: Pending [from debian] 1Upstream-Status: Pending [from debian]
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 2Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8 3
9--- 4Index: elfutils-0.165/tests/run-native-test.sh
10 tests/run-native-test.sh | 3 +++ 5===================================================================
11 1 file changed, 3 insertions(+) 6--- elfutils-0.165.orig/tests/run-native-test.sh
12 7+++ elfutils-0.165/tests/run-native-test.sh
13diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh
14index 5351e02..70f6681 100755
15--- a/tests/run-native-test.sh
16+++ b/tests/run-native-test.sh
17@@ -83,6 +83,9 @@ native_test() 8@@ -83,6 +83,9 @@ native_test()
18 # "cannot attach to process: Function not implemented". 9 # "cannot attach to process: Function not implemented".
19 [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77 10 [ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
diff --git a/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff b/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
index 53332467a4..55513eeddc 100644
--- a/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/ignore_strmerge.diff
@@ -1,19 +1,8 @@
1From d326ad99be856815260a04e573fc97044c02f444 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Mon, 2 Jul 2018 13:57:09 +0800
4Subject: [PATCH] elfutils: 0.170 -> 0.172
5
6Upstream-Status: Pending [from debian] 1Upstream-Status: Pending [from debian]
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 2Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8 3
9--- 4--- elfutils-0.165.orig/tests/run-strip-strmerge.sh
10 tests/run-strip-strmerge.sh | 2 +- 5+++ elfutils-0.165/tests/run-strip-strmerge.sh
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/tests/run-strip-strmerge.sh b/tests/run-strip-strmerge.sh
14index aa9c1eb..2bab8ec 100755
15--- a/tests/run-strip-strmerge.sh
16+++ b/tests/run-strip-strmerge.sh
17@@ -30,7 +30,7 @@ remerged=remerged.elf 6@@ -30,7 +30,7 @@ remerged=remerged.elf
18 tempfiles $merged $stripped $debugfile $remerged 7 tempfiles $merged $stripped $debugfile $remerged
19 8
diff --git a/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch b/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch
index 805da80d65..e85a2fed9d 100644
--- a/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/kfreebsd_path.patch
@@ -1,17 +1,8 @@
1From bac45996ece75900e0cde97f3889eaf6c1b286f8 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Nov 2018 15:47:20 +0800
4Subject: [PATCH] elfutils: 0.170 -> 0.172
5
6Upstream-Status: Pending [from debian] 1Upstream-Status: Pending [from debian]
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 2Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8 3
9--- 4Index: b/tests/run-native-test.sh
10 tests/run-native-test.sh | 6 ++++++ 5===================================================================
11 1 file changed, 6 insertions(+)
12
13diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh
14index d19007f..5351e02 100755
15--- a/tests/run-native-test.sh 6--- a/tests/run-native-test.sh
16+++ b/tests/run-native-test.sh 7+++ b/tests/run-native-test.sh
17@@ -77,6 +77,12 @@ native_test() 8@@ -77,6 +77,12 @@ native_test()
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
index 697306f82b..1097b0ec6f 100644
--- a/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
@@ -1,18 +1,19 @@
1From 10a75fd2beefafe2043163f85426d0e575de58d8 Mon Sep 17 00:00:00 2001 1From 68b497668cde5171880d073a7ea50d11c3bddbfc Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 16 Jul 2010 12:26:46 +0800 3Date: Wed, 21 Aug 2019 15:49:52 +0800
4Subject: [PATCH] elfutils: upgrade to version 0.148 4Subject: [PATCH] mips backend
5 5
6Rebase to 0.177
6Upstream-Status: Pending [from debian] 7Upstream-Status: Pending [from debian]
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8 8
9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9--- 10---
10 backends/Makefile.am | 8 +- 11 backends/Makefile.am | 8 +-
11 backends/mips_init.c | 59 ++++++++ 12 backends/mips_init.c | 59 +++++++++
12 backends/mips_regs.c | 104 +++++++++++++ 13 backends/mips_regs.c | 104 ++++++++++++++++
13 backends/mips_reloc.def | 79 ++++++++++ 14 backends/mips_reloc.def | 79 ++++++++++++
14 backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++ 15 backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++
15 backends/mips_symbol.c | 53 +++++++ 16 backends/mips_symbol.c | 53 ++++++++
16 libebl/eblopenbackend.c | 2 + 17 libebl/eblopenbackend.c | 2 +
17 7 files changed, 624 insertions(+), 2 deletions(-) 18 7 files changed, 624 insertions(+), 2 deletions(-)
18 create mode 100644 backends/mips_init.c 19 create mode 100644 backends/mips_init.c
@@ -22,28 +23,28 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
22 create mode 100644 backends/mips_symbol.c 23 create mode 100644 backends/mips_symbol.c
23 24
24diff --git a/backends/Makefile.am b/backends/Makefile.am 25diff --git a/backends/Makefile.am b/backends/Makefile.am
25index 5671a32..ba84da6 100644 26index 91a38e2..aba8a4a 100644
26--- a/backends/Makefile.am 27--- a/backends/Makefile.am
27+++ b/backends/Makefile.am 28+++ b/backends/Makefile.am
28@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ 29@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
29 30
30 31
31 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 32 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
32- tilegx m68k bpf riscv parisc 33- tilegx m68k bpf riscv csky parisc
33+ tilegx m68k bpf riscv parisc mips 34+ tilegx m68k bpf riscv csky parisc mips
34 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ 35 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
35 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ 36 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
36 libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ 37 libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
37 libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ 38 libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
38 libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \ 39 libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
39- libebl_parisc_pic.a 40- libebl_csky_pic.a libebl_parisc_pic.a
40+ libebl_parisc_pic.a libebl_mips_pic.a 41+ libebl_csky_pic.a libebl_parisc_pic.a libebl_mips_pic.a
41 noinst_LIBRARIES = $(libebl_pic) 42 noinst_LIBRARIES = $(libebl_pic)
42 noinst_DATA = $(libebl_pic:_pic.a=.so) 43 noinst_DATA = $(libebl_pic:_pic.a=.so)
43 44
44@@ -141,6 +141,10 @@ parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c 45@@ -145,6 +145,10 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
45 libebl_parisc_pic_a_SOURCES = $(parisc_SRCS) 46 libebl_csky_pic_a_SOURCES = $(csky_SRCS)
46 am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os) 47 am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os)
47 48
48+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c 49+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
49+libebl_mips_pic_a_SOURCES = $(mips_SRCS) 50+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
@@ -699,7 +700,7 @@ index 0000000..261b05d
699+ } 700+ }
700+} 701+}
701diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c 702diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
702index d54b720..6cf766f 100644 703index 01711f5..d0c3589 100644
703--- a/libebl/eblopenbackend.c 704--- a/libebl/eblopenbackend.c
704+++ b/libebl/eblopenbackend.c 705+++ b/libebl/eblopenbackend.c
705@@ -71,6 +71,8 @@ static const struct 706@@ -71,6 +71,8 @@ static const struct
@@ -711,3 +712,6 @@ index d54b720..6cf766f 100644
711 712
712 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, 713 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
713 { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, 714 { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
715--
7162.7.4
717
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch b/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
new file mode 100644
index 0000000000..fda4f68059
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
@@ -0,0 +1,131 @@
1From 96e38289f2887ddb8e6d2fb91ea04bdbdf034ab5 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 Aug 2019 17:00:30 +0800
4Subject: [PATCH 2/2] mips_cfi
5
6Upstream-Status: Pending [from debian]
7
8Rebase to 0.177
9
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11---
12 backends/Makefile.am | 2 +-
13 backends/mips_cfi.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
14 backends/mips_init.c | 1 +
15 3 files changed, 82 insertions(+), 1 deletion(-)
16 create mode 100644 backends/mips_cfi.c
17
18diff --git a/backends/Makefile.am b/backends/Makefile.am
19index aba8a4a..6ac0eec 100644
20--- a/backends/Makefile.am
21+++ b/backends/Makefile.am
22@@ -145,7 +145,7 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
23 libebl_csky_pic_a_SOURCES = $(csky_SRCS)
24 am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os)
25
26-mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
27+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c mips_cfi.c
28 libebl_mips_pic_a_SOURCES = $(mips_SRCS)
29 am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
30
31diff --git a/backends/mips_cfi.c b/backends/mips_cfi.c
32new file mode 100644
33index 0000000..9ffdab5
34--- /dev/null
35+++ b/backends/mips_cfi.c
36@@ -0,0 +1,80 @@
37+/* MIPS ABI-specified defaults for DWARF CFI.
38+ Copyright (C) 2018 Kurt Roeckx, Inc.
39+ This file is part of elfutils.
40+
41+ This file is free software; you can redistribute it and/or modify
42+ it under the terms of either
43+
44+ * the GNU Lesser General Public License as published by the Free
45+ Software Foundation; either version 3 of the License, or (at
46+ your option) any later version
47+
48+ or
49+
50+ * the GNU General Public License as published by the Free
51+ Software Foundation; either version 2 of the License, or (at
52+ your option) any later version
53+
54+ or both in parallel, as here.
55+
56+ elfutils is distributed in the hope that it will be useful, but
57+ WITHOUT ANY WARRANTY; without even the implied warranty of
58+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
59+ General Public License for more details.
60+
61+ You should have received copies of the GNU General Public License and
62+ the GNU Lesser General Public License along with this program. If
63+ not, see <http://www.gnu.org/licenses/>. */
64+
65+#ifdef HAVE_CONFIG_H
66+# include <config.h>
67+#endif
68+
69+#include <dwarf.h>
70+
71+#define BACKEND mips_
72+#include "libebl_CPU.h"
73+
74+int
75+mips_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info)
76+{
77+ static const uint8_t abi_cfi[] =
78+ {
79+ /* Call-saved regs. */
80+ DW_CFA_same_value, ULEB128_7 (16), /* $16 */
81+ DW_CFA_same_value, ULEB128_7 (17), /* $17 */
82+ DW_CFA_same_value, ULEB128_7 (18), /* $18 */
83+ DW_CFA_same_value, ULEB128_7 (19), /* $19 */
84+ DW_CFA_same_value, ULEB128_7 (20), /* $20 */
85+ DW_CFA_same_value, ULEB128_7 (21), /* $21 */
86+ DW_CFA_same_value, ULEB128_7 (22), /* $22 */
87+ DW_CFA_same_value, ULEB128_7 (23), /* $23 */
88+ DW_CFA_same_value, ULEB128_7 (28), /* $28 */
89+ DW_CFA_same_value, ULEB128_7 (29), /* $29 */
90+ DW_CFA_same_value, ULEB128_7 (30), /* $30 */
91+
92+ DW_CFA_same_value, ULEB128_7 (52), /* $f20 */
93+ DW_CFA_same_value, ULEB128_7 (53), /* $f21 */
94+ DW_CFA_same_value, ULEB128_7 (54), /* $f22 */
95+ DW_CFA_same_value, ULEB128_7 (55), /* $f23 */
96+ DW_CFA_same_value, ULEB128_7 (56), /* $f24 */
97+ DW_CFA_same_value, ULEB128_7 (57), /* $f25 */
98+ DW_CFA_same_value, ULEB128_7 (58), /* $f26 */
99+ DW_CFA_same_value, ULEB128_7 (59), /* $f27 */
100+ DW_CFA_same_value, ULEB128_7 (60), /* $f28 */
101+ DW_CFA_same_value, ULEB128_7 (61), /* $f29 */
102+ DW_CFA_same_value, ULEB128_7 (62), /* $f30 */
103+ DW_CFA_same_value, ULEB128_7 (63), /* $f31 */
104+
105+ /* The CFA is the SP. */
106+ DW_CFA_def_cfa, ULEB128_7 (29), ULEB128_7 (0),
107+ };
108+
109+ abi_info->initial_instructions = abi_cfi;
110+ abi_info->initial_instructions_end = &abi_cfi[sizeof abi_cfi];
111+ abi_info->data_alignment_factor = 4;
112+
113+ abi_info->return_address_register = 31; /* $31 */
114+
115+ return 0;
116+}
117diff --git a/backends/mips_init.c b/backends/mips_init.c
118index 8482e7f..bce5abe 100644
119--- a/backends/mips_init.c
120+++ b/backends/mips_init.c
121@@ -50,6 +50,7 @@ mips_init (Elf *elf __attribute__ ((unused)),
122 HOOK (eh, reloc_simple_type);
123 HOOK (eh, return_value_location);
124 HOOK (eh, register_info);
125+ HOOK (eh, abi_cfi);
126
127 return MODVERSION;
128 }
129--
1302.7.4
131
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
index 1737e0dbcc..c6d42e163a 100644
--- a/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_readelf_w.patch
@@ -1,23 +1,22 @@
1From 33da4b4347aacdfb8b1b42e06e29e68a4b882d96 Mon Sep 17 00:00:00 2001 1From 7bdc83296865cf2b2a5615dbdb7ac0d441fb1849 Mon Sep 17 00:00:00 2001
2From: Kurt Roeckx <kurt@roeckx.be> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Mon, 4 Mar 2019 09:45:00 +0000 3Date: Wed, 21 Aug 2019 16:55:01 +0800
4Subject: [PATCH] Make readelf -w output debug information on mips 4Subject: [PATCH] mips_readelf_w
5
6Upstreams wants a change where this is handled by a hook that needs
7to be filled in by the backend for the arch.
8 5
9Upstream-Status: Pending [from debian] 6Upstream-Status: Pending [from debian]
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11 7
8Rebase to 0.177
9
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12--- 11---
13 src/readelf.c | 3 ++- 12 src/readelf.c | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-) 13 1 file changed, 2 insertions(+), 1 deletion(-)
15 14
16diff --git a/src/readelf.c b/src/readelf.c 15diff --git a/src/readelf.c b/src/readelf.c
17index 33706bd..ef13159 100644 16index 2084fb1..5c02a9b 100644
18--- a/src/readelf.c 17--- a/src/readelf.c
19+++ b/src/readelf.c 18+++ b/src/readelf.c
20@@ -11148,7 +11148,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) 19@@ -11256,7 +11256,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr)
21 GElf_Shdr shdr_mem; 20 GElf_Shdr shdr_mem;
22 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); 21 GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
23 22
@@ -27,3 +26,6 @@ index 33706bd..ef13159 100644
27 { 26 {
28 static const struct 27 static const struct
29 { 28 {
29--
302.7.4
31
diff --git a/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff b/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
index c4ce20c8a3..e6d7948c67 100644
--- a/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/testsuite-ignore-elflint.diff
@@ -1,16 +1,13 @@
1From 03a343c6b1b72598fce654b8a638f106da44abfb Mon Sep 17 00:00:00 2001 1From 6393b0e57872b3ffedf0dbd6784cd29694010878 Mon Sep 17 00:00:00 2001
2From: OpenEmbedded <oe.patch@oe> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 12 Apr 2019 08:05:50 +0000 3Date: Wed, 21 Aug 2019 16:59:01 +0800
4Subject: [PATCH] On many architectures this test fails because binaries/libs 4Subject: [PATCH 1/2] testsuite-ignore-elflint
5 produced by binutils don't pass elflint. However elfutils shouldn't FTBFS
6 because of this.
7 5
8So we run the tests on all archs to see what breaks, but if it breaks we ignore 6Upstream-Status: Pending [from debian]
9the result (exitcode 77 means: this test was skipped).
10 7
11Upstream-Status: Inappropriate [oe specific] 8Rebase to 0.177
12 9
13Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> 10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14--- 11---
15 tests/run-elflint-self.sh | 2 +- 12 tests/run-elflint-self.sh | 2 +-
16 tests/test-subr.sh | 15 +++++++++++++++ 13 tests/test-subr.sh | 15 +++++++++++++++
@@ -50,3 +47,6 @@ index 09f428d..26f61f1 100644
50+ if test $exit_status != 0; then exit $exit_status; fi 47+ if test $exit_status != 0; then exit $exit_status; fi
51+} 48+}
52+ 49+
50--
512.7.4
52
diff --git a/meta/recipes-devtools/elfutils/files/musl-libs.patch b/meta/recipes-devtools/elfutils/files/musl-libs.patch
index 51ca630ef8..b9b9f120df 100644
--- a/meta/recipes-devtools/elfutils/files/musl-libs.patch
+++ b/meta/recipes-devtools/elfutils/files/musl-libs.patch
@@ -1,3 +1,8 @@
1From d5a1651df9884fcf57ed320bc2f866538af2f420 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:18:47 +0800
4Subject: [PATCH 2/3] musl-libs
5
1Collection of fixes needed to compile libelf and other libraries 6Collection of fixes needed to compile libelf and other libraries
2provided by elfutils for musl targets 7provided by elfutils for musl targets
3 8
@@ -7,6 +12,21 @@ upstream given that elfutils has been closely tied to glibc
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Upstream-Status: Inappropriate [workaround for musl] 13Upstream-Status: Inappropriate [workaround for musl]
9 14
15Rebase to 0.177
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17---
18 lib/error.h | 27 +++++++++++++++++++++++++++
19 lib/fixedsizehash.h | 1 -
20 lib/libeu.h | 1 +
21 libdwfl/dwfl_error.c | 9 +++++++++
22 libdwfl/linux-kernel-modules.c | 1 +
23 libelf/elf.h | 9 ++++++---
24 6 files changed, 44 insertions(+), 4 deletions(-)
25 create mode 100644 lib/error.h
26
27diff --git a/lib/error.h b/lib/error.h
28new file mode 100644
29index 0000000..ef06827
10--- /dev/null 30--- /dev/null
11+++ b/lib/error.h 31+++ b/lib/error.h
12@@ -0,0 +1,27 @@ 32@@ -0,0 +1,27 @@
@@ -37,6 +57,8 @@ Upstream-Status: Inappropriate [workaround for musl]
37+} 57+}
38+ 58+
39+#endif /* _ERROR_H_ */ 59+#endif /* _ERROR_H_ */
60diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
61index dac2a5f..43016fc 100644
40--- a/lib/fixedsizehash.h 62--- a/lib/fixedsizehash.h
41+++ b/lib/fixedsizehash.h 63+++ b/lib/fixedsizehash.h
42@@ -30,7 +30,6 @@ 64@@ -30,7 +30,6 @@
@@ -47,6 +69,8 @@ Upstream-Status: Inappropriate [workaround for musl]
47 69
48 #include <system.h> 70 #include <system.h>
49 71
72diff --git a/lib/libeu.h b/lib/libeu.h
73index ecb4d01..edc85e3 100644
50--- a/lib/libeu.h 74--- a/lib/libeu.h
51+++ b/lib/libeu.h 75+++ b/lib/libeu.h
52@@ -29,6 +29,7 @@ 76@@ -29,6 +29,7 @@
@@ -57,6 +81,8 @@ Upstream-Status: Inappropriate [workaround for musl]
57 #include <stddef.h> 81 #include <stddef.h>
58 #include <stdint.h> 82 #include <stdint.h>
59 83
84diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
85index 7bcf61c..11dcc8b 100644
60--- a/libdwfl/dwfl_error.c 86--- a/libdwfl/dwfl_error.c
61+++ b/libdwfl/dwfl_error.c 87+++ b/libdwfl/dwfl_error.c
62@@ -154,7 +154,16 @@ dwfl_errmsg (int error) 88@@ -154,7 +154,16 @@ dwfl_errmsg (int error)
@@ -76,6 +102,8 @@ Upstream-Status: Inappropriate [workaround for musl]
76 case OTHER_ERROR (LIBELF): 102 case OTHER_ERROR (LIBELF):
77 return elf_errmsg (error & 0xffff); 103 return elf_errmsg (error & 0xffff);
78 case OTHER_ERROR (LIBDW): 104 case OTHER_ERROR (LIBDW):
105diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
106index d46ab5a..1c3faee 100644
79--- a/libdwfl/linux-kernel-modules.c 107--- a/libdwfl/linux-kernel-modules.c
80+++ b/libdwfl/linux-kernel-modules.c 108+++ b/libdwfl/linux-kernel-modules.c
81@@ -50,6 +50,7 @@ 109@@ -50,6 +50,7 @@
@@ -86,6 +114,8 @@ Upstream-Status: Inappropriate [workaround for musl]
86 114
87 /* If fts.h is included before config.h, its indirect inclusions may not 115 /* If fts.h is included before config.h, its indirect inclusions may not
88 give us the right LFS aliases of these functions, so map them manually. */ 116 give us the right LFS aliases of these functions, so map them manually. */
117diff --git a/libelf/elf.h b/libelf/elf.h
118index bed273d..be228e6 100644
89--- a/libelf/elf.h 119--- a/libelf/elf.h
90+++ b/libelf/elf.h 120+++ b/libelf/elf.h
91@@ -21,7 +21,9 @@ 121@@ -21,7 +21,9 @@
@@ -99,9 +129,9 @@ Upstream-Status: Inappropriate [workaround for musl]
99 129
100 /* Standard ELF types. */ 130 /* Standard ELF types. */
101 131
102@@ -3937,6 +3939,7 @@ enum 132@@ -4029,6 +4031,7 @@ enum
103 #define R_METAG_TLS_LE_HI16 60 133 #define R_NDS32_TLS_TPOFF 102
104 #define R_METAG_TLS_LE_LO16 61 134 #define R_NDS32_TLS_DESC 119
105 135
106-__END_DECLS 136-__END_DECLS
107- 137-
@@ -109,3 +139,6 @@ Upstream-Status: Inappropriate [workaround for musl]
109+} 139+}
110+#endif 140+#endif
111 #endif /* elf.h */ 141 #endif /* elf.h */
142--
1432.7.4
144
diff --git a/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch b/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
index 0fb7eb9236..40f2b69cf4 100644
--- a/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
+++ b/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
@@ -1,9 +1,25 @@
1From 77b89dbc9f9f965ad0ef2e341d7d46bce5f07549 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:17:25 +0800
4Subject: [PATCH 1/3] musl-obstack-fts
5
1Look for libfts and libobstack during configure, these 6Look for libfts and libobstack during configure, these
2libraries are external to libc when using musl, whereas 7libraries are external to libc when using musl, whereas
3on glibc these libraries are provided in libc itself. 8on glibc these libraries are provided in libc itself.
4 9
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
6Upstream-Status: Inappropriate [workaround for musl] 11Upstream-Status: Inappropriate [workaround for musl]
12
13Rebase to 0.177
14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15---
16 configure.ac | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
17 libdw/Makefile.am | 2 +-
18 src/Makefile.am | 8 ++++----
19 3 files changed, 59 insertions(+), 5 deletions(-)
20
21diff --git a/configure.ac b/configure.ac
22index f93964c..b87b762 100644
7--- a/configure.ac 23--- a/configure.ac
8+++ b/configure.ac 24+++ b/configure.ac
9@@ -494,6 +494,60 @@ else 25@@ -494,6 +494,60 @@ else
@@ -67,9 +83,11 @@ Upstream-Status: Inappropriate [workaround for musl]
67 dnl The directories with content. 83 dnl The directories with content.
68 84
69 dnl Documentation. 85 dnl Documentation.
86diff --git a/libdw/Makefile.am b/libdw/Makefile.am
87index 7a3d532..a541fa3 100644
70--- a/libdw/Makefile.am 88--- a/libdw/Makefile.am
71+++ b/libdw/Makefile.am 89+++ b/libdw/Makefile.am
72@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURC 90@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
73 libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ 91 libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \
74 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a 92 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a
75 libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so 93 libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
@@ -78,9 +96,11 @@ Upstream-Status: Inappropriate [workaround for musl]
78 libdw_so_SOURCES = 96 libdw_so_SOURCES =
79 libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) 97 libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
80 # The rpath is necessary for libebl because its $ORIGIN use will 98 # The rpath is necessary for libebl because its $ORIGIN use will
99diff --git a/src/Makefile.am b/src/Makefile.am
100index b72f853..2f3dfce 100644
81--- a/src/Makefile.am 101--- a/src/Makefile.am
82+++ b/src/Makefile.am 102+++ b/src/Makefile.am
83@@ -68,8 +68,8 @@ ar_no_Wstack_usage = yes 103@@ -69,8 +69,8 @@ ar_no_Wstack_usage = yes
84 unstrip_no_Wstack_usage = yes 104 unstrip_no_Wstack_usage = yes
85 105
86 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 106 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
@@ -91,7 +111,7 @@ Upstream-Status: Inappropriate [workaround for musl]
91 size_LDADD = $(libelf) $(libeu) $(argp_LDADD) 111 size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
92 strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl 112 strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
93 elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 113 elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
94@@ -77,9 +77,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $ 114@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
95 addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) 115 addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
96 elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 116 elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
97 objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 117 objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
@@ -103,3 +123,6 @@ Upstream-Status: Inappropriate [workaround for musl]
103 unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl 123 unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl
104 stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) 124 stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib)
105 elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) 125 elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
126--
1272.7.4
128
diff --git a/meta/recipes-devtools/elfutils/files/musl-utils.patch b/meta/recipes-devtools/elfutils/files/musl-utils.patch
index 8e636bf660..a8ad931236 100644
--- a/meta/recipes-devtools/elfutils/files/musl-utils.patch
+++ b/meta/recipes-devtools/elfutils/files/musl-utils.patch
@@ -1,3 +1,8 @@
1From 7f5e2fd86d54e0a4d195ec65afb9b411829dff9f Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:19:48 +0800
4Subject: [PATCH 3/3] musl-utils
5
1Provide missing defines which otherwise are available on glibc system headers 6Provide missing defines which otherwise are available on glibc system headers
2 7
3Alter the error API to match posix version 8Alter the error API to match posix version
@@ -5,6 +10,19 @@ use qsort instead of qsort_r which is glibc specific API
5 10
6Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Inappropriate [workaround for musl] 12Upstream-Status: Inappropriate [workaround for musl]
13
14Rebase to 0.177
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16---
17 src/arlib.h | 6 ++++++
18 src/elfcompress.c | 7 +++++++
19 src/readelf.c | 20 ++++++++++++--------
20 src/strip.c | 7 +++++++
21 src/unstrip.c | 9 +++++++++
22 5 files changed, 41 insertions(+), 8 deletions(-)
23
24diff --git a/src/arlib.h b/src/arlib.h
25index e117166..8326f6c 100644
8--- a/src/arlib.h 26--- a/src/arlib.h
9+++ b/src/arlib.h 27+++ b/src/arlib.h
10@@ -29,6 +29,12 @@ 28@@ -29,6 +29,12 @@
@@ -20,6 +38,8 @@ Upstream-Status: Inappropriate [workaround for musl]
20 38
21 /* State of -D/-U flags. */ 39 /* State of -D/-U flags. */
22 extern bool arlib_deterministic_output; 40 extern bool arlib_deterministic_output;
41diff --git a/src/elfcompress.c b/src/elfcompress.c
42index 6ba6af4..0c7674b 100644
23--- a/src/elfcompress.c 43--- a/src/elfcompress.c
24+++ b/src/elfcompress.c 44+++ b/src/elfcompress.c
25@@ -37,6 +37,13 @@ 45@@ -37,6 +37,13 @@
@@ -36,9 +56,11 @@ Upstream-Status: Inappropriate [workaround for musl]
36 /* Name and version of program. */ 56 /* Name and version of program. */
37 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; 57 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
38 58
59diff --git a/src/readelf.c b/src/readelf.c
60index 5c02a9b..817562d 100644
39--- a/src/readelf.c 61--- a/src/readelf.c
40+++ b/src/readelf.c 62+++ b/src/readelf.c
41@@ -4792,10 +4792,11 @@ listptr_base (struct listptr *p) 63@@ -4813,10 +4813,11 @@ listptr_base (struct listptr *p)
42 return cudie_base (&cu); 64 return cudie_base (&cu);
43 } 65 }
44 66
@@ -52,7 +74,7 @@ Upstream-Status: Inappropriate [workaround for musl]
52 struct listptr *p1 = (void *) a; 74 struct listptr *p1 = (void *) a;
53 struct listptr *p2 = (void *) b; 75 struct listptr *p2 = (void *) b;
54 76
55@@ -4811,21 +4812,21 @@ compare_listptr (const void *a, const vo 77@@ -4832,21 +4833,21 @@ compare_listptr (const void *a, const void *b, void *arg)
56 p1->warned = p2->warned = true; 78 p1->warned = p2->warned = true;
57 error (0, 0, 79 error (0, 0,
58 gettext ("%s %#" PRIx64 " used with different address sizes"), 80 gettext ("%s %#" PRIx64 " used with different address sizes"),
@@ -77,7 +99,7 @@ Upstream-Status: Inappropriate [workaround for musl]
77 } 99 }
78 if (p1->attr != p2 ->attr) 100 if (p1->attr != p2 ->attr)
79 { 101 {
80@@ -4833,7 +4834,7 @@ compare_listptr (const void *a, const vo 102@@ -4854,7 +4855,7 @@ compare_listptr (const void *a, const void *b, void *arg)
81 error (0, 0, 103 error (0, 0,
82 gettext ("%s %#" PRIx64 104 gettext ("%s %#" PRIx64
83 " used with different attribute %s and %s"), 105 " used with different attribute %s and %s"),
@@ -86,7 +108,7 @@ Upstream-Status: Inappropriate [workaround for musl]
86 dwarf_attr_name (p2->attr)); 108 dwarf_attr_name (p2->attr));
87 } 109 }
88 } 110 }
89@@ -4905,8 +4906,11 @@ static void 111@@ -4926,8 +4927,11 @@ static void
90 sort_listptr (struct listptr_table *table, const char *name) 112 sort_listptr (struct listptr_table *table, const char *name)
91 { 113 {
92 if (table->n > 0) 114 if (table->n > 0)
@@ -100,6 +122,8 @@ Upstream-Status: Inappropriate [workaround for musl]
100 } 122 }
101 123
102 static bool 124 static bool
125diff --git a/src/strip.c b/src/strip.c
126index 4054c2a..d2d2176 100644
103--- a/src/strip.c 127--- a/src/strip.c
104+++ b/src/strip.c 128+++ b/src/strip.c
105@@ -46,6 +46,13 @@ 129@@ -46,6 +46,13 @@
@@ -116,6 +140,8 @@ Upstream-Status: Inappropriate [workaround for musl]
116 typedef uint8_t GElf_Byte; 140 typedef uint8_t GElf_Byte;
117 141
118 /* Name and version of program. */ 142 /* Name and version of program. */
143diff --git a/src/unstrip.c b/src/unstrip.c
144index fc87832..21ea6b3 100644
119--- a/src/unstrip.c 145--- a/src/unstrip.c
120+++ b/src/unstrip.c 146+++ b/src/unstrip.c
121@@ -56,6 +56,15 @@ 147@@ -56,6 +56,15 @@
@@ -134,3 +160,6 @@ Upstream-Status: Inappropriate [workaround for musl]
134 /* Name and version of program. */ 160 /* Name and version of program. */
135 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; 161 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
136 162
163--
1642.7.4
165