summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/linux_raw/runtime/tls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/backend/linux_raw/runtime/tls.rs')
-rw-r--r--vendor/rustix/src/backend/linux_raw/runtime/tls.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/rustix/src/backend/linux_raw/runtime/tls.rs b/vendor/rustix/src/backend/linux_raw/runtime/tls.rs
index 8cc156a71..763971591 100644
--- a/vendor/rustix/src/backend/linux_raw/runtime/tls.rs
+++ b/vendor/rustix/src/backend/linux_raw/runtime/tls.rs
@@ -6,9 +6,9 @@
//! kernel-provided AUXV values.
#![allow(unsafe_code)]
-use super::super::c;
-use super::super::elf::*;
-use super::super::param::auxv::exe_phdrs_slice;
+use crate::backend::c;
+use crate::backend::elf::*;
+use crate::backend::param::auxv::exe_phdrs_slice;
use core::ptr::null;
/// For use with [`set_thread_area`].
@@ -29,7 +29,7 @@ pub(crate) fn startup_tls_info() -> StartupTlsInfo {
unsafe {
for phdr in phdrs {
match phdr.p_type {
- PT_PHDR => base = phdrs.as_ptr().cast::<u8>().offset(-(phdr.p_vaddr as isize)),
+ PT_PHDR => base = phdrs.as_ptr().cast::<u8>().sub(phdr.p_vaddr),
PT_TLS => tls_phdr = phdr,
PT_GNU_STACK => stack_size = phdr.p_memsz,
_ => {}