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, Sep 27, 1:40 AM
Unknown Object (File)
Mon, Sep 7, 9:21 AM
Unknown Object (File)
Sat, Sep 5, 8:18 AM
Unknown Object (File)
Aug 30 2026, 11:38 AM
Unknown Object (File)
Aug 29 2026, 7:09 PM
Unknown Object (File)
Aug 11 2026, 6:58 PM
Unknown Object (File)
Aug 9 2026, 4:09 PM
Unknown Object (File)
Aug 8 2026, 5:23 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