diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2014-03-10 14:02:07 -0700 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2014-03-10 14:02:07 -0700 |
commit | 17c46147bc21f7e62dddfee4e03493ec484193b9 (patch) | |
tree | 06f2e84b2b512465588d9e35ce40ee7a4a00be6d /dlfcn/dlfcn.h | |
parent | 05fc85cb17e075c862e223ff2b09fbc5bf0642d3 (diff) | |
download | glibc-17c46147bc21f7e62dddfee4e03493ec484193b9.tar.gz glibc-17c46147bc21f7e62dddfee4e03493ec484193b9.tar.xz glibc-17c46147bc21f7e62dddfee4e03493ec484193b9.zip |
For Google b/8315591, experimental implementation of dlopen_with_offset.
Diffstat (limited to 'dlfcn/dlfcn.h')
-rw-r--r-- | dlfcn/dlfcn.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h index 461cef1862..cceed5cf95 100644 --- a/dlfcn/dlfcn.h +++ b/dlfcn/dlfcn.h @@ -22,6 +22,7 @@ #include <features.h> #define __need_size_t #include <stddef.h> +#include <sys/types.h> /* Collect various system dependent definitions and declarations. */ #include <bits/dlfcn.h> @@ -55,6 +56,11 @@ __BEGIN_DECLS passed to `dlsym' to get symbol values from it. */ extern void *dlopen (const char *__file, int __mode) __THROWNL; +/* Same as above, but ELF header is at OFF from the start of file. */ +extern void *__google_dlopen_with_offset (__const char *__file, + off_t offset, + int __mode) __THROW; + /* Unmap and close a shared object opened by `dlopen'. The handle cannot be used again after calling `dlclose'. */ extern int dlclose (void *__handle) __THROWNL __nonnull ((1)); @@ -68,6 +74,12 @@ extern void *dlsym (void *__restrict __handle, /* Like `dlopen', but request object to be allocated in a new namespace. */ extern void *dlmopen (Lmid_t __nsid, const char *__file, int __mode) __THROWNL; +/* Same as above, but ELF header is at OFF from the start of file. */ +extern void *__google_dlmopen_with_offset (Lmid_t __nsid, + __const char *__file, + off_t offset, + int __mode) __THROW; + /* Find the run-time address in the shared object HANDLE refers to of the symbol called NAME with VERSION. */ extern void *dlvsym (void *__restrict __handle, |