Friday June 17, 2005 There a few frameworks in Solaris that have configuration files that store the paths to shared libaries that need to be dlopen()'d at runtime. Prior to Solaris 7 this was easy you just stored the path the the file. When Solaris 7 introduced 64bit SPARC userland libraries some of these frameworks already existed and thus needed a solution that allowed a single config file to be used for both 32 and 64 bit libraries. The PAM framework (libpam) has an admin editable config file that now needed to work for both 32 and 64 bit libraries, yet it supported having full paths in the config file (in fact the file shipped with Solaris at that time had full paths in it even though there was a default of /usr/lib/security).
The solution that was used in libpam and has since been copied by various other parts of the system, including crypt(3c) was to use the "magic" token $ISA to mean, expand to empty on 32 bit SPARC and sparcv9 on 64 bit SPARC. When we did the port to AMD64 all of these needed to be updated to reflect that amd64 was the subdir that was needed instead of sparcv9 when running on the x64 platform. Instead of hardcoding amd64 it was changed to "64" and symlinks added for SPARC that has 64 -> sparcv9 and AMD64 64 -> amd64.
Technorati Tag: OpenSolaris
Technorati Tag: Solaris
This is a personal weblog, I do not speak for my employer.