aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg (Zorry) <zorry@gentoo.org>2010-05-04 00:24:15 +0200
committerMagnus Granberg (Zorry) <zorry@gentoo.org>2010-05-04 00:24:15 +0200
commit35a72950bb1665878a8db0f2a8234b7660e9e4fb (patch)
tree47ed81a9ef27dd342c9383100d907df4c2c711d2 /upstream
parentUpdated esp.h in the patchset 0.4.1 (diff)
downloadhardened-gccpatchset-35a72950bb1665878a8db0f2a8234b7660e9e4fb.tar.gz
hardened-gccpatchset-35a72950bb1665878a8db0f2a8234b7660e9e4fb.tar.bz2
hardened-gccpatchset-35a72950bb1665878a8db0f2a8234b7660e9e4fb.zip
Move the warntrampolin patch to /upstream
Diffstat (limited to 'upstream')
-rw-r--r--upstream/00_all_gcc45-trampolinewarn.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/upstream/00_all_gcc45-trampolinewarn.patch b/upstream/00_all_gcc45-trampolinewarn.patch
new file mode 100644
index 0000000..f35a56c
--- /dev/null
+++ b/upstream/00_all_gcc45-trampolinewarn.patch
@@ -0,0 +1,33 @@
+ This trivial patch causes gcc to emit a warning whenever
+ it generates a trampoline. These are otherwise hard to
+ locate. It is rigged to default ON - to have it default
+ to OFF remove the text 'Init(1)' from the common.opt
+ patch, leaving just 'Common Var(warn_trampolines)'.
+ Kevin F. Quinn <kevquinn@gentoo.org> 17 Jan 2006
+
+--- gcc/common.opt
++++ gcc/common.opt
+@@ -141,6 +141,10 @@
+ Common Var(warn_system_headers)
+ Do not suppress warnings from system headers
+
++Wtrampolines
++Common Var(warn_trampolines) Init(1)
++Warn whenever a trampoline is generated
++
+ Wuninitialized
+ Common Var(warn_uninitialized)
+ Warn about uninitialized automatic variables
+--- gcc/builtins.c
++++ gcc/builtins.c
+@@ -5150,6 +5150,10 @@
+ targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
+
+ trampolines_created = 1;
++
++ if (warn_trampolines)
++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
++
+ return const0_rtx;
+ }
+