diff --git a/SOURCES/elfutils-0.176-strip-symbols-illformed.patch b/SOURCES/elfutils-0.176-strip-symbols-illformed.patch new file mode 100644 index 0000000..a0f22c8 --- /dev/null +++ b/SOURCES/elfutils-0.176-strip-symbols-illformed.patch @@ -0,0 +1,26 @@ +commit f03ac75239e0981deaf4aa18f66f423bcc5ce051 +Author: Mark Wielaard +Date: Wed Mar 27 21:54:06 2019 +0100 + + strip: Files with symbols referring to non-existing sections are illformed + + The check added in commit 4540ea98c "strip: Fix check test for SHN_XINDEX + symbol" was not complete. The (extended) section index should also exist. + If it doesn't exist, mark the file as illformed. + + https://sourceware.org/bugzilla/show_bug.cgi?id=24385 + + Signed-off-by: Mark Wielaard + +diff --git a/src/strip.c b/src/strip.c +index a73009d9..4cd87506 100644 +--- a/src/strip.c ++++ b/src/strip.c +@@ -1975,6 +1975,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, + && shndxdata->d_buf != NULL); + size_t sidx = (sym->st_shndx != SHN_XINDEX + ? sym->st_shndx : xshndx); ++ elf_assert (sidx < shnum); + sec = shdr_info[sidx].idx; + + if (sec != 0) diff --git a/SPECS/elfutils.spec b/SPECS/elfutils.spec index 9f375b4..2e09300 100644 --- a/SPECS/elfutils.spec +++ b/SPECS/elfutils.spec @@ -6,7 +6,7 @@ Name: %{?scl_prefix}elfutils Summary: A collection of utilities and DSOs to handle ELF files and DWARF data Version: 0.176 -%global baserelease 4 +%global baserelease 5 URL: http://elfutils.org/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -36,6 +36,7 @@ Source7: libasm.a Patch1: elfutils-0.176-gcc-pr88835.patch Patch2: elfutils-0.176-xlate-note.patch Patch3: elfutils-0.176-elf-update.patch +Patch4: elfutils-0.176-strip-symbols-illformed.patch # DTS specific patches. Patch100: elfutils-0.176-dts.patch @@ -173,6 +174,7 @@ profiling) of processes. %patch1 -p1 -b .gcc-pr88835 %patch2 -p1 -b .xlate-note %patch3 -p1 -b .elf-update +%patch4 -p1 -b .strip-illformed # DTS specific patches @@ -344,6 +346,9 @@ fi %endif %changelog +* Fri Jul 5 2019 Mark Wielaard - 0.176-5 +- Add elfutils-0.176-strip-symbols-illformed.patch + * Fri Jun 7 2019 Mark Wielaard - 0.176-4 - Add elfutils-0.176-gcc-pr88835.patch - Add elfutils-0.176-xlate-note.patch