elf_getaroff - Man Page

retrieve the offset of an archive member header

Synopsis

#include <libelf.h>

int64_t elf_getaroff(Elf *elf);

Description

Return the file offset, in bytes, of the archive member header currently referred to by an ELF descriptor.  This is the offset of the member header in the parent archive file.  This offset can be used with elf_rand.

Parameters

elf

Elf descriptor referring to a member of an archive file header.

Return Value

Return the file offset, in bytes, of the archive member header referred to by elf. If elf is NULL or is not a member of an archive, return -1.

See Also

elf_begin(3), elf_next(3), elf_rand(3), libelf(3), elf(5)

Attributes

InterfaceAttributeValue
elf_getaroff()Thread safetyMT-Safe

Reporting Bugs

Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.

History

elf_getaroff first appeared in elfutils 0.114.  This elfutils libelf function may not be found in other libelf implementations.

Referenced By

elf_getarhdr(3), elf_getbase(3).

2025-06-06 Libelf Programmer's Manual