1*2de3b87aSKai Wang.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved. 2*2de3b87aSKai Wang.\" 3*2de3b87aSKai Wang.\" Redistribution and use in source and binary forms, with or without 4*2de3b87aSKai Wang.\" modification, are permitted provided that the following conditions 5*2de3b87aSKai Wang.\" are met: 6*2de3b87aSKai Wang.\" 1. Redistributions of source code must retain the above copyright 7*2de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer. 8*2de3b87aSKai Wang.\" 2. Redistributions in binary form must reproduce the above copyright 9*2de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer in the 10*2de3b87aSKai Wang.\" documentation and/or other materials provided with the distribution. 11*2de3b87aSKai Wang.\" 12*2de3b87aSKai Wang.\" This software is provided by Joseph Koshy ``as is'' and 13*2de3b87aSKai Wang.\" any express or implied warranties, including, but not limited to, the 14*2de3b87aSKai Wang.\" implied warranties of merchantability and fitness for a particular purpose 15*2de3b87aSKai Wang.\" are disclaimed. in no event shall Joseph Koshy be liable 16*2de3b87aSKai Wang.\" for any direct, indirect, incidental, special, exemplary, or consequential 17*2de3b87aSKai Wang.\" damages (including, but not limited to, procurement of substitute goods 18*2de3b87aSKai Wang.\" or services; loss of use, data, or profits; or business interruption) 19*2de3b87aSKai Wang.\" however caused and on any theory of liability, whether in contract, strict 20*2de3b87aSKai Wang.\" liability, or tort (including negligence or otherwise) arising in any way 21*2de3b87aSKai Wang.\" out of the use of this software, even if advised of the possibility of 22*2de3b87aSKai Wang.\" such damage. 23*2de3b87aSKai Wang.\" 24*2de3b87aSKai Wang.\" $Id: elf_getarhdr.3 189 2008-07-20 10:38:08Z jkoshy $ 25*2de3b87aSKai Wang.\" 26*2de3b87aSKai Wang.Dd August 15, 2006 27*2de3b87aSKai Wang.Os 28*2de3b87aSKai Wang.Dt ELF_GETARHDR 3 29*2de3b87aSKai Wang.Sh NAME 30*2de3b87aSKai Wang.Nm elf_getarhdr 31*2de3b87aSKai Wang.Nd retrieve ar(1) header for an archive member 32*2de3b87aSKai Wang.Sh LIBRARY 33*2de3b87aSKai Wang.Lb libelf 34*2de3b87aSKai Wang.Sh SYNOPSIS 35*2de3b87aSKai Wang.In libelf.h 36*2de3b87aSKai Wang.Ft "Elf_Arhdr *" 37*2de3b87aSKai Wang.Fn elf_getarhdr "Elf *elf" 38*2de3b87aSKai Wang.Sh DESCRIPTION 39*2de3b87aSKai WangThe 40*2de3b87aSKai Wang.Fn elf_getarhdr 41*2de3b87aSKai Wangfunction returns a pointer to an archive member header for 42*2de3b87aSKai Wanga descriptor 43*2de3b87aSKai Wang.Ar elf . 44*2de3b87aSKai WangThis descriptor must have been returned by a prior call to 45*2de3b87aSKai Wang.Xr elf_begin 3 , 46*2de3b87aSKai Wangand must be a descriptor for a member inside an 47*2de3b87aSKai Wang.Xr ar 1 48*2de3b87aSKai Wangarchive. 49*2de3b87aSKai Wang.Pp 50*2de3b87aSKai WangStructure 51*2de3b87aSKai Wang.Vt Elf_Arhdr 52*2de3b87aSKai Wangincludes the following members: 53*2de3b87aSKai Wang.Bl -tag -width indent 54*2de3b87aSKai Wang.It Vt "char *" Va ar_name 55*2de3b87aSKai WangA pointer to a null terminated string containing the translated 56*2de3b87aSKai Wangname of the archive member. 57*2de3b87aSKai Wang.It Vt "char *" Va ar_rawname 58*2de3b87aSKai WangA pointer to a null terminated string containing the untranslated 59*2de3b87aSKai Wangname for the archive member, including all 60*2de3b87aSKai Wang.Xr ar 1 61*2de3b87aSKai Wangformatting characters and trailing white space. 62*2de3b87aSKai Wang.It Vt time_t Va ar_date 63*2de3b87aSKai WangThe timestamp associated with the member. 64*2de3b87aSKai Wang.It Vt uid_t Va ar_uid 65*2de3b87aSKai WangThe uid of the creator of the member. 66*2de3b87aSKai Wang.It Vt gid_t Va ar_gid 67*2de3b87aSKai WangThe gid of the creator of the member. 68*2de3b87aSKai Wang.It Vt mode_t Va ar_mode 69*2de3b87aSKai WangThe file mode of the member. 70*2de3b87aSKai Wang.It Vt size_t Va ar_size 71*2de3b87aSKai WangThe size of the member in bytes. 72*2de3b87aSKai Wang.El 73*2de3b87aSKai Wang.Sh RETURN VALUES 74*2de3b87aSKai WangThis function returns a valid pointer to an 75*2de3b87aSKai Wang.Vt Elf_Arhdr 76*2de3b87aSKai Wangstructure if successful, or NULL if an error is encountered. 77*2de3b87aSKai Wang.Sh ERRORS 78*2de3b87aSKai WangFunction 79*2de3b87aSKai Wang.Fn elf_getarhdr 80*2de3b87aSKai Wangmay fail with the following errors: 81*2de3b87aSKai Wang.Bl -tag -width "[ELF_E_RESOURCE]" 82*2de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 83*2de3b87aSKai WangArgument 84*2de3b87aSKai Wang.Ar elf 85*2de3b87aSKai Wangwas NULL. 86*2de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 87*2de3b87aSKai WangArgument 88*2de3b87aSKai Wang.Ar elf 89*2de3b87aSKai Wangwas not a descriptor for a member of an 90*2de3b87aSKai Wang.Xr ar 1 91*2de3b87aSKai Wangarchive. 92*2de3b87aSKai Wang.El 93*2de3b87aSKai Wang.Sh SEE ALSO 94*2de3b87aSKai Wang.Xr elf 3 , 95*2de3b87aSKai Wang.Xr elf_begin 3 , 96*2de3b87aSKai Wang.Xr elf_getarsym 3 , 97*2de3b87aSKai Wang.Xr elf_memory 3 98