diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-03-09 07:07:20 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-03-09 07:07:20 +0000 |
commit | da9b57abbc97bc4515c9462951efa0423f4505a2 (patch) | |
tree | 5a3f0d94d63630fdac792c0fdd698b5464b3f32c | |
parent | b502511cd15986e774bfb577c3356cb2e7dcab4e (diff) |
Khem Raj <kraj@mvista.com> writes:
While compiling trunk on ARM with GCC 4.2 and enabling LDSO_GNU_HASH_SUPPORT I stumbled upon this problem.
GCC made a call to libgcc function __aeabi_uidivmod()->__div0()->__raise() and raise is not yet compiled in at the time of compiling ldso
so I got well known undefined symbol __raise problem
This patch uses the do_rem () macro to do the same operation.
-rw-r--r-- | ldso/ldso/dl-hash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index 5ccef1f64..fb5cbc413 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -204,11 +204,12 @@ _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[hash % tpnt->nbucket]; + Elf32_Word bucket = tpnt->l_gnu_buckets[rem]; if (bucket != 0) { const Elf32_Word *hasharr = &tpnt->l_gnu_chain_zero[bucket]; |