diff --git a/0001-backends-Add-support-for-EM_PPC64-GNU_ATTRIBUTES.patch b/0001-backends-Add-support-for-EM_PPC64-GNU_ATTRIBUTES.patch deleted file mode 100644 index 2472054..0000000 --- a/0001-backends-Add-support-for-EM_PPC64-GNU_ATTRIBUTES.patch +++ /dev/null @@ -1,48 +0,0 @@ -From b1042ce216eaef96099f263fb81141dbdec004fd 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 ---- - backends/ChangeLog | 6 ++++++ - backends/ppc64_init.c | 1 + - backends/ppc_attrs.c | 1 + - tests/ChangeLog | 5 +++++ - tests/Makefile.am | 4 ++-- - tests/run-readelf-A.sh | 16 +++++++++++++++- - tests/testfileppc64attrs.o.bz2 | Bin 0 -> 222 bytes - 7 files changed, 30 insertions(+), 3 deletions(-) - create mode 100644 tests/testfileppc64attrs.o.bz2 - -diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c -index 2ba82327..11d3a77f 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 612c5769..48d7129d 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]; --- -2.12.2 - diff --git a/elfutils-0.168.tar.bz2 b/elfutils-0.168.tar.bz2 deleted file mode 100644 index e14e007..0000000 --- a/elfutils-0.168.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276 -size 6840399 diff --git a/elfutils-0.168.tar.bz2.sig b/elfutils-0.168.tar.bz2.sig deleted file mode 100644 index a4af00b..0000000 Binary files a/elfutils-0.168.tar.bz2.sig and /dev/null differ diff --git a/elfutils-0.170-Wpackednotaligned.patch b/elfutils-0.170-Wpackednotaligned.patch new file mode 100644 index 0000000..2588f7d --- /dev/null +++ b/elfutils-0.170-Wpackednotaligned.patch @@ -0,0 +1,43 @@ +commit ab6b37ac32ddf2f2f11f800a770170814f5cbb8b +Author: Mark Wielaard +Date: Tue Oct 24 14:23:30 2017 +0200 + + backends: Ignore GCC8 -Wpacked-not-aligned for m68k_corenote.c. + + The GCC8 -Wpacked-not-aligned warns if a structure field with explicit + padding in a packed structure will be misaligned. m68k prstatus core + notes are described by a packed structure which has such aligned structure + fields. + + Signed-off-by: Mark Wielaard + +diff --git a/backends/Makefile.am b/backends/Makefile.am +index 0fde0cb0..2c62add2 100644 +--- a/backends/Makefile.am ++++ b/backends/Makefile.am +@@ -119,6 +119,13 @@ m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c \ + libebl_m68k_pic_a_SOURCES = $(m68k_SRCS) + am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os) + ++# m68k prstatus core notes are described by a packed structure ++# which has not naturally aligned fields. Since we don't access ++# these fields directly, but take their offset to be used later ++# to extract the data through elfxx_xlatetom/memmove, this isn't ++# an issue. ++m68k_corenote_no_Wpacked_not_aligned = yes ++ + bpf_SRCS = bpf_init.c bpf_regs.c + cpu_bpf = ../libcpu/libcpu_bpf.a + libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) +diff --git a/config/eu.am b/config/eu.am +index 796f3883..05c27f02 100644 +--- a/config/eu.am ++++ b/config/eu.am +@@ -74,6 +74,7 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + $(if $($(*F)_no_Werror),,-Werror) \ + $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ ++ $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \ + $($(*F)_CFLAGS) + + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) diff --git a/elfutils-0.170-stripnothing.patch b/elfutils-0.170-stripnothing.patch new file mode 100644 index 0000000..4010163 --- /dev/null +++ b/elfutils-0.170-stripnothing.patch @@ -0,0 +1,26 @@ +commit 8f0140ace401197beaed1df6a48f259756d8bbd9 +Author: Dmitry V. Levin +Date: Tue Aug 8 19:06:16 2017 +0300 + + tests: robustify run-strip-nothing.sh against unstripped libc_nonshared.a + + When glibc's libc_nonshared.a contains objects with debug info, + this debug info is leaked into every output file produced by gcc. + Change run-strip-nothing.sh to use "gcc -s" instead of plain "gcc" + for producing objects without debug info. + + Signed-off-by: Dmitry V. Levin + +diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh +index e80bd906..914fdfbf 100755 +--- a/tests/run-strip-nothing.sh ++++ b/tests/run-strip-nothing.sh +@@ -23,7 +23,7 @@ + tempfiles a.out strip.out debug.out + + # Create no-debug a.out. +-echo "int main() { return 1; }" | gcc -xc - ++echo "int main() { return 1; }" | gcc -s -xc - + + # strip to file + testrun ${abs_top_builddir}/src/strip -g -o strip.out || diff --git a/elfutils-0.170.tar.bz2 b/elfutils-0.170.tar.bz2 new file mode 100644 index 0000000..547b216 --- /dev/null +++ b/elfutils-0.170.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066 +size 8358001 diff --git a/elfutils-0.170.tar.bz2.sig b/elfutils-0.170.tar.bz2.sig new file mode 100644 index 0000000..9421445 Binary files /dev/null and b/elfutils-0.170.tar.bz2.sig differ diff --git a/elfutils.changes b/elfutils.changes index 056a988..b0d5259 100644 --- a/elfutils.changes +++ b/elfutils.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Mar 9 09:21:05 UTC 2018 - rguenther@suse.com + +- Update to version 0.170 + libdw: Added new DWARF5 attribute, tag, character encoding, language code, + calling convention, defaulted member function and macro constants + to dwarf.h. + New functions dwarf_default_lower_bound and dwarf_line_file. + dwarf_peel_type now handles DWARF5 immutable, packed and shared tags. + dwarf_getmacros now handles DWARF5 .debug_macro sections. + strip: Add -R, --remove-section=SECTION and --keep-section=SECTION. + backends: The bpf disassembler is now always build on all platforms. +- Includes changes in 0.169 + backends: Add support for EM_PPC64 GNU_ATTRIBUTES. + Frame pointer unwinding fallback support for i386, x86_64, aarch64. + translations: Update Polish translation. +- Remove obsolete 0001-backends-Add-support-for-EM_PPC64-GNU_ATTRIBUTES.patch + and ppc-machine-flags.patch +- Add elfutils-0.170-stripnothing.patch to robustify test and avoid a FAIL. +- Add elfutils-0.170-Wpackednotaligned.patch to fix build with GCC 8. + (boo#1084637) + ------------------------------------------------------------------- Thu Feb 22 15:10:31 UTC 2018 - fvogt@suse.com diff --git a/elfutils.spec b/elfutils.spec index a0b845d..3efd720 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -17,7 +17,7 @@ Name: elfutils -Version: 0.168 +Version: 0.170 Release: 0 Summary: Higher-level library to access ELF files License: SUSE-GPL-2.0-with-OSI-exception @@ -31,8 +31,10 @@ Source1: README-BEFORE-ADDING-PATCHES Source2: baselibs.conf Source3: %{name}.changes Patch1: disable-tests-with-ptrace.patch -Patch2: 0001-backends-Add-support-for-EM_PPC64-GNU_ATTRIBUTES.patch -Patch3: ppc-machine-flags.patch +# Upstream ab6b37ac, fix build with GCC8 +Patch2: elfutils-0.170-Wpackednotaligned.patch +# Upstream 8f01400a, Robustify strip-nothing test +Patch3: elfutils-0.170-stripnothing.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake diff --git a/ppc-machine-flags.patch b/ppc-machine-flags.patch deleted file mode 100644 index 2964fcd..0000000 --- a/ppc-machine-flags.patch +++ /dev/null @@ -1,41 +0,0 @@ -2017-06-15 Andreas Schwab - - * ppc_symbol.c (ppc_machine_flag_check): New function. - * ppc_init.c (ppc_init): Hook it. - -diff --git a/backends/ppc_init.c b/backends/ppc_init.c -index c3e3ca3607..aea9f2d740 100644 ---- a/backends/ppc_init.c -+++ b/backends/ppc_init.c -@@ -53,6 +53,7 @@ ppc_init (Elf *elf __attribute__ ((unused)), - eh->name = "PowerPC"; - ppc_init_reloc (eh); - HOOK (eh, reloc_simple_type); -+ HOOK (eh, machine_flag_check); - HOOK (eh, dynamic_tag_name); - HOOK (eh, dynamic_tag_check); - HOOK (eh, check_special_symbol); -diff --git a/backends/ppc_symbol.c b/backends/ppc_symbol.c -index 1273c1d299..4b32003acc 100644 ---- a/backends/ppc_symbol.c -+++ b/backends/ppc_symbol.c -@@ -57,6 +57,16 @@ ppc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) - } - - -+/* Check whether machine flags are valid. */ -+bool -+ppc_machine_flag_check (GElf_Word flags) -+{ -+ return ((flags &~ (EF_PPC_EMB -+ | EF_PPC_RELOCATABLE -+ | EF_PPC_RELOCATABLE_LIB)) == 0); -+} -+ -+ - const char * - ppc_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)), - size_t len __attribute__ ((unused))) --- -2.13.1 -