From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83934 invoked by alias); 19 Nov 2018 10:54:22 -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 82501 invoked by uid 89); 19 Nov 2018 10:54:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:logical X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS 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; Mon, 19 Nov 2018 10:54:19 +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 67C5D315F7E0; Mon, 19 Nov 2018 11:54:16 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id D5FB1400114F; Mon, 19 Nov 2018 11:54:16 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Mark Wielaard Subject: [PATCH] Add -Wtrampolines to CFLAGS. Date: Mon, 19 Nov 2018 10:54:00 -0000 Message-Id: <1542624854-9837-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: 2018-q4/txt/msg00146.txt.bz2 elfutils uses nested functions a lot. This is fine unless one takes the address of such a nested function. When taking the address of a nested function a trampoline is generated that on some systems require the stack to be executable. That is bad. We never want to generate such trampolines. Add -Wtrampolines to CLAGS to make sure we don't. Signed-off-by: Mark Wielaard --- config/ChangeLog | 4 ++++ config/eu.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/ChangeLog b/config/ChangeLog index f281eb2..40d6f85 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2018-11-19 Mark Wielaard + + * eu.am (AM_CFLAGS): Add -Wtrampolines. + 2018-07-04 Mark Wielaard * upload-release.sh: New file. diff --git a/config/eu.am b/config/eu.am index c2cc349..82acda3 100644 --- a/config/eu.am +++ b/config/eu.am @@ -70,7 +70,7 @@ IMPLICIT_FALLTHROUGH_WARNING= endif AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ - -Wold-style-definition -Wstrict-prototypes \ + -Wold-style-definition -Wstrict-prototypes -Wtrampolines \ $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ $(if $($(*F)_no_Werror),,-Werror) \ -- 1.8.3.1