Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/rtld-elf/rtld.c
Show First 20 Lines • Show All 3,105 Lines • ▼ Show 20 Lines | |||||
resolve_object_ifunc(Obj_Entry *obj, bool bind_now, int flags, | resolve_object_ifunc(Obj_Entry *obj, bool bind_now, int flags, | ||||
RtldLockState *lockstate) | RtldLockState *lockstate) | ||||
{ | { | ||||
if (obj->ifuncs_resolved) | if (obj->ifuncs_resolved) | ||||
return (0); | return (0); | ||||
obj->ifuncs_resolved = true; | obj->ifuncs_resolved = true; | ||||
if (!obj->irelative && !obj->irelative_nonplt && | if (!obj->irelative && !obj->irelative_nonplt && | ||||
!((obj->bind_now || bind_now) && obj->gnu_ifunc)) | !((obj->bind_now || bind_now) && obj->gnu_ifunc) && | ||||
!obj->non_plt_gnu_ifunc) | |||||
return (0); | return (0); | ||||
if (obj_disable_relro(obj) == -1 || | if (obj_disable_relro(obj) == -1 || | ||||
(obj->irelative && reloc_iresolve(obj, lockstate) == -1) || | (obj->irelative && reloc_iresolve(obj, lockstate) == -1) || | ||||
(obj->irelative_nonplt && reloc_iresolve_nonplt(obj, | (obj->irelative_nonplt && reloc_iresolve_nonplt(obj, | ||||
lockstate) == -1) || | lockstate) == -1) || | ||||
((obj->bind_now || bind_now) && obj->gnu_ifunc && | ((obj->bind_now || bind_now) && obj->gnu_ifunc && | ||||
reloc_gnu_ifunc(obj, flags, lockstate) == -1) || | reloc_gnu_ifunc(obj, flags, lockstate) == -1) || | ||||
(obj->non_plt_gnu_ifunc && reloc_non_plt(obj, &obj_rtld, | |||||
flags | SYMLOOK_IFUNC, lockstate) == -1) || | |||||
obj_enforce_relro(obj) == -1) | obj_enforce_relro(obj) == -1) | ||||
return (-1); | return (-1); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
initlist_objects_ifunc(Objlist *list, bool bind_now, int flags, | initlist_objects_ifunc(Objlist *list, bool bind_now, int flags, | ||||
RtldLockState *lockstate) | RtldLockState *lockstate) | ||||
▲ Show 20 Lines • Show All 2,778 Lines • Show Last 20 Lines |