+2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/dl-machine.h (elf_machine_rel): Replace
+ __builtin_expect with __glibc_likely and __glibc_unlikely.
+ (elf_machine_rela): Likewise.
+ (elf_machine_lazy_rel): Likewise.
+
2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Replace
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
if (sym != NULL
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
- 0)
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
- && __builtin_expect (!skip_ifunc, 1))
+ && __glibc_unlikely (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC)
+ && __glibc_likely (sym->st_shndx != SHN_UNDEF)
+ && __glibc_likely (!skip_ifunc))
{
# ifndef RTLD_BOOTSTRAP
if (sym_map != map
/* This can happen in trace mode if an object could not be
found. */
break;
- if (__builtin_expect (sym->st_size > refsym->st_size, 0)
- || (__builtin_expect (sym->st_size < refsym->st_size, 0)
+ if (__glibc_unlikely (sym->st_size > refsym->st_size)
+ || (__glibc_unlikely(sym->st_size < refsym->st_size)
&& GLRO(dl_verbose)))
{
const char *strtab;
Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
if (sym != NULL
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
- && __builtin_expect (!skip_ifunc, 1))
+ && __glibc_likely (sym->st_shndx != SHN_UNDEF)
+ && __glibc_unlikely (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC)
+ && __glibc_likely (!skip_ifunc))
value = ((Elf32_Addr (*) (void)) value) ();
switch (ELF32_R_TYPE (reloc->r_info))
/* This can happen in trace mode if an object could not be
found. */
break;
- if (__builtin_expect (sym->st_size > refsym->st_size, 0)
- || (__builtin_expect (sym->st_size < refsym->st_size, 0)
+ if (__glibc_unlikely (sym->st_size > refsym->st_size)
+ || (__glibc_unlikely (sym->st_size < refsym->st_size)
&& GLRO(dl_verbose)))
{
const char *strtab;
/* Check for unexpected PLT reloc type. */
if (__glibc_likely (r_type == R_386_JMP_SLOT))
{
- if (__builtin_expect (map->l_mach.plt, 0) == 0)
+ /* Prelink has been deprecated. */
+ if (__glibc_likely (map->l_mach.plt == 0))
*reloc_addr += l_addr;
else
*reloc_addr = (map->l_mach.plt