diff --git a/Pkgfile b/Pkgfile index 101bb61bd..31cb83e22 100644 --- a/Pkgfile +++ b/Pkgfile @@ -128,9 +128,9 @@ vars: mellanox_ofed_sha512: 58604ea89aa8351727532c48f0c59b4e533ba8bfcef9533f45d94e15ffdcf3a5c464398706cad14ebf3826b132972bd044fadbf7f047e60bdb0c2a454c96acd7 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.musl-libc.org/musl - musl_version: 1.2.5 - musl_sha256: a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4 - musl_sha512: 7bb7f7833923cd69c7a1a9b8a5f1784bfd5289663eb6061dcd43d583e45987df8a68a1be05d75cc1c88a3f5b610653d1a70f4a9cff4d8f7fd41ae73ee058c17c + musl_version: 1.2.4 + musl_sha256: 7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039 + musl_sha512: 498ec5d7941194a8806f4d42f0f6d218c862996ef1398b737d0d06995e0b7a6574b240a48088f6b84016b14b2776fe463f829dcb11149cdfc1023d496b235c55 # renovate: datasource=github-releases depName=nvidia/open-gpu-kernel-modules nvidia_driver_version: 535.129.03 diff --git a/musl/patches/elf.h-add-typedefs.patch b/musl/patches/elf.h-add-typedefs.patch new file mode 100644 index 000000000..b69017f83 --- /dev/null +++ b/musl/patches/elf.h-add-typedefs.patch @@ -0,0 +1,30 @@ +https://gitlab.alpinelinux.org/alpine/aports/-/raw/master/main/musl/0001-elf.h-add-typedefs-for-Elf-_Relr.patch + +From 981144ebc9ff30b085af107f1337543de7b0bf94 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Mon, 6 Nov 2023 12:29:16 +0100 +Subject: [PATCH] elf.h: add typedefs for Elf*_Relr + +Add typedefs for Elf32_Relr and Elf64_relr as a follow-up to commit +d32dadd60efb (ldso: support DT_RELR relative relocation format) +--- + include/elf.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/elf.h b/include/elf.h +index 23f2c4bc..aa186d9d 100644 +--- a/include/elf.h ++++ b/include/elf.h +@@ -32,6 +32,9 @@ typedef uint16_t Elf64_Section; + typedef Elf32_Half Elf32_Versym; + typedef Elf64_Half Elf64_Versym; + ++typedef Elf32_Word Elf32_Relr; ++typedef Elf64_Xword Elf64_Relr; ++ + #define EI_NIDENT (16) + + typedef struct { +-- +2.42.1 + diff --git a/musl/patches/handle-aux-at-base.patch b/musl/patches/handle-aux-at-base.patch deleted file mode 100644 index 826b73648..000000000 --- a/musl/patches/handle-aux-at-base.patch +++ /dev/null @@ -1,48 +0,0 @@ -https://git.alpinelinux.org/aports/plain/main/musl/handle-aux-at_base.patch - -This is required to make the gcompat ELF interpreter stub work with some -packed binaries. - -diff --git a/src/env/__init_tls.c b/src/env/__init_tls.c -index b125eb1..616c6a6 100644 ---- a/src/env/__init_tls.c -+++ b/src/env/__init_tls.c -@@ -66,8 +66,10 @@ void *__copy_tls(unsigned char *mem) - } - - #if ULONG_MAX == 0xffffffff -+typedef Elf32_Ehdr Ehdr; - typedef Elf32_Phdr Phdr; - #else -+typedef Elf64_Ehdr Ehdr; - typedef Elf64_Phdr Phdr; - #endif - -@@ -77,15 +79,23 @@ extern const size_t _DYNAMIC[]; - static void static_init_tls(size_t *aux) - { - unsigned char *p; -- size_t n; -+ size_t n, e; - Phdr *phdr, *tls_phdr=0; - size_t base = 0; - void *mem; - -- for (p=(void *)aux[AT_PHDR],n=aux[AT_PHNUM]; n; n--,p+=aux[AT_PHENT]) { -+ if (aux[AT_BASE]) { -+ Ehdr *ehdr = (void *)aux[AT_BASE]; -+ p = (unsigned char *)aux[AT_BASE] + ehdr->e_phoff; -+ n = ehdr->e_phnum; -+ e = ehdr->e_phentsize; -+ } else { -+ p = (void *)aux[AT_PHDR]; -+ n = aux[AT_PHNUM]; -+ e = aux[AT_PHENT]; -+ } -+ for (; n; n--, p+=e) { - phdr = (void *)p; -- if (phdr->p_type == PT_PHDR) -- base = aux[AT_PHDR] - phdr->p_vaddr; - if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) - base = (size_t)_DYNAMIC - phdr->p_vaddr; - if (phdr->p_type == PT_TLS) diff --git a/musl/pkg.yaml b/musl/pkg.yaml index 530415c6f..fbd52bd54 100644 --- a/musl/pkg.yaml +++ b/musl/pkg.yaml @@ -15,7 +15,7 @@ steps: tar -xzf musl.tar.gz --strip-components=1 - patch -p1 < /pkg/patches/handle-aux-at-base.patch + patch -p1 < /pkg/patches/elf.h-add-typedefs.patch mkdir /bin ln -sv /toolchain/bin/bash /bin/sh