* 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.
This commit is contained in:
Ulrich Drepper 2000-04-17 15:59:51 +00:00
parent 466a0ec998
commit dc05182174
2 changed files with 9 additions and 9 deletions

View file

@ -1,12 +1,12 @@
2000-04-17 Ulrich Drepper <drepper@redhat.com> 2000-04-17 Ulrich Drepper <drepper@redhat.com>
* elf/dl-reloc.c (_dl_relocat_object): Add more __builtin_expect. * elf/dl-reloc.c (_dl_relocate_object): Add more __builtin_expect.
* elf/dl-lookup.c: Add more __builtin_expect. * elf/dl-lookup.c: Likewise.
* elf/dl-init.c (_dl_init): Add more __builtin_expect. * elf/dl-init.c (_dl_init): Likewise.
* elf/dl-fini.c (_dl_fini): Add more __builtin_expect. * elf/dl-fini.c (_dl_fini): Likewise.
* elf/dl-deps.c (_dl_map_object_deps): Add more __builtin_expect. * elf/dl-deps.c (_dl_map_object_deps): Likewise.
* elf/dl-close.c (_dl_close): Add more __builtin_expect. * elf/dl-close.c (_dl_close): Likewise.
* elf/rtld.c (_dl_start_final): Add more __builtin_expect. * elf/rtld.c (_dl_start_final): Likewise.
* elf/dl-lookup.c (add_dependency): Correct __builtin_expect use. * elf/dl-lookup.c (add_dependency): Correct __builtin_expect use.

View file

@ -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], l->l_name[0] ? l->l_name : _dl_argv[0],
lazy ? " (lazy)\n" : "\n", NULL); 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 /* Bletch. We must make read-only segments writable
long enough to relocate them. */ 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. /* 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 But we rewrite the DT_FLAGS entry to make testing easier and
therefore it will be available at all time. */ 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. */ /* Undo the protection change we made before relocating. */
const ElfW(Phdr) *ph; const ElfW(Phdr) *ph;