Changeset View
Changeset View
Standalone View
Standalone View
libexec/rtld-elf/rtld.c
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
static void load_filtees(Obj_Entry *, int flags, RtldLockState *); | static void load_filtees(Obj_Entry *, int flags, RtldLockState *); | ||||
static void unload_filtees(Obj_Entry *, RtldLockState *); | static void unload_filtees(Obj_Entry *, RtldLockState *); | ||||
static int load_needed_objects(Obj_Entry *, int); | static int load_needed_objects(Obj_Entry *, int); | ||||
static int load_preload_objects(char *, bool); | static int load_preload_objects(char *, bool); | ||||
static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); | static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); | ||||
static void map_stacks_exec(RtldLockState *); | static void map_stacks_exec(RtldLockState *); | ||||
static int obj_disable_relro(Obj_Entry *); | static int obj_disable_relro(Obj_Entry *); | ||||
static int obj_enforce_relro(Obj_Entry *); | static int obj_enforce_relro(Obj_Entry *); | ||||
static Obj_Entry *obj_from_addr(const void *); | |||||
static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *); | static void objlist_call_fini(Objlist *, Obj_Entry *, RtldLockState *); | ||||
static void objlist_call_init(Objlist *, RtldLockState *); | static void objlist_call_init(Objlist *, RtldLockState *); | ||||
static void objlist_clear(Objlist *); | static void objlist_clear(Objlist *); | ||||
static Objlist_Entry *objlist_find(Objlist *, const Obj_Entry *); | static Objlist_Entry *objlist_find(Objlist *, const Obj_Entry *); | ||||
static void objlist_init(Objlist *); | static void objlist_init(Objlist *); | ||||
static void objlist_push_head(Objlist *, Obj_Entry *); | static void objlist_push_head(Objlist *, Obj_Entry *); | ||||
static void objlist_push_tail(Objlist *, Obj_Entry *); | static void objlist_push_tail(Objlist *, Obj_Entry *); | ||||
static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *); | static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *); | ||||
▲ Show 20 Lines • Show All 2,547 Lines • ▼ Show 20 Lines | obj->path); | ||||
return (obj); | return (obj); | ||||
errp: | errp: | ||||
munmap(obj->mapbase, obj->mapsize); | munmap(obj->mapbase, obj->mapsize); | ||||
obj_free(obj); | obj_free(obj); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
static Obj_Entry * | Obj_Entry * | ||||
obj_from_addr(const void *addr) | obj_from_addr(const void *addr) | ||||
{ | { | ||||
Obj_Entry *obj; | Obj_Entry *obj; | ||||
TAILQ_FOREACH(obj, &obj_list, next) { | TAILQ_FOREACH(obj, &obj_list, next) { | ||||
if (obj->marker) | if (obj->marker) | ||||
continue; | continue; | ||||
if (addr < (void *) obj->mapbase) | if (addr < (void *) obj->mapbase) | ||||
▲ Show 20 Lines • Show All 3,227 Lines • Show Last 20 Lines |