summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils/files/0003-musl-utils.patch')
-rw-r--r--meta/recipes-devtools/elfutils/files/0003-musl-utils.patch91
1 files changed, 12 insertions, 79 deletions
diff --git a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index a8b39b5f93..65593be32f 100644
--- a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,4 +1,4 @@
1From e7e5333ed2e19f25ecbd7121f424eec99d61265a Mon Sep 17 00:00:00 2001 1From 2dab1a02a3cfd80629f3e0f380805a5e58dd0ac3 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:19:48 +0800 3Date: Fri, 23 Aug 2019 10:19:48 +0800
4Subject: [PATCH] musl-utils 4Subject: [PATCH] musl-utils
@@ -15,12 +15,11 @@ Rebase to 0.177
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16 16
17--- 17---
18 src/arlib.h | 6 ++++++ 18 src/arlib.h | 6 ++++++
19 src/elfcompress.c | 7 +++++++ 19 src/elfcompress.c | 7 +++++++
20 src/readelf.c | 20 ++++++++++++-------- 20 src/strip.c | 7 +++++++
21 src/strip.c | 7 +++++++ 21 src/unstrip.c | 9 +++++++++
22 src/unstrip.c | 9 +++++++++ 22 4 files changed, 29 insertions(+)
23 5 files changed, 41 insertions(+), 8 deletions(-)
24 23
25diff --git a/src/arlib.h b/src/arlib.h 24diff --git a/src/arlib.h b/src/arlib.h
26index e117166..8326f6c 100644 25index e117166..8326f6c 100644
@@ -40,7 +39,7 @@ index e117166..8326f6c 100644
40 /* State of -D/-U flags. */ 39 /* State of -D/-U flags. */
41 extern bool arlib_deterministic_output; 40 extern bool arlib_deterministic_output;
42diff --git a/src/elfcompress.c b/src/elfcompress.c 41diff --git a/src/elfcompress.c b/src/elfcompress.c
43index 6ba6af4..0c7674b 100644 42index 1b5b1e3..21c9024 100644
44--- a/src/elfcompress.c 43--- a/src/elfcompress.c
45+++ b/src/elfcompress.c 44+++ b/src/elfcompress.c
46@@ -37,6 +37,13 @@ 45@@ -37,6 +37,13 @@
@@ -57,74 +56,8 @@ index 6ba6af4..0c7674b 100644
57 /* Name and version of program. */ 56 /* Name and version of program. */
58 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; 57 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
59 58
60diff --git a/src/readelf.c b/src/readelf.c
61index 64067a5..630739c 100644
62--- a/src/readelf.c
63+++ b/src/readelf.c
64@@ -4829,10 +4829,11 @@ listptr_base (struct listptr *p)
65 return cudie_base (&cu);
66 }
67
68+static const char *listptr_name;
69+
70 static int
71-compare_listptr (const void *a, const void *b, void *arg)
72+compare_listptr (const void *a, const void *b)
73 {
74- const char *name = arg;
75 struct listptr *p1 = (void *) a;
76 struct listptr *p2 = (void *) b;
77
78@@ -4848,21 +4849,21 @@ compare_listptr (const void *a, const void *b, void *arg)
79 p1->warned = p2->warned = true;
80 error (0, 0,
81 gettext ("%s %#" PRIx64 " used with different address sizes"),
82- name, (uint64_t) p1->offset);
83+ listptr_name, (uint64_t) p1->offset);
84 }
85 if (p1->dwarf64 != p2->dwarf64)
86 {
87 p1->warned = p2->warned = true;
88 error (0, 0,
89 gettext ("%s %#" PRIx64 " used with different offset sizes"),
90- name, (uint64_t) p1->offset);
91+ listptr_name, (uint64_t) p1->offset);
92 }
93 if (listptr_base (p1) != listptr_base (p2))
94 {
95 p1->warned = p2->warned = true;
96 error (0, 0,
97 gettext ("%s %#" PRIx64 " used with different base addresses"),
98- name, (uint64_t) p1->offset);
99+ listptr_name, (uint64_t) p1->offset);
100 }
101 if (p1->attr != p2 ->attr)
102 {
103@@ -4870,7 +4871,7 @@ compare_listptr (const void *a, const void *b, void *arg)
104 error (0, 0,
105 gettext ("%s %#" PRIx64
106 " used with different attribute %s and %s"),
107- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
108+ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
109 dwarf_attr_name (p2->attr));
110 }
111 }
112@@ -4942,8 +4943,11 @@ static void
113 sort_listptr (struct listptr_table *table, const char *name)
114 {
115 if (table->n > 0)
116- qsort_r (table->table, table->n, sizeof table->table[0],
117- &compare_listptr, (void *) name);
118+ {
119+ listptr_name = name;
120+ qsort (table->table, table->n, sizeof table->table[0],
121+ &compare_listptr);
122+ }
123 }
124
125 static bool
126diff --git a/src/strip.c b/src/strip.c 59diff --git a/src/strip.c b/src/strip.c
127index 48792a7..198a2e4 100644 60index 7a5d4e4..81a0d57 100644
128--- a/src/strip.c 61--- a/src/strip.c
129+++ b/src/strip.c 62+++ b/src/strip.c
130@@ -46,6 +46,13 @@ 63@@ -46,6 +46,13 @@
@@ -142,12 +75,12 @@ index 48792a7..198a2e4 100644
142 75
143 /* Name and version of program. */ 76 /* Name and version of program. */
144diff --git a/src/unstrip.c b/src/unstrip.c 77diff --git a/src/unstrip.c b/src/unstrip.c
145index a855038..df6fc1c 100644 78index 8580329..d547487 100644
146--- a/src/unstrip.c 79--- a/src/unstrip.c
147+++ b/src/unstrip.c 80+++ b/src/unstrip.c
148@@ -56,6 +56,15 @@ 81@@ -52,6 +52,15 @@
149 # define _(str) gettext (str) 82 #include "libeu.h"
150 #endif 83 #include "printversion.h"
151 84
152+#ifndef strndupa 85+#ifndef strndupa
153+#define strndupa(s, n) \ 86+#define strndupa(s, n) \