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: [PATCHv2] Fix float128 IFUNC relocations on ppc64le [BZ #21707]


Nix <nix@esperi.org.uk> writes:

> On 8 Jul 2017, Tulio Magno Quites Machado Filho said this:
>
>> diff --git a/csu/libc-start.c b/csu/libc-start.c
>> index c2dd159..84b7f99 100644
>> --- a/csu/libc-start.c
>> +++ b/csu/libc-start.c
>> @@ -188,12 +188,15 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
>>  
>>    ARCH_INIT_CPU_FEATURES ();
>>  
>> -  /* Perform IREL{,A} relocations.  */
>> -  apply_irel ();
>> -
>>    /* The stack guard goes into the TCB, so initialize it early.  */
>>    __libc_setup_tls ();
>>  
>> +  /* Perform IREL{,A} relocations.
>> +     Note: the relocations must happen after TLS initialization so that
>> +     IFUNC resolvers can benefit from thread-local storage, e.g. powerpc's
>> +     hwcap and platform fields available in the TCB.  */
>> +  apply_irel ();
>> +
>>    /* Set up the stack checker's canary.  */
>>    uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random);
>>  # ifdef THREAD_SET_STACK_GUARD
>
> Note: I originally moved this above __libc_setup_tls() so that IFUNCs
> could be stack-protected on statically-linked applications, but
> subsequently found that this caused trouble with dynamically-linked
> programs, so ended up de-protecting all the IFUNC resolvers anyway.
> (See commit 003a27e8195470f470f4d9384ca70d4e9fc8bd1b.)
>
> If this passes make check with --enable-stack-protector=all, I'm happy
> with it.

Tested and confirmed no new failures with --enable-stack-protector=all.

By the way, I noticed 2 unrelated failures:
https://sourceware.org/bugzilla/show_bug.cgi?id=21744
https://sourceware.org/bugzilla/show_bug.cgi?id=21745

-- 
Tulio Magno


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