* [PATCH] Add -Wtrampolines to CFLAGS.
@ 2018-11-19 10:54 Mark Wielaard
2018-11-21 12:12 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2018-11-19 10:54 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Add -Wtrampolines to CFLAGS.
2018-11-19 10:54 [PATCH] Add -Wtrampolines to CFLAGS Mark Wielaard
@ 2018-11-21 12:12 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2018-11-21 12:12 UTC (permalink / raw)
To: elfutils-devel
On Mon, 2018-11-19 at 11:54 +0100, Mark Wielaard wrote:
> 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.
Pushed to master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-21 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 10:54 [PATCH] Add -Wtrampolines to CFLAGS Mark Wielaard
2018-11-21 12:12 ` Mark Wielaard
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).