| GELF_XLATETOF(3) | Library Functions Manual | GELF_XLATETOF(3) | 
elf32_xlate, elf64_xlate,
  gelf_xlate —
#include <libelf.h>
Elf_Data *
  
  elf32_xlatetof(Elf_Data
    *dst, Elf_Data
    *src, unsigned int
    encode);
Elf_Data *
  
  elf32_xlatetom(Elf_Data
    *dst, Elf_Data
    *src, unsigned int
    encode);
Elf_Data *
  
  elf64_xlatetof(Elf_Data
    *dst, Elf_Data
    *src, unsigned int
    encode);
Elf_Data *
  
  elf64_xlatetom(Elf_Data
    *dst, Elf_Data
    *src, unsigned int
    encode);
#include
  <gelf.h>
Elf_Data *
  
  gelf_xlatetof(Elf *elf,
    Elf_Data *dst, Elf_Data *src,
    unsigned int encode);
Elf_Data *
  
  gelf_xlatetom(Elf *elf,
    Elf_Data *dst, Elf_Data *src,
    unsigned int encode);
Functions elf32_xlatetom(),
    elf64_xlatetom(), and
    gelf_xlatetom() translate data from file
    representations to native, in-memory representations. Functions
    elf32_xlatetof(),
    elf64_xlatetof(), and
    gelf_xlatetof() translate data from in-memory
    representations to file representations.
Argument src denotes an Elf_Data descriptor describing the source to be translated. The following elements of the descriptor need to be set before invoking these functions:
EV_CURRENT is
    supported.Argument dst describes the destination buffer. The following elements of the Elf_Data descriptor need to be set before invoking these functions:
EV_CURRENT is supported.These translations routines allow the source and destination buffers to coincide, in which case an in-place translation will be done if the destination is large enough to hold the translated data. Other kinds of overlap between the source and destination buffers are not permitted.
On successful completion of the translation request the following fields of the dst descriptor would be modified:
Argument encode specifies the encoding in which the file objects are represented. It must be one of:
ELFDATANONEELFDATA2LSBELFDATA2MSBThe functions gelf_xlatetof() and
    gelf_xlatetom() select the appropriate 32 or 64 bit
    translations based on the class of argument elf.
ELF_E_ARGUMENT]ELF_E_ARGUMENT]ELF_E_ARGUMENT]ELFDATANONE, ELFDATA2LSB
      or ELFDATA2MSB.ELF_E_ARGUMENT]ELF_E_DATA]ELF_E_DATA]ELF_E_DATA]ELF_E_DATA]ELF_E_DATA]ELF_E_UNIMPL]ELF_E_UNIMPL]ELF_E_VERSION]| July 24, 2006 | NetBSD 9.4 |