The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

elf_newdata (3)
  • >> elf_newdata (3) ( FreeBSD man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    elf_getdata
    
     
    elf_newdata
    
     
    elf_rawdata
    
     - iterate through or allocate section data
    
     
    

    LIBRARY

    Lb libelf
    
     
    

    SYNOPSIS

       #include <libelf.h>
    Elf_Data * elf_getdata (Elf_Scn *scn Elf_Data *data);
    Elf_Data * elf_newdata (Elf_Scn *scn);
    Elf_Data * elf_rawdata (Elf_Scn *scn Elf_Data *data);
     

    DESCRIPTION

    These functions are used to access and manipulate data descriptors associated with section descriptors. Data descriptors used by the ELF library are described in elf(3).

    Function elf_getdata ();
    will return the next data descriptor associated with section descriptor scn The returned data descriptor will be setup to contain translated data. Argument data may be NULL, in which case the function returns the first data descriptor associated with section scn If argument data is not NULL, it must be a pointer to a data descriptor associated with section descriptor scn and function elf_getdata ();
    will return a pointer to the next data descriptor for the section, or NULL when the end of the section's descriptor list is reached.

    Function elf_newdata ();
    will allocate a new data descriptor and append it to the list of data descriptors associated with section descriptor scn The new data descriptor will be initialized as follows:

    d_align
    Set to 1.
    d_buf
    Initialized to NULL.
    d_off
    Set to (off_t) -1. This field is under application control if the ELF_F_LAYOUT flag was set on the ELF descriptor.
    d_size
    Set to zero.
    d_type
    Initialized to ELF_T_BYTE
    d_version
    Set to the current working version of the library, as set by elf_version3.

    The application must set these values as appropriate before calling elf_update3. Section scn must be associated with an ELF file opened for writing. If the application has not requested full control of layout by setting the ELF_F_LAYOUT flag on descriptor elf then the data referenced by the returned descriptor will be positioned after the existing content of the section, honoring the file alignment specified in member d_align On successful completion of a call to elf_newdata (,);
    the ELF library will mark the section scn as ``dirty''

    Function elf_rawdata ();
    is used to step through the data descriptors associated with section scn In contrast to function elf_getdata (,);
    this function returns untranslated data. If argument data is NULL, the first data descriptor associated with section scn is returned. If argument data is not NULL, is must be a data descriptor associated with section scn and function elf_rawdata ();
    will return the next data descriptor in the list, or NULL if no further descriptors are present. Function elf_rawdata ();
    always returns Vt Elf_Data structures of type ELF_T_BYTE  

    RETURN VALUES

    These functions return a valid pointer to a data descriptor if successful, or NULL if an error occurs.  

    ERRORS

    These functions may fail with the following errors:

    Bq Er ELF_E_ARGUMENT
    Arguments scn was NULL.
    Bq Er ELF_E_ARGUMENT
    Data descriptor data was not associated with section descriptor scn
    Bq Er ELF_E_RESOURCE
    An out of memory condition was detected.

     

    SEE ALSO

    elf(3), elf_flagdata3, elf_flagscn3, elf_getscn3, elf_getshdr3, elf_newscn3, elf_update3, elf_version3, gelf(3)


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    ERRORS
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру