diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-20 07:07:08 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-20 07:07:08 +0100 |
commit | aaa44376d7162304219748a3b6771d9a26fc80fe (patch) | |
tree | 62d3e3eea5cc8134a92a731a756d15bfd8fe0177 /dev-libs/elfutils/files | |
parent | 6f97f3b697516aeae25033ec37234739fff23fbc (diff) |
gentoo auto-resync : 20:07:2023 - 07:07:07
Diffstat (limited to 'dev-libs/elfutils/files')
5 files changed, 249 insertions, 0 deletions
diff --git a/dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch new file mode 100644 index 000000000000..2d44c757711a --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.189-PaX-support.patch @@ -0,0 +1,26 @@ +Add support for PaX ELF markings + +Patch by Kevin F. Quinn <kevquinn@gentoo.org> + +http://bugs.gentoo.org/115100 + +--- a/libelf/elf.h ++++ b/libelf/elf.h +@@ -722,6 +722,7 @@ typedef struct + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ + #define PT_GNU_PROPERTY 0x6474e553 /* GNU property */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +--- a/src/elflint.c ++++ b/src/elflint.c +@@ -4493,6 +4493,7 @@ only executables, shared objects, and core files can have program headers\n")); + + if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME + && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO ++ && phdr->p_type != PT_PAX_FLAGS + && phdr->p_type != PT_GNU_PROPERTY + /* Check for a known machine-specific type. */ + && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL) diff --git a/dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch b/dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch new file mode 100644 index 000000000000..222c0527b689 --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch @@ -0,0 +1,57 @@ +https://www.sourceware.org/bugzilla/show_bug.cgi?id=25832 +https://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch +https://bugs.gentoo.org/693772 + +Other variants/links: +https://git.alpinelinux.org/aports/tree/main/elfutils/fix-aarch64_fregs.patch +https://github.com/gentoo/musl/blob/6450482b9b4463b57ac249c63b7ed796e9874c40/dev-libs/elfutils/files/0.178/fix-aarch64_fregs.patch + +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 15 Aug 2017 17:27:30 +0800 +Subject: [PATCH] Fix build on aarch64/musl + +Errors + +invalid operands to binary & (have 'long double' and 'unsigned int') + +error: redefinition + of 'struct iovec' + struct iovec { void *iov_base; size_t iov_len; }; + ^ +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Rebase to 0.170 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +--- a/backends/aarch64_initreg.c ++++ b/backends/aarch64_initreg.c +@@ -33,7 +33,7 @@ + #include "system.h" + #include <assert.h> + #if defined(__aarch64__) && defined(__linux__) +-# include <linux/uio.h> ++# include <sys/uio.h> + # include <sys/user.h> + # include <sys/ptrace.h> + /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ +@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), + + Dwarf_Word dwarf_fregs[32]; + for (int r = 0; r < 32; r++) +- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; ++ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF; + + if (! setfunc (64, 32, dwarf_fregs, arg)) + return false; +--- a/backends/arm_initreg.c ++++ b/backends/arm_initreg.c +@@ -38,7 +38,7 @@ + #endif + + #ifdef __aarch64__ +-# include <linux/uio.h> ++# include <sys/uio.h> + # include <sys/user.h> + # include <sys/ptrace.h> + /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ diff --git a/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch b/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch new file mode 100644 index 000000000000..97c6c1dcd62e --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.189-musl-macros.patch @@ -0,0 +1,86 @@ +May not be required (or at least some hunks) with next release (0.186?) + +https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch +--- a/lib/libeu.h ++++ b/lib/libeu.h +@@ -31,6 +31,27 @@ + + #include <stddef.h> + #include <stdint.h> ++#include <unistd.h> ++#include <alloca.h> ++#include <string.h> ++ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ ++#ifndef strndupa ++#define strndupa(s, n) \ ++ (__extension__ ({const char *__in = (s); \ ++ size_t __len = strnlen (__in, (n)) + 1; \ ++ char *__out = (char *) alloca (__len); \ ++ __out[__len-1] = '\0'; \ ++ (char *) memcpy (__out, __in, __len-1);})) ++#endif + + extern void *xmalloc (size_t) __attribute__ ((__malloc__)); + extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); +--- a/src/arlib.h ++++ b/src/arlib.h +@@ -29,6 +29,16 @@ + #include <stdint.h> + #include <sys/types.h> + ++#if !defined(ACCESSPERMS) ++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ ++#endif ++#if !defined(ALLPERMS) ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ ++#endif ++#if !defined(DEFFILEMODE) ++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ ++#endif ++ + + /* State of -D/-U flags. */ + extern bool arlib_deterministic_output; +--- a/src/elfcompress.c ++++ b/src/elfcompress.c +@@ -37,6 +37,14 @@ + #include "libeu.h" + #include "printversion.h" + ++#if !defined(FNM_EXTMATCH) ++# define FNM_EXTMATCH 0 ++#endif ++ ++#if !defined(ALLPERMS) ++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ ++#endif ++ + /* Name and version of program. */ + ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + +--- a/src/strip.c ++++ b/src/strip.c +@@ -45,6 +45,14 @@ + #include <system.h> + #include <printversion.h> + ++#if !defined(FNM_EXTMATCH) ++# define FNM_EXTMATCH 0 ++#endif ++ ++#if !defined(ACCESSPERMS) ++#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) ++#endif ++ + typedef uint8_t GElf_Byte; + + /* Name and version of program. */ diff --git a/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch b/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch new file mode 100644 index 000000000000..0ffe75d93d31 --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.189-skip-DT_RELR-failing-tests.patch @@ -0,0 +1,39 @@ +We know these tests fail with DT_RELR (https://sourceware.org/bugzilla/show_bug.cgi?id=28495) +so skip for now. +--- a/tests/run-elflint-self.sh ++++ b/tests/run-elflint-self.sh +@@ -18,5 +18,8 @@ + + . $srcdir/test-subr.sh + ++# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495) ++exit 77 ++ + testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld + testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld +--- a/tests/run-strip-strmerge.sh ++++ b/tests/run-strip-strmerge.sh +@@ -17,6 +17,9 @@ + + . $srcdir/test-subr.sh + ++# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495) ++exit 77 ++ + # Generate a file with merged .shstrtab/.strtab table. + # strip and unstrip it. Check all files with elflint. + +diff --git a/tests/run-reverse-sections-self.sh b/tests/run-reverse-sections-self.sh +index 71afd6a..87de933 100755 +--- a/tests/run-reverse-sections-self.sh ++++ b/tests/run-reverse-sections-self.sh +@@ -17,6 +17,9 @@ + + . $srcdir/test-subr.sh + ++# XFAIL b/c no DT_RELR support yet (https://sourceware.org/bugzilla/show_bug.cgi?id=28495) ++exit 77 ++ + test_reverse_self () + { + in_file="$1" diff --git a/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch b/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch new file mode 100644 index 000000000000..c64a30ec03b6 --- /dev/null +++ b/dev-libs/elfutils/files/elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch @@ -0,0 +1,41 @@ +https://inbox.sourceware.org/elfutils-devel/20230719231639.1786109-1-sam@gentoo.org/T/#u + +From 7f607f9aba5c6fccb3d94776452b1cfa421df1f7 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Thu, 20 Jul 2023 00:15:10 +0100 +Subject: [PATCH] tests: run-lfs-symbols.sh needs gawk + +With awk=mawk, I get: +``` +FAIL: run-lfs-symbols.sh + +First sanity-check that LFS detection works. +checking ./testfile-nolfs +awk: line 3: syntax error at or near / +FAIL run-lfs-symbols.sh (exit status: 2) +``` + + * tests/run-lfs-symbols.sh: Call 'gawk' instead of 'awk'. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/tests/run-lfs-symbols.sh ++++ b/tests/run-lfs-symbols.sh +@@ -42,13 +42,13 @@ LFS_FORMAT='BEGIN { + LFS=$(printf "$LFS_FORMAT" "${abs_srcdir}/lfs-symbols") + + makeprint() { +- make print-$1 -C $2 |& awk -F= "/^$1=/{ print \$2 }" ++ make print-$1 -C $2 |& gawk -F= "/^$1=/{ print \$2 }" + } + + testrun_lfs() { + echo "checking $1" + if [ -e "$1" ]; then +- bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | awk "$LFS") ++ bad=$(testrun ${abs_top_builddir}/src/nm -u "$1" | gawk "$LFS") + if [ -n "$bad" ]; then + echo "$1 contains non-lfs symbols:" $bad + exit_status=1 +-- +2.41.0 + |