aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-fini.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /elf/dl-fini.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'elf/dl-fini.c')
-rw-r--r--elf/dl-fini.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index 05bbd68..c355775 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -60,7 +60,7 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
if (runp != NULL)
/* Look through the dependencies of the object. */
while (*runp != NULL)
- if (__builtin_expect (*runp++ == thisp, 0))
+ if (__glibc_unlikely (*runp++ == thisp))
{
move:
/* Move the current object to the back past the last
@@ -90,21 +90,21 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
goto next;
}
- if (__builtin_expect (maps[k]->l_reldeps != NULL, 0))
+ if (__glibc_unlikely (maps[k]->l_reldeps != NULL))
{
unsigned int m = maps[k]->l_reldeps->act;
struct link_map **relmaps = &maps[k]->l_reldeps->list[0];
/* Look through the relocation dependencies of the object. */
while (m-- > 0)
- if (__builtin_expect (relmaps[m] == thisp, 0))
+ if (__glibc_unlikely (relmaps[m] == thisp))
{
/* If a cycle exists with a link time dependency,
preserve the latter. */
struct link_map **runp = thisp->l_initfini;
if (runp != NULL)
while (*runp != NULL)
- if (__builtin_expect (*runp++ == maps[k], 0))
+ if (__glibc_unlikely (*runp++ == maps[k]))
goto ignore;
goto move;
}
@@ -286,7 +286,7 @@ _dl_fini (void)
goto again;
}
- if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS, 0))
+ if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
_dl_debug_printf ("\nruntime linker statistics:\n"
" final number of relocations: %lu\n"
"final number of relocations from cache: %lu\n",