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