diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-05-09 08:34:43 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-05-09 08:34:43 +0000 |
commit | 4a6cfe318094cc8b20e6e3003f417f8ab3563bb1 (patch) | |
tree | bcf21ad706140908f57c92ec07157f32e1c959c7 /ldso/ldso/dl-hash.c | |
parent | 3942feca80e3b0f55f0f27004e05316d03d1dbe4 (diff) |
Another mips patch from Steven J. Hill:
Uh, this patch fixes a few bugs that I overlooked. Shoot, even BusyBox
wouldn't work until these are applied. Erik, plop this into CVS please.
Thanks.
Diffstat (limited to 'ldso/ldso/dl-hash.c')
-rw-r--r-- | ldso/ldso/dl-hash.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index c6c77e748..b063d0b79 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -125,6 +125,21 @@ struct elf_resolve *_dl_add_elf_hash_table(char *libname, tpnt->loadaddr = loadaddr; for (i = 0; i < 24; i++) tpnt->dynamic_info[i] = dynamic_info[i]; +#ifdef __mips__ + { + Elf32_Dyn *dpnt = (Elf32_Dyn *) dynamic_addr; + + while(dpnt->d_tag) { + if (dpnt->d_tag == DT_MIPS_GOTSYM) + tpnt->mips_gotsym = dpnt->d_un.d_val; + if (dpnt->d_tag == DT_MIPS_LOCAL_GOTNO) + tpnt->mips_local_gotno = dpnt->d_un.d_val; + if (dpnt->d_tag == DT_MIPS_SYMTABNO) + tpnt->mips_symtabno = dpnt->d_un.d_val; + dpnt++; + } + } +#endif return tpnt; } @@ -235,7 +250,8 @@ char *_dl_find_hash(char *name, struct dyn_elf *rpnt1, (ELF32_ST_TYPE(symtab[si].st_info) == STT_FUNC || ELF32_ST_TYPE(symtab[si].st_info) == STT_NOTYPE || ELF32_ST_TYPE(symtab[si].st_info) == STT_OBJECT) && - symtab[si].st_value != 0) { + symtab[si].st_value != 0 && + symtab[si].st_shndx != 0) { /* Here we make sure that we find a module where the symbol is * actually defined. |