[PATCH 1/2] elf loader support for auxvec base platform string

Roland McGrath roland at redhat.com
Mon Jul 7 16:18:11 EST 2008


> Well, we use strings to represent the platforms already (ie, the actual
> CPU microarchitecture). Fitting those into bits would be annoying, it

Then use dsocaps.

> makes sense to have AT_BASE_PLATFORM to be the "base" variant of
> AT_PLATFORM.

I understand why you think so.  But let's not be too abstract.  The
purpose of the addition is to drive ld.so's selection of libraries, yes?

AT_PLATFORM is a lousy model.  Handling it is clunky in glibc, because
we have to compare against all the known strings to turn it back into a
bit for the ld.so.cache bitmasks.  We're not going to do the same for
AT_BASE_PLATFORM too, because it just sucks.

Using dsocaps gives you the best of both worlds.  You can freely choose
new strings in the kernel without the ld.so code having to know about
them (which is not true of AT_PLATFORM, but may be true of how you are
thinking about "strings are nice").  You do have to map all the
possibilities that a single kernel build can produce into distinct bits.
But, there are 32 unallocated bits to start with.  Moreover, those bit
assignments are not part of any permanent ABI like bits in AT_* values.
They just have to match up between this kernel build and the ld.conf.d
file installed along with it--kernel hackers and kernel packagers have
to coordinate, not kernel hackers and userland hackers.


Thanks,
Roland



More information about the Linuxppc-dev mailing list