Lines Matching refs:obj
95 init_pltgot(Obj_Entry *obj) in init_pltgot() argument
98 if (obj->pltgot != NULL) { in init_pltgot()
99 obj->pltgot[0] = (Elf_Addr) &_rtld_bind_start; in init_pltgot()
100 if (GOT1_RESERVED_FOR_RTLD(obj->pltgot)) in init_pltgot()
101 obj->pltgot[1] = (Elf_Addr) obj | GOT1_MASK; in init_pltgot()
103 if (obj->mips_pltgot != NULL) { in init_pltgot()
104 obj->mips_pltgot[0] = (Elf_Addr) &_rtld_pltbind_start; in init_pltgot()
105 obj->mips_pltgot[1] = (Elf_Addr) obj; in init_pltgot()
312 _mips_rtld_bind(Obj_Entry *obj, Elf_Size reloff) in _mips_rtld_bind() argument
314 Elf_Addr *got = obj->pltgot; in _mips_rtld_bind()
325 where = &got[obj->local_gotno + reloff - obj->gotsym]; in _mips_rtld_bind()
326 def = find_symdef(reloff, obj, &defobj, SYMLOOK_IN_PLT, NULL, in _mips_rtld_bind()
333 obj->path, in _mips_rtld_bind()
343 reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, in reloc_non_plt() argument
348 Elf_Addr *got = obj->pltgot; in reloc_non_plt()
357 if (obj == obj_rtld) in reloc_non_plt()
366 sym = obj->symtab; in reloc_non_plt()
370 dbg("%s: broken=%d", obj->path, broken); in reloc_non_plt()
378 got, obj->local_gotno, obj->relocbase); in reloc_non_plt()
379 for (; i < obj->local_gotno; i++) { in reloc_non_plt()
380 *got += (Elf_Addr)obj->relocbase; in reloc_non_plt()
383 sym = obj->symtab + obj->gotsym; in reloc_non_plt()
386 got, obj->symtabno); in reloc_non_plt()
388 for (i = obj->gotsym; i < obj->symtabno; i++) { in reloc_non_plt()
389 dbg(" doing got %d sym %p (%s, %lx)", i - obj->gotsym, sym, in reloc_non_plt()
390 sym->st_name + obj->strtab, (u_long) *got); in reloc_non_plt()
407 def = find_symdef(i, obj, &defobj, flags, NULL, in reloc_non_plt()
431 *got = sym->st_value + (Elf_Addr)obj->relocbase; in reloc_non_plt()
432 if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { in reloc_non_plt()
434 i, obj->relocbase); in reloc_non_plt()
441 (Elf_Addr)obj->relocbase; in reloc_non_plt()
442 if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { in reloc_non_plt()
444 i, obj->relocbase); in reloc_non_plt()
449 def = find_symdef(i, obj, &defobj, flags, NULL, in reloc_non_plt()
456 if ((Elf_Addr)(*got) == (Elf_Addr)obj->relocbase) { in reloc_non_plt()
458 i, obj->relocbase); in reloc_non_plt()
460 obj->strtab + obj->symtab[i].st_name); in reloc_non_plt()
471 got = obj->pltgot; in reloc_non_plt()
472 rellim = (const Elf_Rel *)((const char *)obj->rel + obj->relsize); in reloc_non_plt()
473 for (rel = obj->rel; rel < rellim; rel++) { in reloc_non_plt()
477 where = obj->relocbase + rel->r_offset; in reloc_non_plt()
494 def = obj->symtab + r_symndx; in reloc_non_plt()
496 if (r_symndx >= obj->gotsym) { in reloc_non_plt()
497 val += got[obj->local_gotno + r_symndx - obj->gotsym]; in reloc_non_plt()
500 obj->strtab + def->st_name, in reloc_non_plt()
501 obj->path); in reloc_non_plt()
527 val += (Elf_Addr)obj->relocbase; in reloc_non_plt()
531 obj->strtab + def->st_name, obj->path); in reloc_non_plt()
544 if (!obj->mainprog) { in reloc_non_plt()
546 "relocation in shared library", obj->path); in reloc_non_plt()
562 def = find_symdef(r_symndx, obj, &defobj, flags, NULL, in reloc_non_plt()
571 obj->strtab + obj->symtab[r_symndx].st_name, in reloc_non_plt()
572 obj->path, (void *)old, (void*)val, defobj->path); in reloc_non_plt()
586 def = find_symdef(r_symndx, obj, &defobj, flags, NULL, in reloc_non_plt()
591 if (!defobj->tls_done && !allocate_tls_offset(obj)) in reloc_non_plt()
598 obj->strtab + obj->symtab[r_symndx].st_name, in reloc_non_plt()
599 obj->path, (void*)old, (void *)val, defobj->path); in reloc_non_plt()
613 def = find_symdef(r_symndx, obj, &defobj, flags, NULL, in reloc_non_plt()
619 if (!defobj->tls_done && !allocate_tls_offset(obj)) in reloc_non_plt()
627 obj->strtab + obj->symtab[r_symndx].st_name, in reloc_non_plt()
628 obj->path, (void*)old, (void *)val, defobj->path); in reloc_non_plt()
640 obj->strtab + obj->symtab[r_symndx].st_name); in reloc_non_plt()
643 obj->path, (u_long) ELF_R_TYPE(rel->r_info)); in reloc_non_plt()
655 reloc_plt(Obj_Entry *obj, int flags __unused, RtldLockState *lockstate __unused) in reloc_plt() argument
660 rellim = (const Elf_Rel *)((const char *)obj->pltrel + obj->pltrelsize); in reloc_plt()
661 for (rel = obj->pltrel; rel < rellim; rel++) { in reloc_plt()
666 where = (Elf_Addr *)(obj->relocbase + rel->r_offset); in reloc_plt()
667 *where += (Elf_Addr )obj->relocbase; in reloc_plt()
683 reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) in reloc_jmpslots() argument
690 rellim = (const Elf_Rel *)((const char *)obj->pltrel + obj->pltrelsize); in reloc_jmpslots()
691 for (rel = obj->pltrel; rel < rellim; rel++) { in reloc_jmpslots()
696 def = find_symdef(ELF_R_SYM(rel->r_info), obj, in reloc_jmpslots()
703 where = (Elf_Addr *)(obj->relocbase + rel->r_offset); in reloc_jmpslots()
717 reloc_iresolve(Obj_Entry *obj __unused, in reloc_iresolve()
726 reloc_iresolve_nonplt(Obj_Entry *obj __unused, in reloc_iresolve_nonplt()
735 reloc_gnu_ifunc(Obj_Entry *obj __unused, int flags __unused, in reloc_gnu_ifunc()
745 const Obj_Entry *defobj __unused, const Obj_Entry *obj __unused, in reloc_jmpslot()