Page MenuHomeFreeBSD

rtld: Use uintptr_t instead of Elf_Addr for init/fini function pointers
ClosedPublic

Authored by jhb on Jan 14 2026, 3:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 9:16 AM
Unknown Object (File)
Sun, May 17, 9:16 AM
Unknown Object (File)
Sun, May 17, 2:16 AM
Unknown Object (File)
Sun, May 17, 1:24 AM
Unknown Object (File)
Wed, May 13, 8:35 PM
Unknown Object (File)
Wed, May 13, 8:35 PM
Unknown Object (File)
Tue, Apr 28, 11:18 AM
Unknown Object (File)
Sun, Apr 26, 9:27 AM
Subscribers

Details

Summary

This is a no-op on non-CHERI architectures, but is required for CHERI
where Elf_Addr is only an address and not a complete pointer.

While here, consistently use uintptr_t * for arrays of init/fini
function pointers.

Effort: CHERI upstreaming
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Jan 14 2026, 3:30 PM

This is a nice cleanup and eliminates a void * -> void ** type smearing we had with ElfAddr and should be a nop if I read right.

This revision is now accepted and ready to land.Jan 14 2026, 3:36 PM