- Add BuildRequires gcc-c++ for demangle support.
- Add elfutils-0.173-annobingroup.patch.
This commit is contained in:
Mark Wielaard 2018-07-21 23:58:40 +02:00
parent 15973e2b9b
commit 896e01dee7
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,30 @@
commit 73e83285fbeac648edb60a0c4767fad9d470cf0a
Author: Mark Wielaard <mark@klomp.org>
Date: Sat Jul 21 23:40:11 2018 +0200
unstrip: Handle SHT_GROUP sections in ET_REL files.
SHT_GROUP sections are put in both the stripped and debug file.
Handle correcting the symbol table/name entry of the group only once.
The testfile was generated with the gcc annobin plugin.
Signed-off-by: Mark Wielaard <mark@klomp.org>
diff --git a/src/unstrip.c b/src/unstrip.c
index 057efef..cb1f7dc 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -563,7 +563,11 @@ adjust_all_relocs (Elf *elf, Elf_Scn *symtab, const GElf_Shdr *symshdr,
GElf_Shdr shdr_mem;
GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
ELF_CHECK (shdr != NULL, _("cannot get section header: %s"));
- if (shdr->sh_type != SHT_NOBITS && shdr->sh_link == new_sh_link)
+ /* Don't redo SHT_GROUP, groups are in both the stripped and debug,
+ it will already have been done by adjust_relocs for the
+ stripped_symtab. */
+ if (shdr->sh_type != SHT_NOBITS && shdr->sh_type != SHT_GROUP
+ && shdr->sh_link == new_sh_link)
adjust_relocs (scn, scn, shdr, map, symshdr);
}
}

View File

@ -1,7 +1,7 @@
Name: elfutils Name: elfutils
Summary: A collection of utilities and DSOs to handle ELF files and DWARF data Summary: A collection of utilities and DSOs to handle ELF files and DWARF data
Version: 0.173 Version: 0.173
%global baserelease 4 %global baserelease 5
URL: http://elfutils.org/ URL: http://elfutils.org/
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/
License: GPLv3+ and (GPLv2+ or LGPLv3+) License: GPLv3+ and (GPLv2+ or LGPLv3+)
@ -22,6 +22,7 @@ Source: %{?source_url}%{name}-%{version}.tar.bz2
# Patches # Patches
Patch1: elfutils-0.173-new-notes-hack.patch Patch1: elfutils-0.173-new-notes-hack.patch
Patch2: elfutils-0.173-elfcompress.patch Patch2: elfutils-0.173-elfcompress.patch
Patch3: elfutils-0.173-annobingroup.patch
Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} Requires: elfutils-libelf%{depsuffix} = %{version}-%{release}
Requires: elfutils-libs%{depsuffix} = %{version}-%{release} Requires: elfutils-libs%{depsuffix} = %{version}-%{release}
@ -33,6 +34,7 @@ BuildRequires: bzip2
BuildRequires: gcc >= 4.4 BuildRequires: gcc >= 4.4
# For libstdc++ demangle support # For libstdc++ demangle support
BuildRequires: libstdc++-devel BuildRequires: libstdc++-devel
BuildRequires: gcc-c++
BuildRequires: zlib-devel >= 1.2.2.3 BuildRequires: zlib-devel >= 1.2.2.3
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
@ -192,6 +194,7 @@ profiling) of processes.
# Apply patches # Apply patches
%patch1 -p1 -b .notes_hack %patch1 -p1 -b .notes_hack
%patch2 -p1 -b .elfcompress %patch2 -p1 -b .elfcompress
%patch3 -p1 -b .annobingroup
# In case the above patches added any new test scripts, make sure they # In case the above patches added any new test scripts, make sure they
# are executable. # are executable.
@ -324,6 +327,10 @@ fi
%endif %endif
%changelog %changelog
* Sat Jul 21 2018 Mark Wielaard <mjw@fedoraproject.org> - 0.173-5
- Add BuildRequires gcc-c++ for demangle support.
- Add elfutils-0.173-annobingroup.patch.
* Sat Jul 21 2018 Mark Wielaard <mjw@fedoraproject.org> - 0.173-4 * Sat Jul 21 2018 Mark Wielaard <mjw@fedoraproject.org> - 0.173-4
- Add elfutils-0.173-elfcompress.patch (#1607044) - Add elfutils-0.173-elfcompress.patch (#1607044)