@@ -326,7 +326,6 @@ pub(crate) trait Linker {
326
326
link_or_cc_args ( self , & [ path] ) ;
327
327
}
328
328
fn gc_sections ( & mut self , keep_metadata : bool ) ;
329
- fn no_gc_sections ( & mut self ) ;
330
329
fn full_relro ( & mut self ) ;
331
330
fn partial_relro ( & mut self ) ;
332
331
fn no_relro ( & mut self ) ;
@@ -688,12 +687,6 @@ impl<'a> Linker for GccLinker<'a> {
688
687
}
689
688
}
690
689
691
- fn no_gc_sections ( & mut self ) {
692
- if self . is_gnu || self . sess . target . is_like_wasm {
693
- self . link_arg ( "--no-gc-sections" ) ;
694
- }
695
- }
696
-
697
690
fn optimize ( & mut self ) {
698
691
if !self . is_gnu && !self . sess . target . is_like_wasm {
699
692
return ;
@@ -1010,10 +1003,6 @@ impl<'a> Linker for MsvcLinker<'a> {
1010
1003
}
1011
1004
}
1012
1005
1013
- fn no_gc_sections ( & mut self ) {
1014
- self . link_arg ( "/OPT:NOREF,NOICF" ) ;
1015
- }
1016
-
1017
1006
fn full_relro ( & mut self ) {
1018
1007
// noop
1019
1008
}
@@ -1243,10 +1232,6 @@ impl<'a> Linker for EmLinker<'a> {
1243
1232
// noop
1244
1233
}
1245
1234
1246
- fn no_gc_sections ( & mut self ) {
1247
- // noop
1248
- }
1249
-
1250
1235
fn optimize ( & mut self ) {
1251
1236
// Emscripten performs own optimizations
1252
1237
self . cc_arg ( match self . sess . opts . optimize {
@@ -1418,10 +1403,6 @@ impl<'a> Linker for WasmLd<'a> {
1418
1403
self . link_arg ( "--gc-sections" ) ;
1419
1404
}
1420
1405
1421
- fn no_gc_sections ( & mut self ) {
1422
- self . link_arg ( "--no-gc-sections" ) ;
1423
- }
1424
-
1425
1406
fn optimize ( & mut self ) {
1426
1407
// The -O flag is, as of late 2023, only used for merging of strings and debuginfo, and
1427
1408
// only differentiates -O0 and -O1. It does not apply to LTO.
@@ -1567,10 +1548,6 @@ impl<'a> Linker for L4Bender<'a> {
1567
1548
}
1568
1549
}
1569
1550
1570
- fn no_gc_sections ( & mut self ) {
1571
- self . link_arg ( "--no-gc-sections" ) ;
1572
- }
1573
-
1574
1551
fn optimize ( & mut self ) {
1575
1552
// GNU-style linkers support optimization with -O. GNU ld doesn't
1576
1553
// need a numeric argument, but other linkers do.
@@ -1734,10 +1711,6 @@ impl<'a> Linker for AixLinker<'a> {
1734
1711
self . link_arg ( "-bgc" ) ;
1735
1712
}
1736
1713
1737
- fn no_gc_sections ( & mut self ) {
1738
- self . link_arg ( "-bnogc" ) ;
1739
- }
1740
-
1741
1714
fn optimize ( & mut self ) { }
1742
1715
1743
1716
fn pgo_gen ( & mut self ) {
@@ -1982,8 +1955,6 @@ impl<'a> Linker for PtxLinker<'a> {
1982
1955
1983
1956
fn gc_sections ( & mut self , _keep_metadata : bool ) { }
1984
1957
1985
- fn no_gc_sections ( & mut self ) { }
1986
-
1987
1958
fn pgo_gen ( & mut self ) { }
1988
1959
1989
1960
fn no_crt_objects ( & mut self ) { }
@@ -2057,8 +2028,6 @@ impl<'a> Linker for LlbcLinker<'a> {
2057
2028
2058
2029
fn gc_sections ( & mut self , _keep_metadata : bool ) { }
2059
2030
2060
- fn no_gc_sections ( & mut self ) { }
2061
-
2062
2031
fn pgo_gen ( & mut self ) { }
2063
2032
2064
2033
fn no_crt_objects ( & mut self ) { }
@@ -2139,8 +2108,6 @@ impl<'a> Linker for BpfLinker<'a> {
2139
2108
2140
2109
fn gc_sections ( & mut self , _keep_metadata : bool ) { }
2141
2110
2142
- fn no_gc_sections ( & mut self ) { }
2143
-
2144
2111
fn pgo_gen ( & mut self ) { }
2145
2112
2146
2113
fn no_crt_objects ( & mut self ) { }
0 commit comments