Man page - libr_malloc(3)

Packages contas this manual

Manual

libr_malloc(3) Library Functions Manual libr_malloc(3)

libr_malloc - Obtain the data corresponding to a libr ELF resource.

#include <libr.h>

char *libr_malloc(libr_file *handle, char *resourcename, size_t *size);

Returns the contents of a libr-compatible resource stored in an ELF binary corresponding to the given resource name.

Parameters

handle A handle returned by libr_open(3).
resourcename The name of the libr-compatible resource for which the data will be returned.
size A pointer for storing the length of the data contained in the the resource. May be NULL.

Returns

Returns NULL on failure, the pointer to a buffer containing the data for the resource on success. When the buffer is no-longer used it must be unallocated using a call to free(3).

libr_open(3), free(3)

Erich Hoover ehoover@mines.edu

libr