On Mon, Mar 18, 2013 at 10:18 AM, Richard Biener <richard.guent...@gmail.com> wrote: > "H.J. Lu" <hjl.to...@gmail.com> wrote:
>>We can pass environment variables to IFUNC selector. Maybe we can >>enable it for debug build. Enabling this for just debug builds would not cover my use case. If the environment variable is used at loader initialization time to override CPUID output, then the runtime cost of that code would be minuscule, and it can be available in production glibc builds. > I was asking for the ifunc selector to be > Overridable by ld_preload or a similar mechanism at dynamic load time. Yes, that's how I understood you. I don't believe it would be easy to implement such interposer (if possible at all), and it would be very much tied to glibc internals. Overriding CPUID at loader initialization time sounds simpler (but I haven't looked at the code yet :-). -- Paul Pluzhnikov