[patch] Finish __builtin_expect -> __glibc_{un}likely cleanup in elf/dl-load.c
Paul Pluzhnikov
ppluzhnikov@google.com
Thu Mar 27 16:43:00 GMT 2014
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
More information about the Libc-alpha
mailing list