Rollup merge of #134261 - bjorn3:document_symbol_visibility, r=lqd
Document the symbol Visibility enum
This commit is contained in:
commit
cb459fa427
1 changed files with 12 additions and 0 deletions
|
@ -294,10 +294,22 @@ pub enum Linkage {
|
||||||
Common,
|
Common,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Specifies the symbol visibility with regards to dynamic linking.
|
||||||
|
///
|
||||||
|
/// Visibility doesn't have any effect when linkage is internal.
|
||||||
|
///
|
||||||
|
/// DSO means dynamic shared object, that is a dynamically linked executable or dylib.
|
||||||
#[derive(Copy, Clone, PartialEq, Debug, HashStable)]
|
#[derive(Copy, Clone, PartialEq, Debug, HashStable)]
|
||||||
pub enum Visibility {
|
pub enum Visibility {
|
||||||
|
/// Export the symbol from the DSO and apply overrides of the symbol by outside DSOs to within
|
||||||
|
/// the DSO if the object file format supports this.
|
||||||
Default,
|
Default,
|
||||||
|
/// Hide the symbol outside of the defining DSO even when external linkage is used to export it
|
||||||
|
/// from the object file.
|
||||||
Hidden,
|
Hidden,
|
||||||
|
/// Export the symbol from the DSO, but don't apply overrides of the symbol by outside DSOs to
|
||||||
|
/// within the DSO. Equivalent to default visibility with object file formats that don't support
|
||||||
|
/// overriding exported symbols by another DSO.
|
||||||
Protected,
|
Protected,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue