elf_rawfile3
Return uninterpreted contents of an elf file
Usage
#include <libelf.h>
char *
elf_rawfile(Elf *elf, size_t *sz);
Library
library “libelf”
Overview
Function elf_rawfile() returns the uninterpreted contents of the file referenced by ELF descriptor elf.
If argument sz is non-null, the function stores the file's size in bytes in the location to which it points. A value of zero is written to this location if an error is encountered.
Return values
Function elf_rawfile() returns a valid pointer if successful or NULL if an error occurs.
Errors
Function elf_rawfile() may fail with the following errors:
- [ELF_E_ARGUMENT]
-
Argument elf was NULL.
- [ELF_E_SEQUENCE]
-
Argument elf was opened for writing and function
elf_rawfile() was invoked before elf_update(3).
Releases
44 releases since FreeBSD 7.0-RELEASE; the text changed 20 times.