From 153c7badff5864bfa28cb61f694a9d2bfd4f4c5e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 25 Jul 2018 00:23:45 +0200 Subject: [PATCH] 0.173-6 - Update elfutils-0.173-annobingroup.patch. --- elfutils-0.173-annobingroup.patch | 33 +++++++++++++++++++++++++++++++ elfutils.spec | 5 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/elfutils-0.173-annobingroup.patch b/elfutils-0.173-annobingroup.patch index 8b112b5..712097e 100644 --- a/elfutils-0.173-annobingroup.patch +++ b/elfutils-0.173-annobingroup.patch @@ -28,3 +28,36 @@ index 057efef..cb1f7dc 100644 adjust_relocs (scn, scn, shdr, map, symshdr); } } +commit 47092416243d54e4cff3cd2558ece8b93695d54e +Author: Mark Wielaard +Date: Tue Jul 24 23:34:19 2018 +0200 + + unstrip: Also check sh_size in compare_unalloc_sections. + + compare_unalloc_sections only checked sh_flags and the section names. + This would cause stripped/debug section mismatches when there were + multiple sections with the same name and flags. Fix this by also checking + the size of the section matches. + + Add a testcase that has two ".group" sections created on i386 with the + gcc annobin plugin. + + Signed-off-by: Mark Wielaard + +diff --git a/src/unstrip.c b/src/unstrip.c +index cb1f7dc..ec46c95 100644 +--- a/src/unstrip.c ++++ b/src/unstrip.c +@@ -709,6 +709,12 @@ compare_unalloc_sections (const GElf_Shdr *shdr1, const GElf_Shdr *shdr2, + if (shdr1->sh_flags > shdr2->sh_flags) + return 1; + ++ /* Sizes should be the same. */ ++ if (shdr1->sh_size < shdr2->sh_size) ++ return -1; ++ if (shdr1->sh_size > shdr2->sh_size) ++ return 1; ++ + /* Sort by name as last resort. */ + return strcmp (name1, name2); + } diff --git a/elfutils.spec b/elfutils.spec index ed7e4ae..6f32bad 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ Name: elfutils Summary: A collection of utilities and DSOs to handle ELF files and DWARF data Version: 0.173 -%global baserelease 5 +%global baserelease 6 URL: http://elfutils.org/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -327,6 +327,9 @@ fi %endif %changelog +* Tue Jul 24 2018 Mark Wielaard - 0.173-6 +- Update elfutils-0.173-annobingroup.patch. + * Sat Jul 21 2018 Mark Wielaard - 0.173-5 - Add BuildRequires gcc-c++ for demangle support. - Add elfutils-0.173-annobingroup.patch.