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)
Tue, Aug 11, 6:58 PM
Unknown Object (File)
Sun, Aug 9, 4:09 PM
Unknown Object (File)
Sat, Aug 8, 5:23 PM
Unknown Object (File)
Fri, Aug 7, 9:12 PM
Unknown Object (File)
Fri, Aug 7, 8:03 PM
Unknown Object (File)
Fri, Aug 7, 6:06 PM
Unknown Object (File)
Thu, Aug 6, 12:55 PM
Unknown Object (File)
Thu, Aug 6, 12:51 PM
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