예제 #1
0
파일: mdreloc.c 프로젝트: Ga-vin/MINIX3
int
_rtld_relocate_plt_objects(const Obj_Entry *obj)
{
	const Elf_Rela *rela;

	for (rela = obj->pltrela; rela < obj->pltrelalim; rela++)
		if (_rtld_relocate_plt_object(obj, rela, NULL) < 0)
			return -1;

	return 0;
}
예제 #2
0
파일: mdreloc.c 프로젝트: ryo/netbsd-src
int
_rtld_relocate_plt_objects(const Obj_Entry *obj)
{
    const Elf_Rel *rel;
    int err = 0;

    for (rel = obj->pltrel; rel < obj->pltrellim; rel++) {
        err = _rtld_relocate_plt_object(obj, rel, NULL);
        if (err)
            break;
    }

    return err;
}
예제 #3
0
파일: mdreloc.c 프로젝트: ryo/netbsd-src
caddr_t
_rtld_bind(const Obj_Entry *obj, Elf_Word reloff)
{
    const Elf_Rel *rel = obj->pltrel + reloff;
    Elf_Addr new_value = 0;	/* XXX gcc */

    _rtld_shared_enter();
    int err = _rtld_relocate_plt_object(obj, rel, &new_value);
    if (err)
        _rtld_die();
    _rtld_shared_exit();

    return (caddr_t)new_value;
}
예제 #4
0
int
_rtld_relocate_plt_objects(const Obj_Entry *obj)
{
	const Elf_Sym *sym = obj->symtab + obj->gotsym;
	Elf_Word i;

	for (i = obj->gotsym; i < obj->symtabno; i++, sym++) {
		if (ELF_ST_TYPE(sym->st_info) == STT_FUNC)
			if (_rtld_relocate_plt_object(obj, i, NULL) < 0)
				return -1;
	}

	return 0;
}
예제 #5
0
파일: mdreloc.c 프로젝트: Ga-vin/MINIX3
caddr_t
_rtld_bind(const Obj_Entry *obj, Elf_Word reloff)
{
	const Elf_Rela *rela = (const Elf_Rela *)((const uint8_t *)obj->pltrela + reloff);
	Elf_Addr result;
	int err;

	result = 0;	/* XXX gcc */

	err = _rtld_relocate_plt_object(obj, rela, &result);
	if (err)
		_rtld_die();

	return (caddr_t)result;
}
예제 #6
0
caddr_t
_rtld_bind(Elf_Word a0, Elf_Addr a1, Elf_Addr a2, Elf_Addr a3)
{
	Elf_Addr *got = (Elf_Addr *)(a2 - 0x7ff0);
	const Obj_Entry *obj = (Obj_Entry *)(got[1] & GOT1_MASK);
	Elf_Addr new_value = 0;	/* XXX gcc */
	int err;

	_rtld_shared_enter();
	err = _rtld_relocate_plt_object(obj, a0, &new_value);
	if (err)
		_rtld_die();
	_rtld_shared_exit();

	return (caddr_t)new_value;
}