summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/debian
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils/files/debian')
-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
14 files changed, 331 insertions, 177 deletions
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