DL_HWCAP_MASK and static binaries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

DL_HWCAP_MASK and static binaries

Siddhesh Poyarekar-8
Hi,

I was working on getting the DL_HWCAP_MASK variable into tunables and I
noticed that it is not available for static binaries.  We had thought of
using DL_HWCAP_MASK to mask out HWCAP_CPUID in aarch64 for testing and
turns out it will be ineffective on static binaries since DL_HWCAP_MASK
is ignored.

Does anybody know why DL_HWCAP_MASK is ignored for static binaries?

Siddhesh
Reply | Threaded
Open this post in threaded view
|

Re: DL_HWCAP_MASK and static binaries

Carlos O'Donell-6
On 03/01/2017 04:04 AM, Siddhesh Poyarekar wrote:
> Hi,
>
> I was working on getting the DL_HWCAP_MASK variable into tunables and I
> noticed that it is not available for static binaries.  We had thought of
> using DL_HWCAP_MASK to mask out HWCAP_CPUID in aarch64 for testing and
> turns out it will be ineffective on static binaries since DL_HWCAP_MASK
> is ignored.
>
> Does anybody know why DL_HWCAP_MASK is ignored for static binaries?

I think you mean LD_HWCAP_MASK.

Static binaries should be as close to dynamic binaries as possible.

Please just fix the issue. I'm happy to review.

--
Cheers,
Carlos.
Reply | Threaded
Open this post in threaded view
|

Re: DL_HWCAP_MASK and static binaries

Siddhesh Poyarekar-8
On Thursday 02 March 2017 12:33 AM, Carlos O'Donell wrote:
> I think you mean LD_HWCAP_MASK.

Yes, I think the dyslexia bit in my brain has been set the last few days :/

> Static binaries should be as close to dynamic binaries as possible.
>
> Please just fix the issue. I'm happy to review.

Thanks, I'm thinking of moving this to tunables as glibc.tune.hwcap_mask
(not glibc.ld.hwcap_mask since it is not necessarily an ld.so thing -
hwcap mask can control far more than dynamic linker behaviour) so that
will bring both static and dynamic binaries on par.  Do you want me to
fix the issue first and then do the tunable or is it fine to just add
the tunable?

Siddhesh
Reply | Threaded
Open this post in threaded view
|

Re: DL_HWCAP_MASK and static binaries

Carlos O'Donell-6
On 03/02/2017 01:44 AM, Siddhesh Poyarekar wrote:

> On Thursday 02 March 2017 12:33 AM, Carlos O'Donell wrote:
>> I think you mean LD_HWCAP_MASK.
>
> Yes, I think the dyslexia bit in my brain has been set the last few days :/
>
>> Static binaries should be as close to dynamic binaries as possible.
>>
>> Please just fix the issue. I'm happy to review.
>
> Thanks, I'm thinking of moving this to tunables as glibc.tune.hwcap_mask
> (not glibc.ld.hwcap_mask since it is not necessarily an ld.so thing -
> hwcap mask can control far more than dynamic linker behaviour) so that
> will bring both static and dynamic binaries on par.  Do you want me to
> fix the issue first and then do the tunable or is it fine to just add
> the tunable?

Your call. If you think people will want to backport this to several old
releases then split it into two so it can be backported. Otherwise just
one patch that fixes both issues is logically OK with me.

--
Cheers,
Carlos.