summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-03-11 10:25:42 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-03-11 10:25:42 +0000
commit459994b032fb678de631b18f8a8626239920c20e (patch)
tree403e8e6888bbd3f23bc751971e31f8139cdce456
parentda9b57abbc97bc4515c9462951efa0423f4505a2 (diff)
Move calculation of rem within if (unlikely statement
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> SIgned-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r--ldso/ldso/dl-hash.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c
index fb5cbc413..6eef1c742 100644
--- a/ldso/ldso/dl-hash.c
+++ b/ldso/ldso/dl-hash.c
@@ -204,12 +204,14 @@ _dl_lookup_gnu_hash(struct elf_resolve *tpnt, ElfW(Sym) *symtab, unsigned long h
unsigned int hashbit1 = hash & (__ELF_NATIVE_CLASS - 1);
unsigned int hashbit2 = ((hash >> tpnt->l_gnu_shift) & (__ELF_NATIVE_CLASS - 1));
- unsigned long rem;
- do_rem (rem, hash, tpnt->nbucket);
_dl_assert (bitmask != NULL);
if (unlikely((bitmask_word >> hashbit1) & (bitmask_word >> hashbit2) & 1)) {
- Elf32_Word bucket = tpnt->l_gnu_buckets[rem];
+ unsigned long rem;
+ Elf32_Word bucket;
+
+ do_rem (rem, hash, tpnt->nbucket);
+ bucket = tpnt->l_gnu_buckets[rem];
if (bucket != 0) {
const Elf32_Word *hasharr = &tpnt->l_gnu_chain_zero[bucket];