version 1.4, 2021/03/08 20:55:06 |
version 1.5, 2022/03/12 21:37:55 |
|
|
.\" out of the use of this software, even if advised of the possibility of |
.\" out of the use of this software, even if advised of the possibility of |
.\" such damage. |
.\" such damage. |
.\" |
.\" |
.\" Id: gelf_getshdr.3 3928 2021-03-07 19:47:55Z jkoshy |
.\" Id: gelf_getshdr.3 3958 2022-03-12 14:31:32Z jkoshy |
.\" |
.\" |
.Dd August 27, 2006 |
.Dd August 27, 2006 |
.Dt GELF_GETSHDR 3 |
.Dt GELF_GETSHDR 3 |
|
|
.Sh DESCRIPTION |
.Sh DESCRIPTION |
These functions return a pointer to the ELF Section Header data |
These functions return a pointer to the ELF Section Header data |
structure associated with section descriptor |
structure associated with section descriptor |
.Ar scn . |
.Fa scn . |
.Pp |
.Pp |
Function |
Function |
.Fn elf32_getshdr |
.Fn elf32_getshdr |
Line 55 retrieves a pointer to an |
|
Line 55 retrieves a pointer to an |
|
.Vt Elf32_Shdr |
.Vt Elf32_Shdr |
structure. |
structure. |
Section descriptor |
Section descriptor |
.Ar scn |
.Fa scn |
must be associated with an ELF descriptor of class |
must be associated with an ELF descriptor of class |
.Dv ELFCLASS32 . |
.Dv ELFCLASS32 . |
.Pp |
.Pp |
Line 65 retrieves a pointer to an |
|
Line 65 retrieves a pointer to an |
|
.Vt Elf64_Shdr |
.Vt Elf64_Shdr |
structure. |
structure. |
Section descriptor |
Section descriptor |
.Ar scn |
.Fa scn |
must be associated with an ELF descriptor of class |
must be associated with an ELF descriptor of class |
.Dv ELFCLASS64 . |
.Dv ELFCLASS64 . |
.Pp |
.Pp |
Function |
Function |
.Fn gelf_getshdr |
.Fn gelf_getshdr |
copies the values in the section header associated with argument |
copies the values in the section header associated with argument |
.Ar scn |
.Fa scn |
to the structure pointed to be argument |
to the structure pointed to be argument |
.Ar dst . |
.Fa dst . |
The |
The |
.Vt GElf_Shdr |
.Vt GElf_Shdr |
data structure is described in |
data structure is described in |
Line 92 if an error was encountered. |
|
Line 92 if an error was encountered. |
|
Function |
Function |
.Fn gelf_getshdr |
.Fn gelf_getshdr |
returns argument |
returns argument |
.Ar dst |
.Fa dst |
if successful, or |
if successful, or |
.Dv NULL |
.Dv NULL |
if an error was encountered. |
if an error was encountered. |
Line 101 These functions may fail with the follow |
|
Line 101 These functions may fail with the follow |
|
.Bl -tag -width "[ELF_E_RESOURCE]" |
.Bl -tag -width "[ELF_E_RESOURCE]" |
.It Bq Er ELF_E_ARGUMENT |
.It Bq Er ELF_E_ARGUMENT |
Arguments |
Arguments |
.Ar scn |
.Fa scn |
or |
or |
.Ar shdr |
.Fa shdr |
were |
were |
.Dv NULL . |
.Dv NULL . |
.It Bq Er ELF_E_ARGUMENT |
.It Bq Er ELF_E_ARGUMENT |
Argument |
Argument |
.Ar scn |
.Fa scn |
was not associated a descriptor for an ELF object. |
was not associated a descriptor for an ELF object. |
.It Bq Er ELF_E_CLASS |
.It Bq Er ELF_E_CLASS |
The ELF class associated with the section descriptor |
The ELF class associated with the section descriptor |
.Ar scn |
.Fa scn |
did not match the class expected by the API. |
did not match the class expected by the API. |
.El |
.El |
.Sh SEE ALSO |
.Sh SEE ALSO |