diff options
author | davidovski <david@davidovski.xyz> | 2022-05-31 11:05:19 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-31 11:05:19 +0100 |
commit | 48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch) | |
tree | 00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/gcc/0003-Turn-on-Wl-z-relro-z-now-by-default.patch | |
parent | 871b2b573f01c1b3176a0f65458b3d281b41c437 (diff) |
removed idea of repos
Diffstat (limited to 'repo/gcc/0003-Turn-on-Wl-z-relro-z-now-by-default.patch')
-rw-r--r-- | repo/gcc/0003-Turn-on-Wl-z-relro-z-now-by-default.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/repo/gcc/0003-Turn-on-Wl-z-relro-z-now-by-default.patch b/repo/gcc/0003-Turn-on-Wl-z-relro-z-now-by-default.patch new file mode 100644 index 0000000..334d17e --- /dev/null +++ b/repo/gcc/0003-Turn-on-Wl-z-relro-z-now-by-default.patch @@ -0,0 +1,39 @@ +From ef512b8fcf9c7628267ff2dbb127aa094f6754f3 Mon Sep 17 00:00:00 2001 +From: Ariadne Conill <ariadne@dereferenced.org> +Date: Fri, 21 Aug 2020 06:45:49 +0000 +Subject: [PATCH] Turn on -Wl,-z,relro,-z,now by default. + +--- + gcc/doc/invoke.texi | 3 +++ + gcc/gcc.c | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index cd31b522e42..17d371ef432 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -14663,6 +14663,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the + 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 +diff --git a/gcc/gcc.c b/gcc/gcc.c +index b2200c5185a..625c9ab7902 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1039,6 +1039,7 @@ proper position among the other output files. */ + "%{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:%{!r:%{!nostartfiles:%S}}} \ + %{Wno-poison-system-directories:--no-poison-system-directories} \ +-- +2.31.1 + |