|ELF_GETBASE(3)||FreeBSD Library Functions Manual||ELF_GETBASE(3)|
NAMEelf_getbase — get the base offset for an object file
LIBRARYELF Access Library (libelf, -lelf)
SYNOPSIS#include < libelf.h>
elf_getbase( Elf *elf);
DESCRIPTIONFunction elf_getbase() returns the file offset to the first byte of the object referenced by ELF descriptor elf.
For descriptors referencing members of archives, the returned offset is the file offset of the member in its containing archive. For descriptors to regular objects, the returned offset is (vacuously) zero.
RETURN VALUESFunction elf_getbase() returns a valid file offset if successful, or ( off_t)
-1in case of an error.
ERRORSFunction elf_getbase() may fail with the following errors:
- [ ELF_E_ARGUMENT]
- Argument elf was NULL.
|June 6, 2010||FreeBSD|