]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
musl: add typedefs for Elf64_Relr and Elf32_Relr
authorZang Ruochen <zangruochen@loongson.cn>
Fri, 8 Dec 2023 07:42:44 +0000 (23:42 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Dec 2023 11:28:24 +0000 (11:28 +0000)
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

Signed-off-by: Zang Ruochen <zangruochen@loongson.cn>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch [new file with mode: 0644]
meta/recipes-core/musl/musl_git.bb

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 (file)
index 0000000..45d40cd
--- /dev/null
@@ -0,0 +1,37 @@
+From 65b0ac0d998bf0f36924a7c27ed9e702b2a5a453 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Sat, 4 Nov 2023 12:09:20 -0400
+Subject: [PATCH] elf.h: add typedefs for Elf64_Relr and Elf32_Relr
+
+These were overlooked when DT_RELR was added in commit
+d32dadd60efb9d3b255351a3b532f8e4c3dd0db1, potentially breaking
+software that treats presence of the DT_RELR macro as implying they
+exist.
+
+Upstream-Status: Backport [1.2.5]
+
+Signed-off-by: Zang Ruochen <zangruochen@loongson.cn>
+
+---
+ include/elf.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/include/elf.h b/include/elf.h
+index 23f2c4bc..72d17c3a 100644
+--- a/include/elf.h
++++ b/include/elf.h
+@@ -558,6 +558,11 @@ typedef struct {
++typedef Elf32_Word Elf32_Relr;
++typedef Elf64_Xword Elf64_Relr;
++
++
++
+ #define ELF32_R_SYM(val)              ((val) >> 8)
+ #define ELF32_R_TYPE(val)             ((val) & 0xff)
+ #define ELF32_R_INFO(sym, type)               (((sym) << 8) + ((type) & 0xff))
+-- 
+2.25.1
+
index 7dd949ffafdb3649e41803209153567ccf5987d4..324269a96874996500fbd65205ae4b6e23c50568 100644 (file)
@@ -13,6 +13,7 @@ PV = "${BASEVER}+git"
 SRC_URI = "git://git.etalabs.net/git/musl;branch=master;protocol=https \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+           file://0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch \
           "
 
 S = "${WORKDIR}/git"