From dc051821742cd7195bed74d6ae789ee1b82a62aa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 15:59:51 +0000 Subject: [PATCH] Update. * elf/dl-reloc.c (_dl_relocate_object): Add more __builtin_expect. * elf/dl-lookup.c: Likewise. * elf/dl-init.c (_dl_init): Likewise. * elf/dl-fini.c (_dl_fini): Likewise. * elf/dl-deps.c (_dl_map_object_deps): Likewise. * elf/dl-close.c (_dl_close): Likewise. * elf/rtld.c (_dl_start_final): Likewise. --- ChangeLog | 14 +++++++------- elf/dl-reloc.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0d2e3e..c6863cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,12 @@ 2000-04-17 Ulrich Drepper - * elf/dl-reloc.c (_dl_relocat_object): Add more __builtin_expect. - * elf/dl-lookup.c: Add more __builtin_expect. - * elf/dl-init.c (_dl_init): Add more __builtin_expect. - * elf/dl-fini.c (_dl_fini): Add more __builtin_expect. - * elf/dl-deps.c (_dl_map_object_deps): Add more __builtin_expect. - * elf/dl-close.c (_dl_close): Add more __builtin_expect. - * elf/rtld.c (_dl_start_final): Add more __builtin_expect. + * elf/dl-reloc.c (_dl_relocate_object): Add more __builtin_expect. + * elf/dl-lookup.c: Likewise. + * elf/dl-init.c (_dl_init): Likewise. + * elf/dl-fini.c (_dl_fini): Likewise. + * elf/dl-deps.c (_dl_map_object_deps): Likewise. + * elf/dl-close.c (_dl_close): Likewise. + * elf/rtld.c (_dl_start_final): Likewise. * elf/dl-lookup.c (add_dependency): Correct __builtin_expect use. diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c index 61bb6bc..ba9119b 100644 --- a/elf/dl-reloc.c +++ b/elf/dl-reloc.c @@ -43,7 +43,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[], l->l_name[0] ? l->l_name : _dl_argv[0], lazy ? " (lazy)\n" : "\n", NULL); - if (l->l_info[DT_TEXTREL]) + if (__builtin_expect (l->l_info[DT_TEXTREL] != NULL, 0)) { /* Bletch. We must make read-only segments writable long enough to relocate them. */ @@ -101,7 +101,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[], /* DT_TEXTREL is now in level 2 and might phase out at some time. But we rewrite the DT_FLAGS entry to make testing easier and therefore it will be available at all time. */ - if (l->l_info[DT_TEXTREL]) + if (__builtin_expect (l->l_info[DT_TEXTREL] != NULL, 0)) { /* Undo the protection change we made before relocating. */ const ElfW(Phdr) *ph; -- 2.7.4