@@ -113,8 +113,9 @@ pub trait Linker {
113
113
fn gc_sections ( & mut self , keep_metadata : bool ) ;
114
114
fn position_independent_executable ( & mut self ) ;
115
115
fn no_position_independent_executable ( & mut self ) ;
116
- fn partial_relro ( & mut self ) ;
117
116
fn full_relro ( & mut self ) ;
117
+ fn partial_relro ( & mut self ) ;
118
+ fn no_relro ( & mut self ) ;
118
119
fn optimize ( & mut self ) ;
119
120
fn debuginfo ( & mut self ) ;
120
121
fn no_default_libraries ( & mut self ) ;
@@ -188,8 +189,9 @@ impl<'a> Linker for GccLinker<'a> {
188
189
fn add_object ( & mut self , path : & Path ) { self . cmd . arg ( path) ; }
189
190
fn position_independent_executable ( & mut self ) { self . cmd . arg ( "-pie" ) ; }
190
191
fn no_position_independent_executable ( & mut self ) { self . cmd . arg ( "-no-pie" ) ; }
191
- fn partial_relro ( & mut self ) { self . linker_arg ( "-z,relro" ) ; }
192
192
fn full_relro ( & mut self ) { self . linker_arg ( "-z,relro,-z,now" ) ; }
193
+ fn partial_relro ( & mut self ) { self . linker_arg ( "-z,relro" ) ; }
194
+ fn no_relro ( & mut self ) { self . linker_arg ( "-z,norelro" ) ; }
193
195
fn build_static_executable ( & mut self ) { self . cmd . arg ( "-static" ) ; }
194
196
fn args ( & mut self , args : & [ String ] ) { self . cmd . args ( args) ; }
195
197
@@ -452,11 +454,15 @@ impl<'a> Linker for MsvcLinker<'a> {
452
454
// noop
453
455
}
454
456
457
+ fn full_relro ( & mut self ) {
458
+ // noop
459
+ }
460
+
455
461
fn partial_relro ( & mut self ) {
456
462
// noop
457
463
}
458
464
459
- fn full_relro ( & mut self ) {
465
+ fn no_relro ( & mut self ) {
460
466
// noop
461
467
}
462
468
@@ -664,11 +670,15 @@ impl<'a> Linker for EmLinker<'a> {
664
670
// noop
665
671
}
666
672
673
+ fn full_relro ( & mut self ) {
674
+ // noop
675
+ }
676
+
667
677
fn partial_relro ( & mut self ) {
668
678
// noop
669
679
}
670
680
671
- fn full_relro ( & mut self ) {
681
+ fn no_relro ( & mut self ) {
672
682
// noop
673
683
}
674
684
@@ -829,10 +839,13 @@ impl Linker for WasmLd {
829
839
fn position_independent_executable ( & mut self ) {
830
840
}
831
841
842
+ fn full_relro ( & mut self ) {
843
+ }
844
+
832
845
fn partial_relro ( & mut self ) {
833
846
}
834
847
835
- fn full_relro ( & mut self ) {
848
+ fn no_relro ( & mut self ) {
836
849
}
837
850
838
851
fn build_static_executable ( & mut self ) {
0 commit comments