This is the mail archive of the libc-alpha@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: [PATCHv3] powerpc: ABI change - add HWCAP/HWCAP2/platform info to TCB


On 10/08/2015 11:30 AM, Steven Munroe wrote:
>> (a) Reference to GLIBC_2.23 in ppc.h functions?
>>
>> It is clear that Peter Bergner is going to use gcc to emit code that
>> references the TCB offsets directly to produce the builtins, and that
>> a data reference to __parse_hwcap_and_convert_at_platform will ensure
>> the application depends on a versioned dependency of GLIBC_2.23 to
>> avoid application compatibility issues.
>>
>> However, it doesn't appear that __ppc_get_hwcap or __ppc_get_at_platform
>> generate any references to __parse_hwcap_and_convert_at_platform? These
>> two functions as added in the manual could be used by applications
>> directly by including the platform header and calling those functions.
>> Such applications would have no such references to __parse* and as such
>> would not be protected by the dynamic loader library version checking.
>> The same referecne to __parse_hwcap_and_convert_at_platform as gcc is
>> using needs to be emitted in the inline assembly from those functions
>> and you should double check that using these functions results in a binary
>> that has a reference to a GLIBC_2.23 versioned symbol, and that running
>> it on an older glibc causes an error.
>>
> 
> We can drop these (__ppc_get_hwcap or __ppc_get_at_platform) if we can
> guarantee that the TCB fields are initialized before we need to run
> library init or CTORs. This guarantee applies to static and dynamic
> linking.

That's up to you to prove by looking at the places where you've added
the initialization sequences. My guess is that you're probably good because
all of these sequences are run before main and before any thread is created
and before any CTORs are run. I'd like you to verify that though.

In which case the next steps are:
- Remove ppc.h functions.
- Verify all init is done before CTORs
- Post smaller v4 patch.

Cheers,
Carlos.


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