/[gentoo]/src/patchsets/binutils/2.20.1/78_all_use-relro.patch
Gentoo

Diff of /src/patchsets/binutils/2.20.1/78_all_use-relro.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
5+++ binutils/ld/ldmain.c 5+++ binutils/ld/ldmain.c
6@@ -293,2 +293,3 @@ main (int argc, char **argv) 6@@ -293,2 +293,3 @@ main (int argc, char **argv)
7 link_info.combreloc = TRUE; 7 link_info.combreloc = TRUE;
8+ link_info.relro = TRUE; 8+ link_info.relro = TRUE;
9 link_info.strip_discarded = TRUE; 9 link_info.strip_discarded = TRUE;
10
11many tests rely on order of symbols and the relro option changes that.
12so to avoid having to constantly thrash in the test files, use the normal
13relro option that everyone tests against.
14
15--- binutils/ld/testsuite/lib/ld-lib.exp
16+++ binutils/ld/testsuite/lib/ld-lib.exp
17@@ -84,7 +84,7 @@
18 global HOSTING_EMU
19
20 remote_file host delete $target
21- return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -o $target -r $objects"]
22+ return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro -o $target -r $objects"]
23 }
24
25 # Check to see if ld is being invoked with a non-endian output format
26@@ -158,7 +158,7 @@
27
28 remote_file host delete $target
29
30- return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv $flags -o $target $objs $libs"]
31+ return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro $flags -o $target $objs $libs"]
32 }
33
34 # Link a program using ld, without including any libraries.
35@@ -189,7 +189,7 @@
36
37 remote_file host delete $target
38
39- set exec_output [run_host_cmd "$ld" "--hash-style=sysv $flags -o $target $objects"]
40+ set exec_output [run_host_cmd "$ld" "--hash-style=sysv -z norelro $flags -o $target $objects"]
41 set exec_output [prune_warnings $exec_output]
42
43 # We don't care if we get a warning about a non-existent start

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20