Skip to content

Instantly share code, notes, and snippets.

@etishor
Created February 15, 2014 13:38
Show Gist options
  • Save etishor/9019433 to your computer and use it in GitHub Desktop.
Save etishor/9019433 to your computer and use it in GitHub Desktop.
--- libexec/rtld-elf/rtld.c.orig Fri Sep 24 08:04:52 2004
+++ libexec/rtld-elf/rtld.c Sun Oct 17 03:37:44 2004
@@ -129,6 +129,7 @@
static void unref_dag(Obj_Entry *);
static void ref_dag(Obj_Entry *);
+void *_dlsym(void *, const char *);
void r_debug_state(struct r_debug*, struct link_map*);
/*
@@ -177,6 +178,7 @@
(func_ptr_type) &dlclose,
(func_ptr_type) &dlerror,
(func_ptr_type) &dlopen,
+ (func_ptr_type) &_dlsym,
(func_ptr_type) &dlsym,
(func_ptr_type) &dladdr,
(func_ptr_type) &dllockinit,
@@ -1736,6 +1738,12 @@
trace_loaded_objects(obj);
wlock_release(rtld_bind_lock, lockstate);
exit(0);
+}
+
+void *
+_dlsym(void *handle, const char *name)
+{
+ return dlsym(handle, name);
}
void *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment