aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust/static-pie.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/rust/static-pie.patch')
-rw-r--r--community/rust/static-pie.patch17
1 files changed, 10 insertions, 7 deletions
diff --git a/community/rust/static-pie.patch b/community/rust/static-pie.patch
index 8a3a9b9b36..437a95ebe7 100644
--- a/community/rust/static-pie.patch
+++ b/community/rust/static-pie.patch
@@ -53,20 +53,21 @@ library, just like static binaries, but more secure.
}
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
-@@ -388,6 +388,8 @@
+@@ -576,6 +576,8 @@
/// the functions in the executable are not randomized and can be used
/// during an exploit of a vulnerability in any code.
pub position_independent_executables: bool,
+ /// As above, but also support for static position independent executables.
+ pub static_position_independent_executables: bool,
- /// Either partial, full, or off. Full RELRO makes the dynamic linker
- /// resolve all symbols at startup and marks the GOT read-only before
- /// starting the program, preventing overwriting the GOT.
-@@ -519,7 +519,8 @@
+ /// Determines if the target always requires using the PLT for indirect
+ /// library calls or not. This controls the default value of the `-Z plt` flag.
+ pub needs_plt: bool,
+@@ -729,8 +729,9 @@
has_rpath: false,
no_default_libraries: true,
position_independent_executables: false,
+ static_position_independent_executables: false,
+ needs_plt: false,
relro_level: RelroLevel::None,
pre_link_objects_exe: Vec::new(),
pre_link_objects_dll: Vec::new(),
@@ -91,20 +92,22 @@ library, just like static binaries, but more secure.
}
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
-@@ -778,7 +778,8 @@
+@@ -1023,8 +1023,9 @@
key!(has_rpath, bool);
key!(no_default_libraries, bool);
key!(position_independent_executables, bool);
+ key!(static_position_independent_executables, bool);
+ key!(needs_plt, bool);
try!(key!(relro_level, RelroLevel));
key!(archive_format);
key!(allow_asm, bool);
key!(custom_unwind_resume, bool);
-@@ -981,7 +981,8 @@
+@@ -1233,8 +1233,9 @@
target_option_val!(has_rpath);
target_option_val!(no_default_libraries);
target_option_val!(position_independent_executables);
+ target_option_val!(static_position_independent_executables);
+ target_option_val!(needs_plt);
target_option_val!(relro_level);
target_option_val!(archive_format);
target_option_val!(allow_asm);