diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2011-12-16 00:00:43 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2011-12-16 00:00:43 +0000 |
commit | 1ed753c7d69c8340eebc068b1d5b31d2554ce811 (patch) | |
tree | f16299769978d52cdec478852450851575bca99a /debian/patches/gcc-default-relro.diff | |
download | gcc-47-1ed753c7d69c8340eebc068b1d5b31d2554ce811.tar.gz |
- create a gcc-4.7 branch
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.7@5753 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
Diffstat (limited to 'debian/patches/gcc-default-relro.diff')
-rw-r--r-- | debian/patches/gcc-default-relro.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/gcc-default-relro.diff b/debian/patches/gcc-default-relro.diff new file mode 100644 index 0000000..dd6ae2d --- /dev/null +++ b/debian/patches/gcc-default-relro.diff @@ -0,0 +1,29 @@ +# DP: Turn on -Wl,-z,relro by default. + +--- + gcc/doc/invoke.texi | 3 +++ + gcc/gcc.c | 1 + + 2 files changed, 4 insertions(+), 0 deletions(-) + +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -9216,6 +9216,9 @@ + linker. When using the GNU linker, you can also get the same effect with + @samp{-Wl,-Map=output.map}. + ++NOTE: In Ubuntu 8.10 and later versions, for LDFLAGS, the option ++@option{-Wl,-z,relro} is used. To disable, use @option{-Wl,-z,norelro}. ++ + @item -u @var{symbol} + @opindex u + Pretend the symbol @var{symbol} is undefined, to force linking of +--- a/src/gcc/gcc.c ++++ b/src/gcc/gcc.c +@@ -661,6 +661,7 @@ + }"PLUGIN_COND_CLOSE" \ + %{flto|flto=*:%<fcompare-debug*} \ + %{flto} %{flto=*} %l " LINK_PIE_SPEC \ ++ " -z relro "\ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ + %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ |