summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-01-14 14:59:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-16 22:33:09 +0000
commite2848469adc841299c9067ba8183b3a7c0c20b57 (patch)
tree9f0b5576ff50d7009a5138fab3a2a2b149f8e1b1 /meta/recipes-devtools/elfutils
parent83b900fec5e07414b0f06fc1ecc11ed145cc19d5 (diff)
downloadpoky-e2848469adc841299c9067ba8183b3a7c0c20b57.tar.gz
elfutils: upgrade 0.177 -> 0.178
Remove 0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch as issue fixed upstream. Rebase other patches. Adjust ptests, pass rate is now 100% again: ====================== All 206 tests passed (6 tests were not run) ====================== (From OE-Core rev: dce25738c82335f2a92b32bd52f0c63e2dbd336e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.178.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.177.bb)27
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch12
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch8
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-musl-obstack-fts.patch (renamed from meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch)55
-rw-r--r--meta/recipes-devtools/elfutils/files/0002-musl-libs.patch (renamed from meta/recipes-devtools/elfutils/files/musl-libs.patch)7
-rw-r--r--meta/recipes-devtools/elfutils/files/0003-musl-utils.patch (renamed from meta/recipes-devtools/elfutils/files/musl-utils.patch)19
-rw-r--r--meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch (renamed from meta/recipes-devtools/elfutils/files/musl-tests.patch)20
-rw-r--r--meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch42
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff51
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_backend.diff85
-rw-r--r--meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch22
11 files changed, 162 insertions, 186 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.178.bb
index e7740c7fb4..9393628dd1 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.177.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.178.bb
@@ -13,7 +13,6 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
13 file://0003-fixheadercheck.patch \ 13 file://0003-fixheadercheck.patch \
14 file://0004-Disable-the-test-to-convert-euc-jp.patch \ 14 file://0004-Disable-the-test-to-convert-euc-jp.patch \
15 file://0006-Fix-build-on-aarch64-musl.patch \ 15 file://0006-Fix-build-on-aarch64-musl.patch \
16 file://0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch \
17 file://0001-libasm-may-link-with-libbz2-if-found.patch \ 16 file://0001-libasm-may-link-with-libbz2-if-found.patch \
18 file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \ 17 file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
19 file://debian/hppa_backend.diff \ 18 file://debian/hppa_backend.diff \
@@ -36,17 +35,17 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
36 file://ptest.patch \ 35 file://ptest.patch \
37 " 36 "
38SRC_URI_append_libc-musl = " \ 37SRC_URI_append_libc-musl = " \
39 file://musl-obstack-fts.patch \ 38 file://0001-musl-obstack-fts.patch \
40 file://musl-libs.patch \ 39 file://0002-musl-libs.patch \
41 file://musl-utils.patch \ 40 file://0003-musl-utils.patch \
42 file://musl-tests.patch \ 41 file://0004-Fix-error-on-musl.patch \
43 " 42 "
44SRC_URI[md5sum] = "0b583722f911e1632544718d502aab87" 43SRC_URI[md5sum] = "5480d0b7174446aba13a6adde107287f"
45SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e" 44SRC_URI[sha256sum] = "31e7a00e96d4e9c4bda452e1f2cdac4daf8abd24f5e154dee232131899f3a0f2"
46 45
47inherit autotools gettext ptest 46inherit autotools gettext ptest pkgconfig
48 47
49EXTRA_OECONF = "--program-prefix=eu-" 48EXTRA_OECONF = "--program-prefix=eu- --disable-debuginfod"
50 49
51DEPENDS_BZIP2 = "bzip2-replacement-native" 50DEPENDS_BZIP2 = "bzip2-replacement-native"
52DEPENDS_BZIP2_class-target = "bzip2" 51DEPENDS_BZIP2_class-target = "bzip2"
@@ -73,10 +72,11 @@ do_compile_ptest() {
73do_install_ptest() { 72do_install_ptest() {
74 if [ ${PTEST_ENABLED} = "1" ]; then 73 if [ ${PTEST_ENABLED} = "1" ]; then
75 # copy the files which needed by the cases 74 # copy the files which needed by the cases
76 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint" 75 TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip"
77 install -d -m 755 ${D}${PTEST_PATH}/src 76 install -d -m 755 ${D}${PTEST_PATH}/src
78 install -d -m 755 ${D}${PTEST_PATH}/libelf 77 install -d -m 755 ${D}${PTEST_PATH}/libelf
79 install -d -m 755 ${D}${PTEST_PATH}/libdw 78 install -d -m 755 ${D}${PTEST_PATH}/libdw
79 install -d -m 755 ${D}${PTEST_PATH}/libasm
80 for test_file in ${TEST_FILES}; do 80 for test_file in ${TEST_FILES}; do
81 if [ -f ${B}/src/${test_file} ]; then 81 if [ -f ${B}/src/${test_file} ]; then
82 cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src 82 cp -r ${B}/src/${test_file} ${D}${PTEST_PATH}/src
@@ -84,6 +84,7 @@ do_install_ptest() {
84 done 84 done
85 cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so 85 cp ${D}${libdir}/libelf-${PV}.so ${D}${PTEST_PATH}/libelf/libelf.so
86 cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so 86 cp ${D}${libdir}/libdw-${PV}.so ${D}${PTEST_PATH}/libdw/libdw.so
87 cp ${D}${libdir}/libasm-${PV}.so ${D}${PTEST_PATH}/libasm/libasm.so
87 cp -r ${S}/tests/ ${D}${PTEST_PATH} 88 cp -r ${S}/tests/ ${D}${PTEST_PATH}
88 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests 89 cp -r ${B}/tests/* ${D}${PTEST_PATH}/tests
89 cp -r ${B}/config.h ${D}${PTEST_PATH} 90 cp -r ${B}/config.h ${D}${PTEST_PATH}
@@ -146,10 +147,14 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
146 ${PKGD}${PTEST_PATH}/src/readelf \ 147 ${PKGD}${PTEST_PATH}/src/readelf \
147 ${PKGD}${PTEST_PATH}/src/nm \ 148 ${PKGD}${PTEST_PATH}/src/nm \
148 ${PKGD}${PTEST_PATH}/src/elflint \ 149 ${PKGD}${PTEST_PATH}/src/elflint \
150 ${PKGD}${PTEST_PATH}/src/elfclassify \
151 ${PKGD}${PTEST_PATH}/src/stack \
152 ${PKGD}${PTEST_PATH}/src/unstrip \
149 ${PKGD}${PTEST_PATH}/libelf/libelf.so \ 153 ${PKGD}${PTEST_PATH}/libelf/libelf.so \
150 ${PKGD}${PTEST_PATH}/libdw/libdw.so \ 154 ${PKGD}${PTEST_PATH}/libdw/libdw.so \
155 ${PKGD}${PTEST_PATH}/libasm/libasm.so \
151 ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \ 156 ${PKGD}${PTEST_PATH}/backends/libebl_i386.so \
152 ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \ 157 ${PKGD}${PTEST_PATH}/backends/libebl_x86_64.so \
153" 158"
154 159
155PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1" 160PRIVATE_LIBS_${PN}-ptest = "libdw.so.1 libelf.so.1 libasm.so.1"
diff --git a/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
index af79ef496d..62031073e3 100644
--- a/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-dso-link-change.patch
@@ -1,4 +1,4 @@
1From b99aa12cf879ce200e03d75e543c7ab2dfa5503b Mon Sep 17 00:00:00 2001 1From ec9a7742734aae5417c0ebbffce66ac353e6cae7 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 15 Aug 2017 17:10:57 +0800 3Date: Tue, 15 Aug 2017 17:10:57 +0800
4Subject: [PATCH] dso link change 4Subject: [PATCH] dso link change
@@ -23,10 +23,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
23 2 files changed, 2 insertions(+), 2 deletions(-) 23 2 files changed, 2 insertions(+), 2 deletions(-)
24 24
25diff --git a/src/Makefile.am b/src/Makefile.am 25diff --git a/src/Makefile.am b/src/Makefile.am
26index 2b1c0dc..9305b84 100644 26index e462e7d..ea1215b 100644
27--- a/src/Makefile.am 27--- a/src/Makefile.am
28+++ b/src/Makefile.am 28+++ b/src/Makefile.am
29@@ -44,7 +44,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl 29@@ -45,7 +45,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
30 libelf = ../libelf/libelf.a -lz 30 libelf = ../libelf/libelf.a -lz
31 else 31 else
32 libasm = ../libasm/libasm.so 32 libasm = ../libasm/libasm.so
@@ -34,12 +34,12 @@ index 2b1c0dc..9305b84 100644
34+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl 34+libdw = ../libdw/libdw.so $(zip_LIBS) $(libelf) $(libebl) -ldl
35 libelf = ../libelf/libelf.so 35 libelf = ../libelf/libelf.so
36 endif 36 endif
37 libebl = ../libebl/libebl.a 37 libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
38diff --git a/tests/Makefile.am b/tests/Makefile.am 38diff --git a/tests/Makefile.am b/tests/Makefile.am
39index 1b0c7d3..bced19b 100644 39index eab4ae6..f59a01f 100644
40--- a/tests/Makefile.am 40--- a/tests/Makefile.am
41+++ b/tests/Makefile.am 41+++ b/tests/Makefile.am
42@@ -476,7 +476,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl 42@@ -516,7 +516,7 @@ libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
43 libelf = ../libelf/libelf.a -lz 43 libelf = ../libelf/libelf.a -lz
44 libasm = ../libasm/libasm.a 44 libasm = ../libasm/libasm.a
45 else 45 else
diff --git a/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch b/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
index 0d533c8f10..73ead6d412 100644
--- a/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-libasm-may-link-with-libbz2-if-found.patch
@@ -1,4 +1,4 @@
1From d7be687c35fa42954874034c82ca9059d28196fe Mon Sep 17 00:00:00 2001 1From 8e5fff8b1d819e0870fb22b27950bb5f10c7a272 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 4 Oct 2017 22:30:46 -0700 3Date: Wed, 4 Oct 2017 22:30:46 -0700
4Subject: [PATCH] libasm may link with libbz2 if found 4Subject: [PATCH] libasm may link with libbz2 if found
@@ -17,16 +17,16 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
17 1 file changed, 2 insertions(+), 2 deletions(-) 17 1 file changed, 2 insertions(+), 2 deletions(-)
18 18
19diff --git a/src/Makefile.am b/src/Makefile.am 19diff --git a/src/Makefile.am b/src/Makefile.am
20index 9305b84..9b7e853 100644 20index ea1215b..13d9bda 100644
21--- a/src/Makefile.am 21--- a/src/Makefile.am
22+++ b/src/Makefile.am 22+++ b/src/Makefile.am
23@@ -39,11 +39,11 @@ EXTRA_DIST += make-debug-archive.in 23@@ -40,11 +40,11 @@ EXTRA_DIST += make-debug-archive.in
24 CLEANFILES += make-debug-archive 24 CLEANFILES += make-debug-archive
25 25
26 if BUILD_STATIC 26 if BUILD_STATIC
27-libasm = ../libasm/libasm.a 27-libasm = ../libasm/libasm.a
28+libasm = ../libasm/libasm.a $(zip_LIBS) 28+libasm = ../libasm/libasm.a $(zip_LIBS)
29 libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl 29 libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
30 libelf = ../libelf/libelf.a -lz 30 libelf = ../libelf/libelf.a -lz
31 else 31 else
32-libasm = ../libasm/libasm.so 32-libasm = ../libasm/libasm.so
diff --git a/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch b/meta/recipes-devtools/elfutils/files/0001-musl-obstack-fts.patch
index 40f2b69cf4..f751a2ecdb 100644
--- a/meta/recipes-devtools/elfutils/files/musl-obstack-fts.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-musl-obstack-fts.patch
@@ -1,7 +1,7 @@
1From 77b89dbc9f9f965ad0ef2e341d7d46bce5f07549 Mon Sep 17 00:00:00 2001 1From 8ccf3d92b8766b53f203df7e01b489604ef851f3 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:17:25 +0800 3Date: Fri, 23 Aug 2019 10:17:25 +0800
4Subject: [PATCH 1/3] musl-obstack-fts 4Subject: [PATCH 1/4] musl-obstack-fts
5 5
6Look for libfts and libobstack during configure, these 6Look for libfts and libobstack during configure, these
7libraries are external to libc when using musl, whereas 7libraries are external to libc when using musl, whereas
@@ -12,17 +12,18 @@ Upstream-Status: Inappropriate [workaround for musl]
12 12
13Rebase to 0.177 13Rebase to 0.177
14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 14Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
15
15--- 16---
16 configure.ac | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 17 configure.ac | 54 +++++++++++++++++++++++++++++++++++++++++++++++
17 libdw/Makefile.am | 2 +- 18 libdw/Makefile.am | 2 +-
18 src/Makefile.am | 8 ++++---- 19 src/Makefile.am | 6 +++---
19 3 files changed, 59 insertions(+), 5 deletions(-) 20 3 files changed, 58 insertions(+), 4 deletions(-)
20 21
21diff --git a/configure.ac b/configure.ac 22diff --git a/configure.ac b/configure.ac
22index f93964c..b87b762 100644 23index cad7b2b..6d4229b 100644
23--- a/configure.ac 24--- a/configure.ac
24+++ b/configure.ac 25+++ b/configure.ac
25@@ -494,6 +494,60 @@ else 26@@ -529,6 +529,60 @@ else
26 fi 27 fi
27 AC_SUBST([argp_LDADD]) 28 AC_SUBST([argp_LDADD])
28 29
@@ -84,45 +85,43 @@ index f93964c..b87b762 100644
84 85
85 dnl Documentation. 86 dnl Documentation.
86diff --git a/libdw/Makefile.am b/libdw/Makefile.am 87diff --git a/libdw/Makefile.am b/libdw/Makefile.am
87index 7a3d532..a541fa3 100644 88index 33b5838..ff92e02 100644
88--- a/libdw/Makefile.am 89--- a/libdw/Makefile.am
89+++ b/libdw/Makefile.am 90+++ b/libdw/Makefile.am
90@@ -108,7 +108,7 @@ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) 91@@ -109,7 +109,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \
91 libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ 92 ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \
92 ../libdwfl/libdwfl_pic.a ../libebl/libebl.a 93 ../libdwfl/libdwfl_pic.a
93 libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so 94 libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
94-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) 95-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -pthread
95+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LDADD) $(zip_LIBS) 96+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LDADD) $(zip_LIBS) -pthread
96 libdw_so_SOURCES = 97 libdw_so_SOURCES =
97 libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) 98 libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
98 # The rpath is necessary for libebl because its $ORIGIN use will 99 $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
99diff --git a/src/Makefile.am b/src/Makefile.am 100diff --git a/src/Makefile.am b/src/Makefile.am
100index b72f853..2f3dfce 100644 101index 13d9bda..d5a4f7d 100644
101--- a/src/Makefile.am 102--- a/src/Makefile.am
102+++ b/src/Makefile.am 103+++ b/src/Makefile.am
103@@ -69,8 +69,8 @@ ar_no_Wstack_usage = yes 104@@ -69,7 +69,7 @@ ar_no_Wstack_usage = yes
104 unstrip_no_Wstack_usage = yes 105 unstrip_no_Wstack_usage = yes
105 106
106 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 107 readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD)
107-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ 108-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \
108- $(demanglelib) 109+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) \
109+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \ 110 $(demanglelib)
110+ $(obstack_LDADD) -ldl $(demanglelib)
111 size_LDADD = $(libelf) $(libeu) $(argp_LDADD) 111 size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
112 strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl 112 strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
113 elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl
114@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) 113@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
115 addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) 114 addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
116 elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 115 elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
117 objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl 116 objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
118-ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) 117-ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
119+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) 118+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD)
120 strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) 119 strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
121-ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) 120-ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
122+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) 121+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD)
123 unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl 122 unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
124 stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) 123 stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
125 elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) 124 elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
126-- 125--
1272.7.4 1262.17.1
128 127
diff --git a/meta/recipes-devtools/elfutils/files/musl-libs.patch b/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
index b9b9f120df..cf14683864 100644
--- a/meta/recipes-devtools/elfutils/files/musl-libs.patch
+++ b/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
@@ -1,7 +1,7 @@
1From d5a1651df9884fcf57ed320bc2f866538af2f420 Mon Sep 17 00:00:00 2001 1From ea908c7009de5a208383abf4bec4c6b3d9519ca3 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:18:47 +0800 3Date: Fri, 23 Aug 2019 10:18:47 +0800
4Subject: [PATCH 2/3] musl-libs 4Subject: [PATCH 2/4] musl-libs
5 5
6Collection of fixes needed to compile libelf and other libraries 6Collection of fixes needed to compile libelf and other libraries
7provided by elfutils for musl targets 7provided by elfutils for musl targets
@@ -14,6 +14,7 @@ Upstream-Status: Inappropriate [workaround for musl]
14 14
15Rebase to 0.177 15Rebase to 0.177
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17
17--- 18---
18 lib/error.h | 27 +++++++++++++++++++++++++++ 19 lib/error.h | 27 +++++++++++++++++++++++++++
19 lib/fixedsizehash.h | 1 - 20 lib/fixedsizehash.h | 1 -
@@ -140,5 +141,5 @@ index bed273d..be228e6 100644
140+#endif 141+#endif
141 #endif /* elf.h */ 142 #endif /* elf.h */
142-- 143--
1432.7.4 1442.17.1
144 145
diff --git a/meta/recipes-devtools/elfutils/files/musl-utils.patch b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index a8ad931236..79c9d9ad57 100644
--- a/meta/recipes-devtools/elfutils/files/musl-utils.patch
+++ b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,7 +1,7 @@
1From 7f5e2fd86d54e0a4d195ec65afb9b411829dff9f Mon Sep 17 00:00:00 2001 1From 94028b16e56c8eef1aa02dcc4da268a0e471b4ea 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 3/3] musl-utils 4Subject: [PATCH 3/4] musl-utils
5 5
6Provide missing defines which otherwise are available on glibc system headers 6Provide missing defines which otherwise are available on glibc system headers
7 7
@@ -13,6 +13,7 @@ Upstream-Status: Inappropriate [workaround for musl]
13 13
14Rebase to 0.177 14Rebase 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 src/arlib.h | 6 ++++++ 18 src/arlib.h | 6 ++++++
18 src/elfcompress.c | 7 +++++++ 19 src/elfcompress.c | 7 +++++++
@@ -57,10 +58,10 @@ index 6ba6af4..0c7674b 100644
57 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; 58 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
58 59
59diff --git a/src/readelf.c b/src/readelf.c 60diff --git a/src/readelf.c b/src/readelf.c
60index 5c02a9b..817562d 100644 61index 5994615..f3cc071 100644
61--- a/src/readelf.c 62--- a/src/readelf.c
62+++ b/src/readelf.c 63+++ b/src/readelf.c
63@@ -4813,10 +4813,11 @@ listptr_base (struct listptr *p) 64@@ -4829,10 +4829,11 @@ listptr_base (struct listptr *p)
64 return cudie_base (&cu); 65 return cudie_base (&cu);
65 } 66 }
66 67
@@ -74,7 +75,7 @@ index 5c02a9b..817562d 100644
74 struct listptr *p1 = (void *) a; 75 struct listptr *p1 = (void *) a;
75 struct listptr *p2 = (void *) b; 76 struct listptr *p2 = (void *) b;
76 77
77@@ -4832,21 +4833,21 @@ compare_listptr (const void *a, const void *b, void *arg) 78@@ -4848,21 +4849,21 @@ compare_listptr (const void *a, const void *b, void *arg)
78 p1->warned = p2->warned = true; 79 p1->warned = p2->warned = true;
79 error (0, 0, 80 error (0, 0,
80 gettext ("%s %#" PRIx64 " used with different address sizes"), 81 gettext ("%s %#" PRIx64 " used with different address sizes"),
@@ -99,7 +100,7 @@ index 5c02a9b..817562d 100644
99 } 100 }
100 if (p1->attr != p2 ->attr) 101 if (p1->attr != p2 ->attr)
101 { 102 {
102@@ -4854,7 +4855,7 @@ compare_listptr (const void *a, const void *b, void *arg) 103@@ -4870,7 +4871,7 @@ compare_listptr (const void *a, const void *b, void *arg)
103 error (0, 0, 104 error (0, 0,
104 gettext ("%s %#" PRIx64 105 gettext ("%s %#" PRIx64
105 " used with different attribute %s and %s"), 106 " used with different attribute %s and %s"),
@@ -108,7 +109,7 @@ index 5c02a9b..817562d 100644
108 dwarf_attr_name (p2->attr)); 109 dwarf_attr_name (p2->attr));
109 } 110 }
110 } 111 }
111@@ -4926,8 +4927,11 @@ static void 112@@ -4942,8 +4943,11 @@ static void
112 sort_listptr (struct listptr_table *table, const char *name) 113 sort_listptr (struct listptr_table *table, const char *name)
113 { 114 {
114 if (table->n > 0) 115 if (table->n > 0)
@@ -141,7 +142,7 @@ index 4054c2a..d2d2176 100644
141 142
142 /* Name and version of program. */ 143 /* Name and version of program. */
143diff --git a/src/unstrip.c b/src/unstrip.c 144diff --git a/src/unstrip.c b/src/unstrip.c
144index fc87832..21ea6b3 100644 145index 9b8c09a..1fb5063 100644
145--- a/src/unstrip.c 146--- a/src/unstrip.c
146+++ b/src/unstrip.c 147+++ b/src/unstrip.c
147@@ -56,6 +56,15 @@ 148@@ -56,6 +56,15 @@
@@ -161,5 +162,5 @@ index fc87832..21ea6b3 100644
161 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; 162 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
162 163
163-- 164--
1642.7.4 1652.17.1
165 166
diff --git a/meta/recipes-devtools/elfutils/files/musl-tests.patch b/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
index be35791b1a..1b2f9ed98b 100644
--- a/meta/recipes-devtools/elfutils/files/musl-tests.patch
+++ b/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
@@ -1,4 +1,7 @@
1Fix error on musl: 1From 7ff8cbecde7455b530fa7894a78d2326799f2556 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Wed, 1 May 2019 22:15:03 +0100
4Subject: [PATCH 4/4] Fix error on musl:
2 5
3| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main': 6| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main':
4| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'? 7| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'?
@@ -11,10 +14,14 @@ Upstream-Status: Inappropriate [workaround in musl]
11 14
12Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 15Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13 16
14Index: elfutils-0.176/tests/elfstrmerge.c 17---
15=================================================================== 18 tests/elfstrmerge.c | 5 +++++
16--- elfutils-0.176.orig/tests/elfstrmerge.c 19 1 file changed, 5 insertions(+)
17+++ elfutils-0.176/tests/elfstrmerge.c 20
21diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
22index ba0d68d..1d2447f 100644
23--- a/tests/elfstrmerge.c
24+++ b/tests/elfstrmerge.c
18@@ -33,6 +33,11 @@ 25@@ -33,6 +33,11 @@
19 #include ELFUTILS_HEADER(dwelf) 26 #include ELFUTILS_HEADER(dwelf)
20 #include "elf-knowledge.h" 27 #include "elf-knowledge.h"
@@ -27,3 +34,6 @@ Index: elfutils-0.176/tests/elfstrmerge.c
27 /* The original ELF file. */ 34 /* The original ELF file. */
28 static int fd = -1; 35 static int fd = -1;
29 static Elf *elf = NULL; 36 static Elf *elf = NULL;
37--
382.17.1
39
diff --git a/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch b/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
deleted file mode 100644
index 611a24c0f5..0000000000
--- a/meta/recipes-devtools/elfutils/files/0007-Fix-control-path-where-we-have-str-as-uninitialized-.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 112d1645bab7922c7796fe32ddea8fa6e1bbded1 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 29 Jun 2018 15:14:28 +0800
4Subject: [PATCH] Fix control path where we have str as uninitialized string
5
6|
7/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:
8In function 'i386_disasm':
9|
10/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5:
11error: 'str' may be used uninitialized in this function
12[-Werror=maybe-uninitialized]
13| memcpy (buf + bufcnt, _str, _len); \
14| ^
15|
16/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17:
17note: 'str' was declared here
18| const char *str;
19
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21Upstream-Status: Pending
22
23Rebase to 0.172
24
25Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
26
27---
28 libcpu/i386_disasm.c | 1 +
29 1 file changed, 1 insertion(+)
30
31diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
32index a7e03f9..837a3a8 100644
33--- a/libcpu/i386_disasm.c
34+++ b/libcpu/i386_disasm.c
35@@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
36 }
37 FALLTHROUGH;
38 default:
39+ str = "";
40 assert (! "INVALID not handled");
41 }
42 }
diff --git a/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
index 4460d582c7..53fa2f435b 100644
--- a/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/hppa_backend.diff
@@ -1,4 +1,4 @@
1From 8efad9105b38985bea373416ae8fcacf21d1d129 Mon Sep 17 00:00:00 2001 1From ffb811e18d7046d5bbe54ede5b1b7e14eaac0146 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 Aug 2019 15:44:18 +0800 3Date: Wed, 21 Aug 2019 15:44:18 +0800
4Subject: [PATCH] hppa backend 4Subject: [PATCH] hppa backend
@@ -6,15 +6,16 @@ Subject: [PATCH] hppa backend
6Rebase to 0.177 6Rebase to 0.177
7Upstream-Status: Pending [from debian] 7Upstream-Status: Pending [from debian]
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9
9--- 10---
10 backends/Makefile.am | 7 +- 11 backends/Makefile.am | 7 +-
11 backends/libebl_parisc.h | 9 ++ 12 backends/libebl_parisc.h | 9 ++
12 backends/parisc_init.c | 73 ++++++++++++++++ 13 backends/parisc_init.c | 73 +++++++++++++
13 backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++++++++ 14 backends/parisc_regs.c | 159 ++++++++++++++++++++++++++++
14 backends/parisc_reloc.def | 128 ++++++++++++++++++++++++++++ 15 backends/parisc_reloc.def | 128 +++++++++++++++++++++++
15 backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++ 16 backends/parisc_retval.c | 213 ++++++++++++++++++++++++++++++++++++++
16 backends/parisc_symbol.c | 113 ++++++++++++++++++++++++ 17 backends/parisc_symbol.c | 113 ++++++++++++++++++++
17 libelf/elf.h | 11 +++ 18 libelf/elf.h | 11 ++
18 8 files changed, 711 insertions(+), 2 deletions(-) 19 8 files changed, 711 insertions(+), 2 deletions(-)
19 create mode 100644 backends/libebl_parisc.h 20 create mode 100644 backends/libebl_parisc.h
20 create mode 100644 backends/parisc_init.c 21 create mode 100644 backends/parisc_init.c
@@ -24,31 +25,30 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24 create mode 100644 backends/parisc_symbol.c 25 create mode 100644 backends/parisc_symbol.c
25 26
26diff --git a/backends/Makefile.am b/backends/Makefile.am 27diff --git a/backends/Makefile.am b/backends/Makefile.am
27index 175468f..91a38e2 100644 28index f405212..4755f61 100644
28--- a/backends/Makefile.am 29--- a/backends/Makefile.am
29+++ b/backends/Makefile.am 30+++ b/backends/Makefile.am
30@@ -33,16 +33,19 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ 31@@ -37,7 +37,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
31 32 noinst_LIBRARIES = libebl_backends.a libebl_backends_pic.a
32 33
33 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ 34 modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
34- tilegx m68k bpf riscv csky 35- tilegx m68k bpf riscv csky
35+ tilegx m68k bpf riscv csky parisc 36+ tilegx m68k bpf riscv csky parisc
36 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ 37+
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 \
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 \
41- libebl_csky_pic.a
42+ libebl_csky_pic.a libebl_parisc_pic.a
43 noinst_LIBRARIES = $(libebl_pic)
44 noinst_DATA = $(libebl_pic:_pic.a=.so)
45
46+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c 38+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
47+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
48+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
49 39
50 libelf = ../libelf/libelf.so 40 i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
51 libdw = ../libdw/libdw.so 41 i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \
42@@ -102,7 +104,8 @@ libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
43 $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \
44 $(aarch64_SRCS) $(sparc_SRCS) $(ppc_SRCS) \
45 $(ppc64_SRCS) $(s390_SRCS) $(tilegx_SRCS) \
46- $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS)
47+ $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS) \
48+ $(parisc_SRCS)
49
50 libebl_backends_pic_a_SOURCES =
51 am_libebl_backends_pic_a_OBJECTS = $(libebl_backends_a_SOURCES:.c=.os)
52diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h 52diff --git a/backends/libebl_parisc.h b/backends/libebl_parisc.h
53new file mode 100644 53new file mode 100644
54index 0000000..f473b79 54index 0000000..f473b79
@@ -826,6 +826,3 @@ index 01648bd..218ceb2 100644
826 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ 826 #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
827 #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ 827 #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
828 #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/mips_backend.diff b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
index 1097b0ec6f..749faa403f 100644
--- a/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_backend.diff
@@ -1,4 +1,4 @@
1From 68b497668cde5171880d073a7ea50d11c3bddbfc Mon Sep 17 00:00:00 2001 1From 7e0b036d087dfff7f5e306f52fc78745f99454c3 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 Aug 2019 15:49:52 +0800 3Date: Wed, 21 Aug 2019 15:49:52 +0800
4Subject: [PATCH] mips backend 4Subject: [PATCH] mips backend
@@ -7,15 +7,16 @@ Rebase to 0.177
7Upstream-Status: Pending [from debian] 7Upstream-Status: Pending [from debian]
8 8
9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
10
10--- 11---
11 backends/Makefile.am | 8 +- 12 backends/Makefile.am | 6 +-
12 backends/mips_init.c | 59 +++++++++ 13 backends/mips_init.c | 59 ++++++++
13 backends/mips_regs.c | 104 ++++++++++++++++ 14 backends/mips_regs.c | 104 +++++++++++++
14 backends/mips_reloc.def | 79 ++++++++++++ 15 backends/mips_reloc.def | 79 ++++++++++
15 backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++++++++++ 16 backends/mips_retval.c | 321 ++++++++++++++++++++++++++++++++++++++++
16 backends/mips_symbol.c | 53 ++++++++ 17 backends/mips_symbol.c | 53 +++++++
17 libebl/eblopenbackend.c | 2 + 18 libebl/eblopenbackend.c | 3 +
18 7 files changed, 624 insertions(+), 2 deletions(-) 19 7 files changed, 623 insertions(+), 2 deletions(-)
19 create mode 100644 backends/mips_init.c 20 create mode 100644 backends/mips_init.c
20 create mode 100644 backends/mips_regs.c 21 create mode 100644 backends/mips_regs.c
21 create mode 100644 backends/mips_reloc.def 22 create mode 100644 backends/mips_reloc.def
@@ -23,36 +24,34 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
23 create mode 100644 backends/mips_symbol.c 24 create mode 100644 backends/mips_symbol.c
24 25
25diff --git a/backends/Makefile.am b/backends/Makefile.am 26diff --git a/backends/Makefile.am b/backends/Makefile.am
26index 91a38e2..aba8a4a 100644 27index 4755f61..07d45d7 100644
27--- a/backends/Makefile.am 28--- a/backends/Makefile.am
28+++ b/backends/Makefile.am 29+++ b/backends/Makefile.am
29@@ -33,13 +33,13 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ 30@@ -37,7 +37,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \
30 31 noinst_LIBRARIES = libebl_backends.a libebl_backends_pic.a
31 32
32 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 \
33- tilegx m68k bpf riscv csky parisc 34- tilegx m68k bpf riscv csky parisc
34+ tilegx m68k bpf riscv csky parisc mips 35+ tilegx m68k bpf riscv csky parisc mips
35 libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \
36 libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \
37 libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
38 libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
39 libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a \
40- libebl_csky_pic.a libebl_parisc_pic.a
41+ libebl_csky_pic.a libebl_parisc_pic.a libebl_mips_pic.a
42 noinst_LIBRARIES = $(libebl_pic)
43 noinst_DATA = $(libebl_pic:_pic.a=.so)
44 36
45@@ -145,6 +145,10 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \ 37 parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
46 libebl_csky_pic_a_SOURCES = $(csky_SRCS) 38
47 am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os) 39@@ -100,12 +100,14 @@ riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
40 csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
41 csky_regs.c csky_initreg.c csky_corenote.c
48 42
49+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c 43+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
50+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
51+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
52+ 44+
53 libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) 45 libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
54 @rm -f $(@:.so=.map) 46 $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \
55 $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ 47 $(aarch64_SRCS) $(sparc_SRCS) $(ppc_SRCS) \
48 $(ppc64_SRCS) $(s390_SRCS) $(tilegx_SRCS) \
49 $(m68k_SRCS) $(bpf_SRCS) $(riscv_SRCS) $(csky_SRCS) \
50- $(parisc_SRCS)
51+ $(parisc_SRCS) $(mips_SRCS)
52
53 libebl_backends_pic_a_SOURCES =
54 am_libebl_backends_pic_a_OBJECTS = $(libebl_backends_a_SOURCES:.c=.os)
56diff --git a/backends/mips_init.c b/backends/mips_init.c 55diff --git a/backends/mips_init.c b/backends/mips_init.c
57new file mode 100644 56new file mode 100644
58index 0000000..975c04e 57index 0000000..975c04e
@@ -700,18 +699,26 @@ index 0000000..261b05d
700+ } 699+ }
701+} 700+}
702diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c 701diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
703index 01711f5..d0c3589 100644 702index 210b47e..1feac13 100644
704--- a/libebl/eblopenbackend.c 703--- a/libebl/eblopenbackend.c
705+++ b/libebl/eblopenbackend.c 704+++ b/libebl/eblopenbackend.c
706@@ -71,6 +71,8 @@ static const struct 705@@ -57,6 +57,7 @@ const char *m68k_init (Elf *, GElf_Half, Ebl *, size_t);
707 { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 }, 706 const char *bpf_init (Elf *, GElf_Half, Ebl *, size_t);
708 { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 }, 707 const char *riscv_init (Elf *, GElf_Half, Ebl *, size_t);
709 { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 }, 708 const char *csky_init (Elf *, GElf_Half, Ebl *, size_t);
710+ { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 }, 709+const char *mips_init (Elf *, GElf_Half, Ebl *, size_t);
711+ { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 }, 710
711 /* This table should contain the complete list of architectures as far
712 as the ELF specification is concerned. */
713@@ -87,6 +88,8 @@ static const struct
714 { sparc_init, "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
715 { sparc_init, "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
716 { s390_init, "ebl_s390", "s390", 4, EM_S390, 0, 0 },
717+ { mips_init, "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
718+ { mips_init, "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
712 719
713 { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 }, 720 { NULL, "elf_m32", "m32", 3, EM_M32, 0, 0 },
714 { "m68k", "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB }, 721 { m68k_init, "elf_m68k", "m68k", 4, EM_68K, ELFCLASS32, ELFDATA2MSB },
715-- 722--
7162.7.4 7232.17.1
717 724
diff --git a/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch b/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
index fda4f68059..dd8f88a454 100644
--- a/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
+++ b/meta/recipes-devtools/elfutils/files/debian/mips_cfi.patch
@@ -1,33 +1,34 @@
1From 96e38289f2887ddb8e6d2fb91ea04bdbdf034ab5 Mon Sep 17 00:00:00 2001 1From 5bf6117a6eaf9007ce80adbb8b66a95ca98047a4 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 Aug 2019 17:00:30 +0800 3Date: Wed, 21 Aug 2019 17:00:30 +0800
4Subject: [PATCH 2/2] mips_cfi 4Subject: [PATCH] mips_cfi
5 5
6Upstream-Status: Pending [from debian] 6Upstream-Status: Pending [from debian]
7 7
8Rebase to 0.177 8Rebase to 0.177
9 9
10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 10Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
11
11--- 12---
12 backends/Makefile.am | 2 +- 13 backends/Makefile.am | 2 +-
13 backends/mips_cfi.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 backends/mips_cfi.c | 80 ++++++++++++++++++++++++++++++++++++++++++++
14 backends/mips_init.c | 1 + 15 backends/mips_init.c | 1 +
15 3 files changed, 82 insertions(+), 1 deletion(-) 16 3 files changed, 82 insertions(+), 1 deletion(-)
16 create mode 100644 backends/mips_cfi.c 17 create mode 100644 backends/mips_cfi.c
17 18
18diff --git a/backends/Makefile.am b/backends/Makefile.am 19diff --git a/backends/Makefile.am b/backends/Makefile.am
19index aba8a4a..6ac0eec 100644 20index 07d45d7..dec3080 100644
20--- a/backends/Makefile.am 21--- a/backends/Makefile.am
21+++ b/backends/Makefile.am 22+++ b/backends/Makefile.am
22@@ -145,7 +145,7 @@ csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \ 23@@ -100,7 +100,7 @@ riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \
23 libebl_csky_pic_a_SOURCES = $(csky_SRCS) 24 csky_SRCS = csky_attrs.c csky_init.c csky_symbol.c csky_cfi.c \
24 am_libebl_csky_pic_a_OBJECTS = $(csky_SRCS:.c=.os) 25 csky_regs.c csky_initreg.c csky_corenote.c
25 26
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
27+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c mips_cfi.c 28+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 29
30 libebl_backends_a_SOURCES = $(i386_SRCS) $(sh_SRCS) $(x86_64_SRCS) \
31 $(ia64_SRCS) $(alpha_SRCS) $(arm_SRCS) \
31diff --git a/backends/mips_cfi.c b/backends/mips_cfi.c 32diff --git a/backends/mips_cfi.c b/backends/mips_cfi.c
32new file mode 100644 33new file mode 100644
33index 0000000..9ffdab5 34index 0000000..9ffdab5
@@ -126,6 +127,3 @@ index 8482e7f..bce5abe 100644
126 127
127 return MODVERSION; 128 return MODVERSION;
128 } 129 }
129--
1302.7.4
131