From 55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Aug 2000 21:05:59 +0000 Subject: Update. * intl/Makefile (tests): Depend in mtrace-tst-gettext. Make this a new rule depending on tst-gettext.out and run mtrace. * intl/tst-gettext.c: Call mtrace. * intl/tst-gettext.sh: Put MALLOC_TRACE in environment of tst-gettext. * elf/dl-reloc.c: Add a few more __builtin_expect. * configure.in: Remove --with-gettext option. * intl/dcigettext.c (free_mem): Correct freeing of _nl_domain_bindings list. --- elf/dl-reloc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'elf/dl-reloc.c') diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c index 643885e95b..137cb0f91b 100644 --- a/elf/dl-reloc.c +++ b/elf/dl-reloc.c @@ -36,7 +36,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[], /* If DT_BIND_NOW is set relocate all references in this object. We do not do this if we are profiling, of course. */ - if (!consider_profiling && l->l_info[DT_BIND_NOW]) + if (!consider_profiling + && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0)) lazy = 0; if (__builtin_expect (_dl_debug_reloc, 0)) @@ -57,8 +58,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[], caddr_t mapend = ((caddr_t) l->l_addr + ((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1) & ~(_dl_pagesize - 1))); - if (__mprotect (mapstart, mapend - mapstart, - PROT_READ|PROT_WRITE) < 0) + if (__builtin_expect (__mprotect (mapstart, mapend - mapstart, + PROT_READ|PROT_WRITE), 0) < 0) _dl_signal_error (errno, l->l_name, N_("\ cannot make segment writable for relocation")); } @@ -145,7 +146,8 @@ cannot make segment writable for relocation")); prot |= PROT_EXEC; } - if (__mprotect (mapstart, mapend - mapstart, prot) < 0) + if (__builtin_expect (__mprotect (mapstart, mapend - mapstart, + prot), 0) < 0) _dl_signal_error (errno, l->l_name, N_("can't restore segment prot after reloc")); -- cgit 1.4.1