We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pointer::sub
pointer::offset
1 parent 8a2ffa5 commit b0c75d0Copy full SHA for b0c75d0
src/backend/linux_raw/runtime/tls.rs
@@ -29,7 +29,7 @@ pub(crate) fn startup_tls_info() -> StartupTlsInfo {
29
unsafe {
30
for phdr in phdrs {
31
match phdr.p_type {
32
- 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),
33
PT_TLS => tls_phdr = phdr,
34
PT_GNU_STACK => stack_size = phdr.p_memsz,
35
_ => {}
0 commit comments