wok-next diff gcc/stuff/patches/002_all_default-relro.patch @ rev 21688
updated glu (9.0.0 -> 9.0.1)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jun 29 17:17:08 2020 +0100 (2020-06-29) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gcc/stuff/patches/002_all_default-relro.patch Mon Jun 29 17:17:08 2020 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +# Turn on -Wl,-z,relro,-z,now by default. 1.5 + 1.6 +--- 1.7 + gcc/doc/invoke.texi | 3 +++ 1.8 + gcc/gcc.c | 1 + 1.9 + 2 files changed, 4 insertions(+), 0 deletions(-) 1.10 + 1.11 +Index: b/gcc/doc/invoke.texi 1.12 +=================================================================== 1.13 +--- a/gcc/doc/invoke.texi 1.14 ++++ b/gcc/doc/invoke.texi 1.15 +@@ -11424,6 +11424,9 @@ For example, @option{-Wl,-Map,output.map 1.16 + linker. When using the GNU linker, you can also get the same effect with 1.17 + @option{-Wl,-Map=output.map}. 1.18 + 1.19 ++NOTE: In Alpine Linux, for LDFLAGS, the option 1.20 ++@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}. 1.21 ++ 1.22 + @item -u @var{symbol} 1.23 + @opindex u 1.24 + Pretend the symbol @var{symbol} is undefined, to force linking of 1.25 +Index: b/gcc/gcc.c 1.26 +=================================================================== 1.27 +--- a/gcc/gcc.c 1.28 ++++ b/gcc/gcc.c 1.29 +@@ -890,6 +890,7 @@ proper position among the other output f 1.30 + "%{flto|flto=*:%<fcompare-debug*} \ 1.31 + %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \ 1.32 + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ 1.33 ++ "-z relro -z now " \ 1.34 + "%X %{o*} %{e*} %{N} %{n} %{r}\ 1.35 + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ 1.36 + %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\