*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> libelf/elf_getarhdr (3)              



NAME    [Toc]    [Back]

     elf_getarhdr - retrieve archive member header

SYNOPSIS    [Toc]    [Back]

     cc	[flag ...] file	...  -lelf [library ...]

     #include <libelf.h>

     Elf_Arhdr *elf_getarhdr(Elf *elf);

DESCRIPTION    [Toc]    [Back]

     elf_getarhdr returns a pointer to an archive member header, if one	is
     available for the ELF descriptor elf.  Otherwise, no archive member
     header exists, an error occurred, or elf was null;	elf_getarhdr then
     returns a null value.  The	header includes	the following members.

		  char		  *ar_name;
		  time_t	  ar_date;
		  long		  ar_uid;
		  long		  ar_gid;
		  unsigned long	  ar_mode;
		  off_t		  ar_size;
		  char		  *ar_rawname;

     An	archive	member name, available through ar_name,	is a null-terminated
     string, with the ar format	control	characters removed.  The ar_rawname
     member holds a null-terminated string that	represents the original	name
     bytes in the file,	including the terminating slash	and trailing blanks as
     specified in the archive format.

     In	addition to ``regular''	archive	members, the archive format defines
     some special members.  All	special	member names begin with	a slash	(/),
     distinguishing them from regular members (whose names may not contain a
     slash).  These special members have the names (ar_name) defined below.

     /	     This is the archive symbol	table.	If present, it will be the
	     first archive member.  A program may access the archive symbol
	     table through elf_getarsym.  The information in the symbol	table
	     is	useful for random archive processing [see elf_rand(3E)].

     //	     This member, if present, holds a string table for long archive
	     member names.  An archive member's	header contains	a 16-byte area
	     for the name, which may be	exceeded in some file systems.	The
	     library automatically retrieves long member names from the	string
	     table, setting ar_name to the appropriate value.

     Under some	error conditions, a member's name might	not be available.
     Although this causes the library to set ar_name to	a null pointer,	the
     ar_rawname	member will be set as usual.

									Page 1


SEE ALSO    [Toc]    [Back]

     elf(3E), elf_begin(3E), elf_getarsym(3E), elf_rand(3E), ar(4).

									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
ldahread Tru64 read the archive header of a member of an archive file
ldahread IRIX read the archive header of a member of an archive file
elf_rand IRIX random archive member access
elf_next IRIX sequential archive member access
elf_getarsym IRIX retrieve archive symbol table
elf_getshdr IRIX retrieve class-dependent section header
elf_getehdr IRIX retrieve class-dependent object file header
inet6_rth_getaddr Tru64 Retrieve an address for an index from an IPv6 Routing header
elf_getphdr IRIX retrieve class-dependent program header table
inet6_opt_init Tru64 Return the length of an IPv6 extension header with no options and initialize the header
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service