Page MenuHomeFreeBSD

rtld-elf: Migrate from COMPAT_32BIT to generic COMPAT_libcompat/LIBCOMPAT
ClosedPublic

Authored by jrtc27 on Jul 8 2023, 12:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 1:03 PM
Unknown Object (File)
Wed, Nov 6, 1:03 PM
Unknown Object (File)
Wed, Nov 6, 1:03 PM
Unknown Object (File)
Tue, Nov 5, 12:11 AM
Unknown Object (File)
Thu, Oct 31, 2:46 PM
Unknown Object (File)
Wed, Oct 30, 12:37 AM
Unknown Object (File)
Wed, Oct 30, 12:37 AM
Unknown Object (File)
Wed, Oct 30, 12:37 AM
Subscribers

Details

Summary

We still have a tiny amount of libcompat-specific code in rtld_paths.h,
but it's been deduplicated as much as possible, and in future we may
wish to just push these variables down to the few consumers of them and
make them use the double-underscore variants with a libcompat argument
rather than give them names here.

Diff Detail

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

Event Timeline

I'm slightly unhappy about the loss of grep-ability, but this does seem to be the best solution given our explosion of LIBCOMPAT's downstream.

libexec/rtld-elf/rtld_paths.h
79

Does a /lib32 etc actually make sense?

This revision is now accepted and ready to land.Jul 8 2023, 12:49 AM
libexec/rtld-elf/rtld_paths.h
79

It does if there are 32-bit tools on a 64-bit system needed to mount /usr, I guess. It shouldn't do any harm to have, and it's more code to make it not be there. I can remove it if wanted, but not as part of this NFC commit (and series, mostly).

kib added inline comments.
libexec/rtld-elf/rtld.c
807

May be kernel should pass the real interp path as aux string?

jhb added inline comments.
libexec/rtld-elf/rtld.c
807

I would like that, but as a followup change.