wok-next view 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 source
1 # Turn on -Wl,-z,relro,-z,now by default.
3 ---
4 gcc/doc/invoke.texi | 3 +++
5 gcc/gcc.c | 1 +
6 2 files changed, 4 insertions(+), 0 deletions(-)
8 Index: b/gcc/doc/invoke.texi
9 ===================================================================
10 --- a/gcc/doc/invoke.texi
11 +++ b/gcc/doc/invoke.texi
12 @@ -11424,6 +11424,9 @@ For example, @option{-Wl,-Map,output.map
13 linker. When using the GNU linker, you can also get the same effect with
14 @option{-Wl,-Map=output.map}.
16 +NOTE: In Alpine Linux, for LDFLAGS, the option
17 +@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}.
18 +
19 @item -u @var{symbol}
20 @opindex u
21 Pretend the symbol @var{symbol} is undefined, to force linking of
22 Index: b/gcc/gcc.c
23 ===================================================================
24 --- a/gcc/gcc.c
25 +++ b/gcc/gcc.c
26 @@ -890,6 +890,7 @@ proper position among the other output f
27 "%{flto|flto=*:%<fcompare-debug*} \
28 %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
29 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
30 + "-z relro -z now " \
31 "%X %{o*} %{e*} %{N} %{n} %{r}\
32 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
33 %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\