From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] Add -Wtrampolines to CFLAGS.
Date: Mon, 19 Nov 2018 10:54:00 -0000 [thread overview]
Message-ID: <1542624854-9837-1-git-send-email-mark@klomp.org> (raw)
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 <mark@klomp.org>
---
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 <mark@klomp.org>
+
+ * eu.am (AM_CFLAGS): Add -Wtrampolines.
+
2018-07-04 Mark Wielaard <mark@klomp.org>
* 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
next reply other threads:[~2018-11-19 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 10:54 Mark Wielaard [this message]
2018-11-21 12:12 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1542624854-9837-1-git-send-email-mark@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).