@@ -30,7 +30,7 @@ use crate::arch::{
3030 dynamic_table_addr, relocation_load, relocation_mprotect_readonly, relocation_store,
3131} ;
3232use core:: ffi:: c_void;
33- use core:: ptr:: { from_exposed_addr , null, null_mut} ;
33+ use core:: ptr:: { with_exposed_provenance , null, null_mut} ;
3434use linux_raw_sys:: elf:: * ;
3535use linux_raw_sys:: general:: { AT_BASE , AT_ENTRY , AT_NULL , AT_PAGESZ } ;
3636
@@ -148,14 +148,14 @@ pub(super) unsafe fn relocate(envp: *mut *mut u8) {
148148
149149 match * d_tag {
150150 // We found a rela table. As above, model this as
151- // `from_exposed_addr `.
152- DT_RELA => rela_ptr = from_exposed_addr ( d_un. d_ptr . wrapping_add ( offset) ) ,
151+ // `with_exposed_provenance `.
152+ DT_RELA => rela_ptr = with_exposed_provenance ( d_un. d_ptr . wrapping_add ( offset) ) ,
153153 DT_RELASZ => rela_total_size = d_un. d_val as usize ,
154154 DT_RELAENT => rela_entry_size = d_un. d_val as usize ,
155155
156156 // We found a rel table. As above, model this as
157- // `from_exposed_addr `.
158- DT_REL => rel_ptr = from_exposed_addr ( d_un. d_ptr . wrapping_add ( offset) ) ,
157+ // `with_exposed_provenance `.
158+ DT_REL => rel_ptr = with_exposed_provenance ( d_un. d_ptr . wrapping_add ( offset) ) ,
159159 DT_RELSZ => rel_total_size = d_un. d_val as usize ,
160160 DT_RELENT => rel_entry_size = d_un. d_val as usize ,
161161
@@ -245,7 +245,7 @@ pub(super) unsafe fn relocate(envp: *mut *mut u8) {
245245 let mut relro_size = 0 ;
246246
247247 let phentsize = EHDR . e_phentsize as usize ;
248- let mut current_phdr = from_exposed_addr :: < Elf_Phdr > ( offset + EHDR . e_phoff ) ;
248+ let mut current_phdr = with_exposed_provenance :: < Elf_Phdr > ( offset + EHDR . e_phoff ) ;
249249 let phdrs_end = current_phdr
250250 . cast :: < u8 > ( )
251251 . add ( EHDR . e_phnum as usize * phentsize)
0 commit comments