diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-11-18 15:53:29 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-11-18 15:53:29 +0300 |
commit | 8f6c4b0033c72f8ac14694c419a99458339dd6a9 (patch) | |
tree | 06c106e622a58100aa85a381b9b65d222b076df4 /debian/patches/gcc-default-relro.diff | |
parent | 42156b5190f4fa150e1fab6777eb81e69d4db8c9 (diff) | |
download | gcc-9-debian.tar.gz |
Import gcc-9 (9.2.1-19)debian/9.2.1-19debian
Diffstat (limited to 'debian/patches/gcc-default-relro.diff')
-rw-r--r-- | debian/patches/gcc-default-relro.diff | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/debian/patches/gcc-default-relro.diff b/debian/patches/gcc-default-relro.diff index 40855f8..9e80816 100644 --- a/debian/patches/gcc-default-relro.diff +++ b/debian/patches/gcc-default-relro.diff @@ -5,11 +5,9 @@ gcc/gcc.c | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) -Index: b/src/gcc/doc/invoke.texi -=================================================================== --- a/src/gcc/doc/invoke.texi +++ b/src/gcc/doc/invoke.texi -@@ -11638,6 +11638,9 @@ For example, @option{-Wl,-Map,output.map +@@ -13520,6 +13520,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}. @@ -19,15 +17,26 @@ Index: b/src/gcc/doc/invoke.texi @item -u @var{symbol} @opindex u Pretend the symbol @var{symbol} is undefined, to force linking of -Index: b/src/gcc/gcc.c -=================================================================== --- a/src/gcc/gcc.c +++ b/src/gcc/gcc.c -@@ -1027,6 +1027,7 @@ proper position among the other output f +@@ -1122,6 +1122,12 @@ proper position among the other output f + to understand them. In practice, this means it had better be collect2. */ + /* %{e*} includes -export-dynamic; see comment in common.opt. */ + ++#if defined(ACCEL_COMPILER) ++# define RELRO_SPEC "" ++#else ++# define RELRO_SPEC "-z relro " ++#endif ++ + #ifndef LINK_COMMAND_SPEC + #define LINK_COMMAND_SPEC "\ + %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ +@@ -1130,6 +1136,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 " \ ++ RELRO_SPEC \ "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ - %{static:} %{L*} %(mfwrap) %(link_libgcc) " \ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ + %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ |