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

From: Roland McGrath
Date: Mon Jul 07 2008 - 02:18:56 EST


> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/