summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2012-01-19 15:28:15 +0100
committerKhem Raj <raj.khem@gmail.com>2012-01-23 16:21:30 -0800
commit3837739512e6029786d4e70be658fde8172c3829 (patch)
tree42ccd1ffd6eb745358784208db7e7acf50e7a699 /ldso
parent99d28cc0860e240357c02483f0c4016a6b30aad0 (diff)
ldso/mips: fix symbol lookup for JUMP_SLOT and COPY relocations
Fill properly the sym_ref fields when invoking _dl_find_hash to lookup symbols Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/mips/elfinterp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldso/ldso/mips/elfinterp.c b/ldso/ldso/mips/elfinterp.c
index b748839ce..5d0eff53b 100644
--- a/ldso/ldso/mips/elfinterp.c
+++ b/ldso/ldso/mips/elfinterp.c
@@ -161,7 +161,7 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt,
unsigned long old_val=0;
#endif
- struct symbol_ref sym_ref = { NULL, NULL };
+ struct symbol_ref sym_ref;
/* Now parse the relocation information */
rel_size = rel_size / sizeof(ElfW(Rel));
rpnt = (ELF_RELOC *) rel_addr;
@@ -187,6 +187,8 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt,
#endif
if (reloc_type == R_MIPS_JUMP_SLOT || reloc_type == R_MIPS_COPY) {
+ sym_ref.tpnt = NULL;
+ sym_ref.sym = &symtab[symtab_index];
symbol_addr = (unsigned long)_dl_find_hash(symname,
scope,
tpnt,