diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2025-04-21 18:53:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-21 18:53:16 +0000 |
| commit | cac8bc3d1fbffe3aec1b791ad4f96e113a13c609 (patch) | |
| tree | eedf482ee8b51c69df4d907f2a137335c92be673 /library/std/src/sys/args | |
| parent | 5779843edac746718fead4eeeb505ef7bae8aef0 (diff) | |
| parent | 8dc773296cf743af20b1174050431c29ba6a7427 (diff) | |
| download | rust-cac8bc3d1fbffe3aec1b791ad4f96e113a13c609.tar.gz rust-cac8bc3d1fbffe3aec1b791ad4f96e113a13c609.zip | |
Rollup merge of #139795 - jethrogb:jb/sgx-linkage-comments, r=joboet
Clarify why SGX code specifies linkage/symbol names for certain statics Specifying linkage/symbol name is solely to ensure a single instance between the `std` crate and its unit tests. Also update the symbol names as items have moved around a bit. The actual name isn't that important, it just needs to be unique. But for debugging it can be useful for it to point to the right place.
Diffstat (limited to 'library/std/src/sys/args')
| -rw-r--r-- | library/std/src/sys/args/sgx.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/args/sgx.rs b/library/std/src/sys/args/sgx.rs index efc4b791852..0185a8a6000 100644 --- a/library/std/src/sys/args/sgx.rs +++ b/library/std/src/sys/args/sgx.rs @@ -8,6 +8,7 @@ use crate::sys::pal::abi::usercalls::raw::ByteBuffer; use crate::sys_common::FromInner; use crate::{fmt, slice}; +// Specifying linkage/symbol name is solely to ensure a single instance between this crate and its unit tests #[cfg_attr(test, linkage = "available_externally")] #[unsafe(export_name = "_ZN16__rust_internals3std3sys3sgx4args4ARGSE")] static ARGS: AtomicUsize = AtomicUsize::new(0); |
