This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc clears AT_HWCAP and set only HW_CAP_X86_64 (0x2)


On Fri, Oct 18, 2019 at 2:24 PM Carlos O'Donell <carlos@redhat.com> wrote:
>
> On 10/17/19 5:06 PM, H.J. Lu wrote:
> > dl_hwcap is used to load DSO optimized for a platform.  On i386, we use
> > AT_HWCAP passed from kernel.  On x86-64, we use a different approach
> > since AT_HWCAP passed from kernel isn't very useful:
>
> The use of dl_hwcap to load DSOs is orthogonal to what getauxval() returns.
> They need not be the same.
>
> The question I have is: Why isn't AT_HWCAP returned by getauxval() for x86_64?
>
> We could store AT_HWCAP into dl_hwcap_real, and return that in getauxval()

This should work.

> while still using the *processed* AT_HWCAP in dl_hwcap.
>
> It seems confusing to return an altered AT_AUXVAL from getauxval()?
>
> What do you think?
>

I have no strong opinion on this.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]