Skip to content

Commit 4b77115

Browse files
committed
Update comments
1 parent f5af05b commit 4b77115

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,11 +1882,11 @@ pub(crate) fn linked_symbols(
18821882
// We really only need symbols from upstream rlibs to end up in the linked symbols list.
18831883
// The rest are in separate object files which the linker will always link in and
18841884
// doesn't have rules around the order in which they need to appear.
1885-
// When doing LTO, some of the symbols in the linked symbols list may end up getting
1886-
// internalized, which then prevents referencing them from symbols.o. When doing LTO,
1887-
// all object files that get linked in will be local object files rather than pulled in
1888-
// from rlibs, so an empty linked symbols list works fine to avoid referencing all those
1889-
// internalized symbols from symbols.o.
1885+
// When doing LTO, some of the symbols in the linked symbols list happen to be
1886+
// internalized by LTO, which then prevents referencing them from symbols.o. When doing
1887+
// LTO, all object files that get linked in will be local object files rather than
1888+
// pulled in from rlibs, so an empty linked symbols list works fine to avoid referencing
1889+
// all those internalized symbols from symbols.o.
18901890
return Vec::new();
18911891
}
18921892
}

compiler/rustc_middle/src/middle/exported_symbols.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ pub enum SymbolExportKind {
3131

3232
/// The `SymbolExportInfo` of a symbols specifies symbol-related information
3333
/// that is relevant to code generation and linking.
34+
///
35+
/// The difference between `used` and `rustc_std_internal_symbol` is that the
36+
/// former is exported by LTO while the latter isn't.
3437
#[derive(Eq, PartialEq, Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]
3538
pub struct SymbolExportInfo {
3639
pub level: SymbolExportLevel,

0 commit comments

Comments
 (0)