From 1d2a87dc43ae8b9536f2fb33256b0589e45b9680 Mon Sep 17 00:00:00 2001 From: Xing Li Date: Wed, 24 Apr 2024 09:02:11 +0800 Subject: [PATCH] LoongArch: Add missing relcation types in elf.h (cherry picked from commit 9b33d5e1078751c7940997de1c21a0532e8b0c0f) --- ...Add-missing-relocation-type-in-elf.h.patch | 71 +++++++++++++++++++ glibc.spec | 8 ++- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 LoongArch-Add-missing-relocation-type-in-elf.h.patch diff --git a/LoongArch-Add-missing-relocation-type-in-elf.h.patch b/LoongArch-Add-missing-relocation-type-in-elf.h.patch new file mode 100644 index 0000000..eca7a8f --- /dev/null +++ b/LoongArch-Add-missing-relocation-type-in-elf.h.patch @@ -0,0 +1,71 @@ +From 8bd40a8f4fcf8086f199d62381fe2ea2502038c7 Mon Sep 17 00:00:00 2001 +From: XingLi +Date: Wed, 24 Apr 2024 08:50:12 +0800 +Subject: [PATCH] LoongArch: Add missing relocation type in elf.h + +--- + elf/elf.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 48 insertions(+) + +diff --git a/elf/elf.h b/elf/elf.h +index 4119f784..a10e59c8 100644 +--- a/elf/elf.h ++++ b/elf/elf.h +@@ -4104,6 +4104,54 @@ enum + #define R_LARCH_GNU_VTINHERIT 57 + #define R_LARCH_GNU_VTENTRY 58 + ++/* reserved 59-63 */ ++ ++#define R_LARCH_B16 64 ++#define R_LARCH_B21 65 ++#define R_LARCH_B26 66 ++#define R_LARCH_ABS_HI20 67 ++#define R_LARCH_ABS_LO12 68 ++#define R_LARCH_ABS64_LO20 69 ++#define R_LARCH_ABS64_HI12 70 ++#define R_LARCH_PCALA_HI20 71 ++#define R_LARCH_PCALA_LO12 72 ++#define R_LARCH_PCALA64_LO20 73 ++#define R_LARCH_PCALA64_HI12 74 ++#define R_LARCH_GOT_PC_HI20 75 ++#define R_LARCH_GOT_PC_LO12 76 ++#define R_LARCH_GOT64_PC_LO20 77 ++#define R_LARCH_GOT64_PC_HI12 78 ++#define R_LARCH_GOT_HI20 79 ++#define R_LARCH_GOT_LO12 80 ++#define R_LARCH_GOT64_LO20 81 ++#define R_LARCH_GOT64_HI12 82 ++#define R_LARCH_TLS_LE_HI20 83 ++#define R_LARCH_TLS_LE_LO12 84 ++#define R_LARCH_TLS_LE64_LO20 85 ++#define R_LARCH_TLS_LE64_HI12 86 ++#define R_LARCH_TLS_IE_PC_HI20 87 ++#define R_LARCH_TLS_IE_PC_LO12 88 ++#define R_LARCH_TLS_IE64_PC_LO20 89 ++#define R_LARCH_TLS_IE64_PC_HI12 90 ++#define R_LARCH_TLS_IE_HI20 91 ++#define R_LARCH_TLS_IE_LO12 92 ++#define R_LARCH_TLS_IE64_LO20 93 ++#define R_LARCH_TLS_IE64_HI12 94 ++#define R_LARCH_TLS_LD_PC_HI20 95 ++#define R_LARCH_TLS_LD_HI20 96 ++#define R_LARCH_TLS_GD_PC_HI20 97 ++#define R_LARCH_TLS_GD_HI20 98 ++#define R_LARCH_32_PCREL 99 ++#define R_LARCH_RELAX 100 ++#define R_LARCH_DELETE 101 ++#define R_LARCH_ALIGN 102 ++#define R_LARCH_PCREL20_S2 103 ++#define R_LARCH_CFA 104 ++#define R_LARCH_ADD6 105 ++#define R_LARCH_SUB6 106 ++#define R_LARCH_ADD_ULEB128 107 ++#define R_LARCH_SUB_ULEB128 108 ++#define R_LARCH_64_PCREL 109 + + /* ARCompact/ARCv2 specific relocs. */ + #define R_ARC_NONE 0x0 +-- +2.33.0 + diff --git a/glibc.spec b/glibc.spec index 906cb2a..7e6cbf1 100644 --- a/glibc.spec +++ b/glibc.spec @@ -66,7 +66,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 146 +Release: 147 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -285,6 +285,7 @@ Patch198: backport-Fix-invalid-pointer-dereference-in-wcpcpy_chk.patch Patch199: elf-Add-a-way-to-check-if-tunable-is-set-BZ-27069.patch Patch200: malloc-Improve-MAP_HUGETLB-with-glibc.malloc.hugetlb.patch Patch201: iconv-ISO-2022-CN-EXT-fix-out-of-bound-writes-when-w.patch +Patch202: backport-resolv_conf-release-lock-on-allocation-failure-bug-30527.patch Patch9000: turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch Patch9001: delete-no-hard-link-to-avoid-all_language-package-to.patch @@ -334,7 +335,7 @@ Patch9044: add-Wl-z-noseparate-code-for-so.patch Patch9045: fix-Segmentation-fault-in-nss-module.patch Patch9046: fix_nss_database_check_reload_and_get_memleak.patch Patch9047: inet-fix-warn-unused-result.patch -Patch9048: backport-resolv_conf-release-lock-on-allocation-failure-bug-30527.patch +Patch9048: LoongArch-Add-missing-relocation-type-in-elf.h.patch Provides: ldconfig rtld(GNU_HASH) bundled(gnulib) @@ -1500,6 +1501,9 @@ fi %endif %changelog +* Wed Apr 24 2024 Lixing - 2.34-147 +- Add missing LoongArch relocation type in elf.h + * Tue Apr 23 2024 Yang Yanchao - 2.34-146 - iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961) -- Gitee