This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Finish __builtin_expect -> __glibc_{un}likely cleanup in elf/dl-load.c
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 27 Mar 2014 09:42:54 -0700
- Subject: Re: [patch] Finish __builtin_expect -> __glibc_{un}likely cleanup in elf/dl-load.c
- Authentication-results: sourceware.org; auth=none
- References: <ye6qeh1o7ab8 dot fsf at elbrus2 dot mtv dot corp dot google dot com> <20140327114201 dot GA32440 at domone dot podge>
On Thu, Mar 27, 2014 at 4:42 AM, OndÅej BÃlka <neleai@seznam.cz> wrote:
> On Wed, Mar 26, 2014 at 05:30:03PM -0700, Paul Pluzhnikov wrote:
>> @@ -2104,8 +2103,7 @@ _dl_map_object (struct link_map *loader, const char *name,
>> /* If the requested name matches the soname of a loaded object,
>> use that object. Elide this check for names that have not
>> yet been opened. */
>> - if (__glibc_unlikely (l->l_faked != 0)
>> - || __builtin_expect (l->l_removed, 0) != 0)
>> + if (__glibc_unlikely (l->l_faked != 0 || l->l_removed != 0))
>> continue;
>> if (!_dl_name_match_p (name, l))
>> {
...
> if (__glibc_unlikely (l->l_faked | l->l_removed != 0))
> continue;
Done.
>> @@ -2230,7 +2228,7 @@ _dl_map_object (struct link_map *loader, const char *name,
>>
>> #ifdef USE_LDCONFIG
>> if (fd == -1
>> - && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
>> + && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
>> || ! INTUSE(__libc_enable_secure))
>> && __glibc_likely (GLRO(dl_inhibit_cache) == 0))
>> {
>
> Extra parens here.
Are there? I don't see them :-(
Thanks,
--
Paul Pluzhnikov