diff options
author | Zach van Rijn <me@zv.io> | 2022-10-31 22:39:57 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-11-02 16:01:24 -0500 |
commit | c5b882546f831beffaec290c7b5c6ee3b4efc258 (patch) | |
tree | ab443a31f04ce8e2a8d8d3b5bb177910641a7fa0 /user/openjdk7/gcc-002_all_default-relro.patch | |
parent | f501eba1775d96f4438e2086e4b66966f2ec06a8 (diff) | |
download | packages-c5b882546f831beffaec290c7b5c6ee3b4efc258.tar.gz packages-c5b882546f831beffaec290c7b5c6ee3b4efc258.tar.bz2 packages-c5b882546f831beffaec290c7b5c6ee3b4efc258.tar.xz packages-c5b882546f831beffaec290c7b5c6ee3b4efc258.zip |
[WIP] import from ppc64 test tree.
Diffstat (limited to 'user/openjdk7/gcc-002_all_default-relro.patch')
-rw-r--r-- | user/openjdk7/gcc-002_all_default-relro.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/user/openjdk7/gcc-002_all_default-relro.patch b/user/openjdk7/gcc-002_all_default-relro.patch new file mode 100644 index 000000000..c461017dc --- /dev/null +++ b/user/openjdk7/gcc-002_all_default-relro.patch @@ -0,0 +1,33 @@ +# Turn on -Wl,-z,relro,-z,now by default. + +--- + gcc/doc/invoke.texi | 3 +++ + gcc/gcc.c | 1 + + 2 files changed, 4 insertions(+), 0 deletions(-) + +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -11424,6 +11424,9 @@ For example, @option{-Wl,-Map,output.map + linker. When using the GNU linker, you can also get the same effect with + @option{-Wl,-Map=output.map}. + ++NOTE: In Alpine Linux, for LDFLAGS, the option ++@option{-Wl,-z,relro,now} 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 +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -890,6 +890,7 @@ proper position among the other output f + "%{flto|flto=*:%<fcompare-debug*} \ + %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ ++ "-z relro -z now " \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ |