aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-31 21:05:59 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-31 21:05:59 +0000
commit55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec (patch)
treeb6fd328b07e6f8a7a048b20748326283d9af45ec /elf/dl-reloc.c
parent69071b2ab6e27435b9a2d610b1b5b8c48ea92940 (diff)
downloadglibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.zip
glibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.tar.gz
glibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.tar.bz2
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.
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 643885e..137cb0f 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"));