summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZang Ruochen <zangruochen@loongson.cn>2023-12-07 23:42:44 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-13 11:34:27 +0000
commita9317426777e732a77f7b353c290339b0192cc54 (patch)
treec203150ccc7c9eeeac6f3b673d1e5bae1792dd1b
parenteffe2498ebecfc2065993a290c1a50b9c6adfca0 (diff)
downloadpoky-a9317426777e732a77f7b353c290339b0192cc54.tar.gz
musl: add typedefs for Elf64_Relr and Elf32_Relr
The absence of this typedef causes elfutils to report the following error: /usr/include/gelf.h:86:9: error: unknown type name 'Elf64_Relr' https://git.musl-libc.org/cgit/musl/commit/?id=6be76895f6863100a311d474a42abdbb6466189d (From OE-Core rev: 161bb7923bed67c91f45e8383b5a487b6107e431) Signed-off-by: Zang Ruochen <zangruochen@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch37
-rw-r--r--meta/recipes-core/musl/musl_git.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch b/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch
new file mode 100644
index 0000000000..45d40cd5b4
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch
@@ -0,0 +1,37 @@
1From 65b0ac0d998bf0f36924a7c27ed9e702b2a5a453 Mon Sep 17 00:00:00 2001
2From: Violet Purcell <vimproved@inventati.org>
3Date: Sat, 4 Nov 2023 12:09:20 -0400
4Subject: [PATCH] elf.h: add typedefs for Elf64_Relr and Elf32_Relr
5
6These were overlooked when DT_RELR was added in commit
7d32dadd60efb9d3b255351a3b532f8e4c3dd0db1, potentially breaking
8software that treats presence of the DT_RELR macro as implying they
9exist.
10
11Upstream-Status: Backport [1.2.5]
12
13Signed-off-by: Zang Ruochen <zangruochen@loongson.cn>
14
15---
16 include/elf.h | 5 +++++
17 1 file changed, 5 insertions(+)
18
19diff --git a/include/elf.h b/include/elf.h
20index 23f2c4bc..72d17c3a 100644
21--- a/include/elf.h
22+++ b/include/elf.h
23@@ -558,6 +558,11 @@ typedef struct {
24
25
26
27+typedef Elf32_Word Elf32_Relr;
28+typedef Elf64_Xword Elf64_Relr;
29+
30+
31+
32 #define ELF32_R_SYM(val) ((val) >> 8)
33 #define ELF32_R_TYPE(val) ((val) & 0xff)
34 #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
35--
362.25.1
37
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 7dd949ffaf..324269a968 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -13,6 +13,7 @@ PV = "${BASEVER}+git"
13SRC_URI = "git://git.etalabs.net/git/musl;branch=master;protocol=https \ 13SRC_URI = "git://git.etalabs.net/git/musl;branch=master;protocol=https \
14 file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ 14 file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
15 file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ 15 file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
16 file://0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch \
16 " 17 "
17 18
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"