diff --git a/elfutils-0.168-libasm-truncation.patch b/elfutils-0.168-libasm-truncation.patch new file mode 100644 index 0000000..f6429a5 --- /dev/null +++ b/elfutils-0.168-libasm-truncation.patch @@ -0,0 +1,37 @@ +commit 9e977aca87678417184f01d02c92b2ecb15727e3 +Author: Mark Wielaard +Date: Sun Feb 12 21:51:34 2017 +0100 + + libasm: Fix GCC7 one -Wformat-truncation=2 warning. + + Make sure that if we have really many labels the tempsym doesn't get + truncated because it is too small to hold the whole name. + + This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed + out by enabling this warning because there are currently some issues + with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448 + + Signed-off-by: Mark Wielaard + +diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c +index 332432a..5389166 100644 +--- a/libasm/asm_newsym.c ++++ b/libasm/asm_newsym.c +@@ -1,5 +1,5 @@ + /* Define new symbol for current position in given section. +- Copyright (C) 2002, 2005, 2016 Red Hat, Inc. ++ Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2002. + +@@ -44,7 +44,9 @@ AsmSym_t * + asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size, + int type, int binding) + { +-#define TEMPSYMLEN 10 ++/* We don't really expect labels with many digits, but in theory it could ++ be 10 digits (plus ".L" and a zero terminator). */ ++#define TEMPSYMLEN 13 + char tempsym[TEMPSYMLEN]; + AsmSym_t *result; + diff --git a/elfutils-0.168-ppc64-attrs.patch b/elfutils-0.168-ppc64-attrs.patch new file mode 100644 index 0000000..06f8cef --- /dev/null +++ b/elfutils-0.168-ppc64-attrs.patch @@ -0,0 +1,39 @@ +From 817bd9376dd01039a30dfc4cf9dddd8cdd247446 Mon Sep 17 00:00:00 2001 +From: Mark Wielaard +Date: Wed, 15 Feb 2017 14:30:27 +0100 +Subject: [PATCH] backends: Add support for EM_PPC64 GNU_ATTRIBUTES. + +ppc64 and ppc64le ELF files can also contain a power specific +.gnu.attributes section. Add support for those and recognize the new +GNU_Power_ABI_FP Single-precision hard float value. + +Signed-off-by: Mark Wielaard +--- +diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c +index 2ba8232..11d3a77 100644 +--- a/backends/ppc64_init.c ++++ b/backends/ppc64_init.c +@@ -67,6 +67,7 @@ ppc64_init (Elf *elf __attribute__ ((unused)), + HOOK (eh, syscall_abi); + HOOK (eh, core_note); + HOOK (eh, auxv_info); ++ HOOK (eh, check_object_attribute); + HOOK (eh, abi_cfi); + /* gcc/config/ #define DWARF_FRAME_REGISTERS. */ + eh->frame_nregs = (114 - 1) + 32; +diff --git a/backends/ppc_attrs.c b/backends/ppc_attrs.c +index 612c576..48d7129 100644 +--- a/backends/ppc_attrs.c ++++ b/backends/ppc_attrs.c +@@ -51,6 +51,7 @@ ppc_check_object_attribute (Ebl *ebl __attribute__ ((unused)), + "Hard or soft float", + "Hard float", + "Soft float", ++ "Single-precision hard float", + }; + if (value < sizeof fp_kinds / sizeof fp_kinds[0]) + *value_name = fp_kinds[value]; + +-- +1.8.3.1 + diff --git a/elfutils.spec b/elfutils.spec index 88001c4..5ee779a 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.168 -%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+) @@ -20,6 +20,8 @@ Release: %{baserelease}%{?dist} Source: %{?source_url}%{name}-%{version}.tar.bz2 # Patches +Patch1: elfutils-0.168-libasm-truncation.patch +Patch2: elfutils-0.168-ppc64-attrs.patch Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} Requires: elfutils-libs%{depsuffix} = %{version}-%{release} @@ -170,6 +172,8 @@ profiling) of processes. %setup -q # Apply patches +%patch1 -p1 -b .trunc +%patch2 -p1 -b .attr find . -name \*.sh ! -perm -0100 -print | xargs chmod +x @@ -300,6 +304,11 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog +* Wed Feb 15 2017 Mark Wielaard - 0.168-5 +- Add patches for new gcc warnings and new binutils ppc64 attributes. + - elfutils-0.168-libasm-truncation.patch + - elfutils-0.168-ppc64-attrs.patch + * Fri Feb 10 2017 Fedora Release Engineering - 0.168-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild