@@ -113,8 +113,9 @@ pub trait Linker {
113113 fn gc_sections ( & mut self , keep_metadata : bool ) ;
114114 fn position_independent_executable ( & mut self ) ;
115115 fn no_position_independent_executable ( & mut self ) ;
116- fn partial_relro ( & mut self ) ;
117116 fn full_relro ( & mut self ) ;
117+ fn partial_relro ( & mut self ) ;
118+ fn no_relro ( & mut self ) ;
118119 fn optimize ( & mut self ) ;
119120 fn debuginfo ( & mut self ) ;
120121 fn no_default_libraries ( & mut self ) ;
@@ -188,8 +189,9 @@ impl<'a> Linker for GccLinker<'a> {
188189 fn add_object ( & mut self , path : & Path ) { self . cmd . arg ( path) ; }
189190 fn position_independent_executable ( & mut self ) { self . cmd . arg ( "-pie" ) ; }
190191 fn no_position_independent_executable ( & mut self ) { self . cmd . arg ( "-no-pie" ) ; }
191- fn partial_relro ( & mut self ) { self . linker_arg ( "-z,relro" ) ; }
192192 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" ) ; }
193195 fn build_static_executable ( & mut self ) { self . cmd . arg ( "-static" ) ; }
194196 fn args ( & mut self , args : & [ String ] ) { self . cmd . args ( args) ; }
195197
@@ -452,11 +454,15 @@ impl<'a> Linker for MsvcLinker<'a> {
452454 // noop
453455 }
454456
457+ fn full_relro ( & mut self ) {
458+ // noop
459+ }
460+
455461 fn partial_relro ( & mut self ) {
456462 // noop
457463 }
458464
459- fn full_relro ( & mut self ) {
465+ fn no_relro ( & mut self ) {
460466 // noop
461467 }
462468
@@ -664,11 +670,15 @@ impl<'a> Linker for EmLinker<'a> {
664670 // noop
665671 }
666672
673+ fn full_relro ( & mut self ) {
674+ // noop
675+ }
676+
667677 fn partial_relro ( & mut self ) {
668678 // noop
669679 }
670680
671- fn full_relro ( & mut self ) {
681+ fn no_relro ( & mut self ) {
672682 // noop
673683 }
674684
@@ -829,10 +839,13 @@ impl Linker for WasmLd {
829839 fn position_independent_executable ( & mut self ) {
830840 }
831841
842+ fn full_relro ( & mut self ) {
843+ }
844+
832845 fn partial_relro ( & mut self ) {
833846 }
834847
835- fn full_relro ( & mut self ) {
848+ fn no_relro ( & mut self ) {
836849 }
837850
838851 fn build_static_executable ( & mut self ) {
0 commit comments