diff -uNp -r gcc-4.6.3.orig/gcc/config/gnu-user.h gcc-4.6.3/gcc/config/gnu-user.h --- gcc-4.6.3.orig/gcc/config/gnu-user.h 2011-01-12 14:29:14 +0000 +++ gcc-4.6.3/gcc/config/gnu-user.h 2013-04-30 15:52:37 +0000 @@ -43,8 +43,8 @@ see the files COPYING3 and COPYING.RUNTI #if defined HAVE_LD_PIE #define GNU_USER_TARGET_STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" + "%{!shared: %{pg|p|profile:gcrt1.o%s;static|nopie:crt1.o%s;:Scrt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;nopie:crtbegin.o%s;:crtbeginS.o%s}" #else #define GNU_USER_TARGET_STARTFILE_SPEC \ "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ Двоичные файлы gcc-4.6.3.orig/gcc/config/.gnu-user.h.swp и gcc-4.6.3/gcc/config/.gnu-user.h.swp различаются diff -uNp -r gcc-4.6.3.orig/gcc/config/i386/linux64.h gcc-4.6.3/gcc/config/i386/linux64.h --- gcc-4.6.3.orig/gcc/config/i386/linux64.h 2011-09-08 09:12:35 +0000 +++ gcc-4.6.3/gcc/config/i386/linux64.h 2013-04-30 15:01:44 +0000 @@ -94,7 +94,8 @@ see the files COPYING3 and COPYING.RUNTI %{mpc32:crtprec32.o%s} \ %{mpc64:crtprec64.o%s} \ %{mpc80:crtprec80.o%s} \ - %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" + %{shared|pie:crtendS.o%s;static|nopie|pg|p|profile:crtend.o%s;:crtendS.o%s} \ + crtn.o%s" #if TARGET_64BIT_DEFAULT #define MULTILIB_DEFAULTS { "m64" } diff -uNp -r gcc-4.6.3.orig/gcc/config/i386/linux.h gcc-4.6.3/gcc/config/i386/linux.h --- gcc-4.6.3.orig/gcc/config/i386/linux.h 2011-09-08 09:12:35 +0000 +++ gcc-4.6.3/gcc/config/i386/linux.h 2013-04-30 15:00:32 +0000 @@ -118,7 +118,8 @@ along with GCC; see the file COPYING3. %{mpc32:crtprec32.o%s} \ %{mpc64:crtprec64.o%s} \ %{mpc80:crtprec80.o%s} \ - %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" + %{shared|pie:crtendS.o%s;static|nopie|pg|p|profile:crtend.o%s;:crtendS.o%s} \ + crtn.o%s" /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named diff -uNp -r gcc-4.6.3.orig/gcc/doc/invoke.texi gcc-4.6.3/gcc/doc/invoke.texi --- gcc-4.6.3.orig/gcc/doc/invoke.texi 2012-01-03 16:43:38 +0000 +++ gcc-4.6.3/gcc/doc/invoke.texi 2013-04-30 13:55:50 +0000 @@ -9213,6 +9213,11 @@ For example, @samp{-Wl,-Map,output.map} linker. When using the GNU linker, you can also get the same effect with @samp{-Wl,-Map=output.map}. +On Openwall GNU/*/Linux (and some other systems), the options +@option{-Wl,-z,relro} and @option{-Wl,-z,now} are assumed by default. +To disable these, you may use @option{-Wl,-z,norelro} and +@option{-Wl,-z,lazy}, respectively. + @item -u @var{symbol} @opindex u Pretend the symbol @var{symbol} is undefined, to force linking of diff -uNp -r gcc-4.6.3.orig/gcc/gcc.c gcc-4.6.3/gcc/gcc.c --- gcc-4.6.3.orig/gcc/gcc.c 2011-02-23 02:04:43 +0000 +++ gcc-4.6.3/gcc/gcc.c 2013-04-30 14:11:43 +0000 @@ -609,7 +609,9 @@ proper position among the other output f #ifndef LINK_PIE_SPEC #ifdef HAVE_LD_PIE -#define LINK_PIE_SPEC "%{pie:-pie} " +#define LINK_PIE_SPEC \ + "%{!nopie: %{!static: %{!A: %{!shared: %{!nostdlib: %{!nostartfiles:" \ + "%{!fno-PIE: %{!fno-pie: -pie} } } } } } } } %{pie: -pie}" #else #define LINK_PIE_SPEC "%{pie:} " #endif @@ -657,6 +659,8 @@ proper position among the other output f }"PLUGIN_COND_CLOSE" \ %{flto|flto=*:%