Man page - libr_write(3)

Packages contas this manual

Manual

libr_write(3) Library Functions Manual libr_write(3)

libr_write - Adds a libr resource to an ELF binary.

#include <libr.h>

int libr_write(libr_file *handle, char *resourcename, char *buffer, size_t size, libr_type_t type, libr_overwrite_t overwrite);

Adds a libr-compatible resource into the ELF binary. The handle must be opened using libr_open(3) with either LIBR_WRITE or LIBR_READ_WRITE access in order to add a resource.

Parameters

handle A handle returned by libr_open(3).
resourcename The name of the resource to create.
buffer A string containing the data of the resource.
size The total size of the buffer.
type The method which should be used for storing the data (either LIBR_UNCOMPRESSED or LIBR_COMPRESSED).
overwrite Whether overwriting an existing resource should be permitted (either LIBR_NOOVERWRITE or LIBR_OVERWRITE).

Returns

Returns 1 on success, 0 on failure.

libr_open(3)

Erich Hoover ehoover@mines.edu

libr