Add -Wtrampolines to CFLAGS.

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>
This commit is contained in:
Mark Wielaard
2018-11-19 11:46:46 +01:00
parent c93f060df3
commit f5810ec76c
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -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.
+1 -1
View File
@@ -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) \