Man page - libr_open(3)
Packages contas this manual
Manual
| libr_open(3) | Library Functions Manual | libr_open(3) |
NAME
libr_open - Open an ELF executable file for resource management.
SYNOPSIS
#include <libr.h>
libr_file *libr_open(char *filename, libr_access_t access);
DESCRIPTION
libr_open() can be used on any ELF executable, however, libr_open() called with LIBR_READ access is only useful for executables that already contain libr-compatible stored resources.
An application can easily access its own resources by passing NULL for the filename and requesting LIBR_READ access. For the obvious reason that an actively-open application cannot edit itself, the calling binary may only request LIBR_READ access.
Parameters
filename ELF executable to manage. Pass a NULL
pointer as the filename in order to access the calling binary
(LIBR_READ access only)
access Requested access type (LIBR_READ, LIBR_WRITE, LIBR_READ_WRITE), the valid operations for the returned handle will be restricted based upon the requested access.
access Requested access type (LIBR_READ, LIBR_WRITE, LIBR_READ_WRITE), the valid operations for the returned handle will be restricted based upon the requested access.
Returns
Returns a libr file handle on success, NULL on failure.
The handle should be freed with libr_close(3) when no-longer
used.
SEE ALSO
libr_close(3)
AUTHOR
Erich Hoover ehoover@mines.edu
| libr |