version 1.19, 1999/03/13 20:00:14 |
version 1.20, 1999/04/29 15:06:41 |
Line 157 _rtld_relocate_nonplt_object(obj, rela, |
|
Line 157 _rtld_relocate_nonplt_object(obj, rela, |
|
Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); |
Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); |
const Elf_Sym *def; |
const Elf_Sym *def; |
const Obj_Entry *defobj; |
const Obj_Entry *defobj; |
#if defined(__i386__) || defined(__alpha__) |
#if defined(__alpha__) || defined(__i386__) || defined(__m68k__) |
extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; |
extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; |
extern Elf_Dyn _DYNAMIC; |
extern Elf_Dyn _DYNAMIC; |
#endif |
#endif |
#if defined(__i386__) || defined(__alpha__) || defined(__powerpc__) |
#if defined(__alpha__) || defined(__i386__) || defined(__m68k__) || \ |
|
defined(__powerpc__) |
Elf_Addr tmp; |
Elf_Addr tmp; |
#endif |
#endif |
|
|
Line 170 _rtld_relocate_nonplt_object(obj, rela, |
|
Line 171 _rtld_relocate_nonplt_object(obj, rela, |
|
case R_TYPE(NONE): |
case R_TYPE(NONE): |
break; |
break; |
|
|
#ifdef __i386__ |
#if defined(__i386__) || defined(__m68k__) |
case R_TYPE(GOT32): |
case R_TYPE(GOT32): |
|
|
def = _rtld_find_symdef(_rtld_objlist, rela->r_info, NULL, obj, |
def = _rtld_find_symdef(_rtld_objlist, rela->r_info, NULL, obj, |
Line 216 _rtld_relocate_nonplt_object(obj, rela, |
|
Line 217 _rtld_relocate_nonplt_object(obj, rela, |
|
defobj->strtab + def->st_name, obj->path, |
defobj->strtab + def->st_name, obj->path, |
(void *)*where, defobj->path)); |
(void *)*where, defobj->path)); |
break; |
break; |
#endif /* __i386__ */ |
#endif /* __i386__ || __m68k__ */ |
|
|
#ifdef __alpha__ |
#ifdef __alpha__ |
case R_TYPE(REFQUAD): |
case R_TYPE(REFQUAD): |
Line 235 _rtld_relocate_nonplt_object(obj, rela, |
|
Line 236 _rtld_relocate_nonplt_object(obj, rela, |
|
break; |
break; |
#endif /* __alpha__ */ |
#endif /* __alpha__ */ |
|
|
#if defined(__i386__) || defined(__alpha__) |
#if defined(__alpha__) || defined(__i386__) || defined(__m68k__) |
case R_TYPE(GLOB_DAT): |
case R_TYPE(GLOB_DAT): |
def = _rtld_find_symdef(_rtld_objlist, rela->r_info, NULL, obj, |
def = _rtld_find_symdef(_rtld_objlist, rela->r_info, NULL, obj, |
&defobj, false); |
&defobj, false); |
Line 379 _rtld_relocate_plt_object(obj, rela, add |
|
Line 380 _rtld_relocate_plt_object(obj, rela, add |
|
return _rtld_reloc_powerpc_plt(obj, rela, bind_now); |
return _rtld_reloc_powerpc_plt(obj, rela, bind_now); |
#endif |
#endif |
|
|
#if defined(__alpha__) || defined(__i386__) |
#if defined(__alpha__) || defined(__i386__) || defined(__m68k__) |
if (bind_now || obj->pltgot == NULL) { |
if (bind_now || obj->pltgot == NULL) { |
const Elf_Sym *def; |
const Elf_Sym *def; |
const Obj_Entry *defobj; |
const Obj_Entry *defobj; |
Line 397 _rtld_relocate_plt_object(obj, rela, add |
|
Line 398 _rtld_relocate_plt_object(obj, rela, add |
|
defobj->strtab + def->st_name, |
defobj->strtab + def->st_name, |
(void *)*where, (void *)new_value)); |
(void *)*where, (void *)new_value)); |
} else |
} else |
#endif /* __alpha__ || __i386__ */ |
#endif /* __alpha__ || __i386__ || __m68k__ */ |
if (!obj->mainprog) { |
if (!obj->mainprog) { |
/* Just relocate the GOT slots pointing into the PLT */ |
/* Just relocate the GOT slots pointing into the PLT */ |
new_value = *where + (Elf_Addr)(obj->relocbase); |
new_value = *where + (Elf_Addr)(obj->relocbase); |
Line 566 _rtld_relocate_objects(first, bind_now, |
|
Line 567 _rtld_relocate_objects(first, bind_now, |
|
|
|
/* Set the special PLTGOT entries. */ |
/* Set the special PLTGOT entries. */ |
if (obj->pltgot != NULL) { |
if (obj->pltgot != NULL) { |
#if defined(__i386__) |
#if defined(__i386__) || defined(__m68k__) |
obj->pltgot[1] = (Elf_Addr) obj; |
obj->pltgot[1] = (Elf_Addr) obj; |
obj->pltgot[2] = (Elf_Addr) & _rtld_bind_start; |
obj->pltgot[2] = (Elf_Addr) & _rtld_bind_start; |
#endif |
#endif |