Blame doc/elf_getdata.3

Packit 032894
.\" Modified Thu Aug 17 2017 by Ben Woodard <woodard@redhat.com>
Packit 032894
.\"
Packit 032894
.TH ELF_GETDATA 3 2017-08-17 "Libelf" "Libelf Programmer's Manual"
Packit 032894
.SH NAME
Packit 032894
elf_getdata \- Get washed data of section
Packit 032894
.nf
Packit 032894
.SH SYNOPSIS
Packit 032894
.B #include <libelf.h>
Packit 032894
.sp
Packit 032894
.BI "Elf_Data * elf_getdata (Elf_Scn *" scn ", Elf_Data *" data ");"
Packit 032894
.fi
Packit 032894
.SH DESCRIPTION
Packit 032894
The
Packit 032894
.BR elf_getdata ()
Packit 032894
function allows the user to retrieve the data buffers of the section
Packit 032894
.I scn
Packit 032894
 . There can be more than one buffer if the user explicitly added them.
Packit 032894
When a file is read the libelf library creates exactly one data buffer.
Packit 032894
Packit 032894
The first buffer in the list can be obtained by passing a null pointer in the
Packit 032894
parameter data. To get the next data buffer the previously returned value must
Packit 032894
be passed in the data parameter. If there are no more buffer left in the list a
Packit 032894
null pointer is returned.
Packit 032894
Packit 032894
If the data parameter is not a null pointer it must be a descriptor for a
Packit 032894
buffer associated with the section scn . If this is not the case a null pointer
Packit 032894
is returned. To facilitate error handling elf_getdata also returns a null
Packit 032894
pointer if the scn parameter is a null pointer.