]> git.lizzy.rs Git - rust.git/commitdiff
min_stack_size: clarify both reasons to use dlsym
authorAnders Kaseorg <andersk@mit.edu>
Mon, 23 Mar 2015 08:02:02 +0000 (04:02 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Mon, 23 Mar 2015 08:02:02 +0000 (04:02 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
src/libstd/sys/unix/thread.rs

index b3594dcaa756575f07a65c7ae64b2b0ee665011a..c66d86b76250f1221d6e01ce36205f5dc233830c 100644 (file)
@@ -316,11 +316,12 @@ unsafe fn dosleep(ts: *mut libc::timespec) -> libc::c_int {
 // is created in an application with big thread-local storage requirements.
 // See #6233 for rationale and details.
 //
-// Use dlsym to get the symbol value at runtime, for compatibility
-// with older versions of glibc.  Assumes that we've been dynamically
-// linked to libpthread but that is currently always the case.  We
-// previously used weak linkage (under the same assumption), but that
-// caused Debian to detect an unnecessarily strict versioned
+// Use dlsym to get the symbol value at runtime, both for
+// compatibility with older versions of glibc, and to avoid creating
+// dependencies on GLIBC_PRIVATE symbols.  Assumes that we've been
+// dynamically linked to libpthread but that is currently always the
+// case.  We previously used weak linkage (under the same assumption),
+// but that caused Debian to detect an unnecessarily strict versioned
 // dependency on libc6 (#23628).
 #[cfg(target_os = "linux")]
 fn min_stack_size(attr: *const libc::pthread_attr_t) -> libc::size_t {