How are CPU-optimized libraries supposed to work?

Roland McGrath roland@redhat.com
Fri Oct 3 23:43:00 GMT 2003


> Oh hm, I didn't realize that HP_TIMING_AVAIL was used for code in
> addition to linker statistics etc.

It looks like it's only clock_gettime(CLOCK_*_CPUTIME_ID) that uses it.
I've only glanced at the code and don't fully grok how it uses the value,
but I do suspect that it matters that it get set early in startup.  But
perhaps setting it in libc's initializer if ld.so failed to set it would be
good enough.

The other approach is to make a i686-supporting i386-compatible ld.so by
hacking it to detect the CPU flavor at runtime early on and do the
initialization when possible.



More information about the Libc-alpha mailing list