mirror of git://sourceware.org/git/glibc.git
x86-64: Use __glibc_likely/__glibc_likely in dl-machine.h
The differences in elf/dl-reloc.os are --- before 2018-02-05 03:52:32.803125207 -0800 +++ after 2018-02-05 03:52:14.913711879 -0800 @@ -1129,7 +1129,7 @@ _dl_relocate_object: leaq __PRETTY_FUNCTION__.9767(%rip), %rcx leaq .LC11(%rip), %rsi leaq .LC12(%rip), %rdi - movl $540, %edx + movl $539, %edx call __GI___assert_fail .p2align 4,,10 .p2align 3 * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Replace __builtin_expect with __glibc_likely and __glibc_likely. (elf_machine_lazy_rel): Likewise.
This commit is contained in:
parent
371b220f62
commit
06fbebfff7
|
|
@ -1,3 +1,9 @@
|
||||||
|
2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Replace
|
||||||
|
__builtin_expect with __glibc_likely and __glibc_likely.
|
||||||
|
(elf_machine_lazy_rel): Likewise.
|
||||||
|
|
||||||
2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
|
2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
[BZ #22638]
|
[BZ #22638]
|
||||||
|
|
|
||||||
|
|
@ -310,10 +310,9 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
|
||||||
: (ElfW(Addr)) sym_map->l_addr + sym->st_value);
|
: (ElfW(Addr)) sym_map->l_addr + sym->st_value);
|
||||||
|
|
||||||
if (sym != NULL
|
if (sym != NULL
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
&& __glibc_unlikely (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC)
|
||||||
0)
|
&& __glibc_likely (sym->st_shndx != SHN_UNDEF)
|
||||||
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
&& __glibc_likely (!skip_ifunc))
|
||||||
&& __builtin_expect (!skip_ifunc, 1))
|
|
||||||
{
|
{
|
||||||
# ifndef RTLD_BOOTSTRAP
|
# ifndef RTLD_BOOTSTRAP
|
||||||
if (sym_map != map
|
if (sym_map != map
|
||||||
|
|
@ -500,8 +499,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
|
||||||
break;
|
break;
|
||||||
memcpy (reloc_addr_arg, (void *) value,
|
memcpy (reloc_addr_arg, (void *) value,
|
||||||
MIN (sym->st_size, refsym->st_size));
|
MIN (sym->st_size, refsym->st_size));
|
||||||
if (__builtin_expect (sym->st_size > refsym->st_size, 0)
|
if (__glibc_unlikely (sym->st_size > refsym->st_size)
|
||||||
|| (__builtin_expect (sym->st_size < refsym->st_size, 0)
|
|| (__glibc_unlikely (sym->st_size < refsym->st_size)
|
||||||
&& GLRO(dl_verbose)))
|
&& GLRO(dl_verbose)))
|
||||||
{
|
{
|
||||||
fmt = "\
|
fmt = "\
|
||||||
|
|
@ -554,7 +553,8 @@ elf_machine_lazy_rel (struct link_map *map,
|
||||||
/* Check for unexpected PLT reloc type. */
|
/* Check for unexpected PLT reloc type. */
|
||||||
if (__glibc_likely (r_type == R_X86_64_JUMP_SLOT))
|
if (__glibc_likely (r_type == R_X86_64_JUMP_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;
|
*reloc_addr += l_addr;
|
||||||
else
|
else
|
||||||
*reloc_addr =
|
*reloc_addr =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue