From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34158 invoked by alias); 24 Oct 2017 12:35:57 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 34141 invoked by uid 89); 24 Oct 2017 12:35:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy= X-Spam-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Oct 2017 12:35:54 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 6F91230002FA; Tue, 24 Oct 2017 14:35:51 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 2AFC6413CD4E; Tue, 24 Oct 2017 14:35:51 +0200 (CEST) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [PATCH] backends: Ignore GCC8 -Wpacked-not-aligned for m68k_corenote.c. Date: Tue, 24 Oct 2017 12:35:00 -0000 Message-Id: <1508848549-24746-1-git-send-email-mark@klomp.org> X-Mailer: git-send-email 1.8.3.1 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00029.txt.bz2 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 --- backends/ChangeLog | 4 ++++ backends/Makefile.am | 7 +++++++ config/ChangeLog | 4 ++++ config/eu.am | 1 + 4 files changed, 16 insertions(+) diff --git a/backends/ChangeLog b/backends/ChangeLog index 8c3f42c..8e7fecc 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,7 @@ +2017-10-24 Mark Wielaard + + * Makefile.am (m68k_corenote_Wpacked_not_aligned): New variable. + 2017-08-18 Ulf Hermann * linux-core-note.c: Use attribute_packed. diff --git a/backends/Makefile.am b/backends/Makefile.am index 0fde0cb..306c4a6 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_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/ChangeLog b/config/ChangeLog index 1ed3c4a..de0d890 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2017-10-24 Mark Wielaard + + * eu.am (AM_CFLAGS): Handle -Wno-packed-not-aligned. + 2017-04-27 Ulf Hermann * eu.am: Use fpic_CFLAGS. diff --git a/config/eu.am b/config/eu.am index 796f388..fb039e2 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)) -- 1.8.3.1