This is the mail archive of the
mailing list for the glibc project.
Re: How are CPU-optimized libraries supposed to work?
- From: Roland McGrath <roland at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 3 Oct 2003 16:43:20 -0700
- Subject: Re: How are CPU-optimized libraries supposed to work?
> 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
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.