ELF_GETARHDR(3)

NAME
elf_getarhdr - retrieve archive member header information

SYNOPSIS
#include <libelf.h>
Elf_Arhdr *elf_getarhdr(Elf *elf);

DESCRIPTION
Return a Elf_Arhdr * describing the archive header of the archive member currently referred to by an ELF descriptor. The Elf_Arhdr structure is defined as:

typedef struct {
  char *ar_name;                /* Name of archive member.  */
  time_t ar_date;               /* File date.  */
  uid_t ar_uid;                 /* User ID.  */
  gid_t ar_gid;                 /* Group ID.  */
  mode_t ar_mode;               /* File mode.  */
  int64_t ar_size;              /* File size.  */
  char *ar_rawname;             /* Original name of archive member.  */
} Elf_Arhdr;

PARAMETERS

elf An ELF descriptor referring to a member of an archive file.

RETURN VALUE
If elf refers to an archive member, elf_getarhdr() returns a pointer to its archive header. This pointer is valid until elf or the parent archive Elf descriptor are closed using elf_end(). If elf does not refer to an archive member or the header cannot be acquired then NULL is returned.

SEE ALSO
elf_begin(3), elf_getaroff(3), elf_next(3), elf_rand(3), libelf(3), elf(5)

ATTRIBUTES
Interface | Attribute | Value
 | Thread safety | MT-safe

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