From d3fed856d7ad00472845dcf4ed38988fcd0fbd64 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 9 Sep 2003 09:23:12 +0000 Subject: Fix cris shared lib loader so it compiles... --- ldso/ldso/cris/elfinterp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ldso/ldso/cris/elfinterp.c b/ldso/ldso/cris/elfinterp.c index 0e395a6e0..3c376a6a8 100644 --- a/ldso/ldso/cris/elfinterp.c +++ b/ldso/ldso/cris/elfinterp.c @@ -169,6 +169,7 @@ _dl_parse_lazy_relocation_information(struct elf_resolve *tpnt, unsigned long re int reloc_type; int symtab_index; char *strtab; + char *symname; Elf32_Sym *symtab; ELF_RELOC *rpnt; Elf32_Addr *reloc_addr; @@ -178,12 +179,12 @@ _dl_parse_lazy_relocation_information(struct elf_resolve *tpnt, unsigned long re rel_size = rel_size / sizeof(ELF_RELOC); symtab = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr); strtab = (char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr); - symname = strtab + symtab[symtab_index].st_name; for (i = 0; i < rel_size; i++, rpnt++) { reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + (Elf32_Addr) rpnt->r_offset); reloc_type = ELF32_R_TYPE(rpnt->r_info); symtab_index = ELF32_R_SYM(rpnt->r_info); + symname = strtab + symtab[symtab_index].st_name; /* * Make sure we don't resolv the same symbols as we did @@ -245,13 +246,13 @@ _dl_parse_relocation_information(struct elf_resolve *tpnt, unsigned long rel_add symtab = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr); strtab = (char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr); - symname = strtab + symtab[symtab_index].st_name; for (i = 0; i < rel_size; i++, rpnt++) { reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + (Elf32_Addr) rpnt->r_offset); reloc_type = ELF32_R_TYPE(rpnt->r_info); symtab_index = ELF32_R_SYM(rpnt->r_info); symbol_addr = 0; + symname = strtab + symtab[symtab_index].st_name; if (!symtab_index && tpnt->libtype == program_interpreter) continue; @@ -363,6 +364,7 @@ _dl_parse_copy_information(struct dyn_elf *xpnt, unsigned long rel_addr, unsigne symtab = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr); strtab = (char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr); + symtab_index = ELF32_R_SYM(rpnt->r_info); symname = strtab + symtab[symtab_index].st_name; for (i = 0; i < rel_size; i++, rpnt++) { -- cgit v1.2.3