summaryrefslogtreecommitdiffstats
path: root/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.xz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch')
-rw-r--r--source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch b/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
new file mode 100644
index 000000000..ba8318df9
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
@@ -0,0 +1,58 @@
+diff -upr ../binutils-2.22.52.0.1.orig/ld/testsuite/config/default.exp ld/testsuite/config/default.exp
+--- a/ld/testsuite/config/default.exp 2012-03-06 14:00:31.141957656 +0000
++++ b/ld/testsuite/config/default.exp 2012-03-06 14:09:33.492940503 +0000
+@@ -23,7 +23,7 @@
+ #
+
+ if ![info exists ld] then {
+- set ld [findfile $base_dir/ld-new $base_dir/ld-new [transform ld]]
++ set ld "[findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -znorelro"
+ }
+
+ if ![info exists as] then {
+@@ -60,7 +60,7 @@ if {![file isdirectory tmpdir/ld]} then
+ catch "exec ln -s ld tmpdir/ld/collect-ld" status
+ catch "exec ln -s ../../../gas/as-new tmpdir/ld/as" status
+ }
+-set gcc_B_opt "-B[pwd]/tmpdir/ld/"
++set gcc_B_opt "-B[pwd]/tmpdir/ld/ -Wl,-z,norelro"
+
+ # load the linker path
+ set ld_L_opt ""
+@@ -279,7 +279,7 @@
+ }
+
+ if ![info exists LD] then {
+- set LD [findfile $base_dir/ld-new ./ld-new [transform ld]]
++ set LD "[findfile $base_dir/ld-new ./ld-new [transform ld]] -znorelro"
+ }
+
+ if ![info exists LDFLAGS] then {
+diff -cpr ../binutils-2.22.52.0.1.orig/ld/testsuite/ld-bootstrap/bootstrap.exp ld/testsuite/ld-bootstrap/bootstrap.exp
+--- a/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 14:00:30.503957676 +0000
++++ b/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 15:03:33.949837926 +0000
+@@ -71,7 +71,13 @@
+
+ # This test can only be run if we have the ld build directory,
+ # since we need the object files.
+- if {$ld != "$objdir/ld-new"} {
++ set ldexe $ld
++ set ldparm [string first " " $ld]
++ if { $ldparm > 0 } then {
++ set ldparm [expr $ldparm - 1]
++ set ldexe [string range $ld 0 $ldparm]
++ }
++ if {$ldexe != "$objdir/ld-new"} {
+ untested $testname
+ continue
+ }
+--- binutils-2.26.orig/ld/emultempl/elf32.em 2016-01-25 10:11:33.990291993 +0000
++++ binutils-2.26/ld/emultempl/elf32.em 2016-01-25 10:21:40.333016777 +0000
+@@ -104,6 +104,7 @@ gld${EMULATION_NAME}_before_parse (void)
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
+ config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+ `if test -n "$CALL_NOP_BYTE" ; then echo link_info.call_nop_byte = $CALL_NOP_BYTE; fi`;
++ link_info.relro = TRUE;
+ }
+
+ EOF