GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ELF / V1-1-3 > elf_swap / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

ELF_swap.c File Reference

Function definitions for ELF byte swap utility library. More...

#include <string.h>
#include <ELF/ELF_swap.h>
#include <ELF/elf.h>
#include <PBS/BSWP.h>

Functions

void ELF_swapEhdr (const Elf32_Ehdr *inEhdr, Elf32_Ehdr *outEhdr)
 Byte swap an ELF file header.
void ELF_swapShdr (const Elf32_Shdr *inShdr, Elf32_Shdr *outShdr, int numEntries)
 Byte swap an ELF file section header table.
void ELF_swapSym (const Elf32_Sym *inSym, Elf32_Sym *outSym, int numEntries)
 Byte swap an ELF file symbol table.
void ELF_swapRela (const Elf32_Rela *inRela, Elf32_Rela *outRela, int numEntries)
 Byte swap an ELF relocation table.


Detailed Description

Function definitions for ELF byte swap utility library.

Author:
D.L. Wood
These functions act on ELF structures which are present already in memory (not file). In each case the user must provide an input buffer and an output buffer.

Function Documentation

void ELF_swapEhdr ( const Elf32_Ehdr *  inEhdr,
Elf32_Ehdr *  outEhdr 
)

Byte swap an ELF file header.

Byte swaps an ELF file header structure.

Parameters:
inEhdr A pointer to the ELF header.
outEhdr A buffer to hold the swapped output.

void ELF_swapRela ( const Elf32_Rela *  inRela,
Elf32_Rela *  outRela,
int  numEntries 
)

Byte swap an ELF relocation table.

Byte swaps an ELF relocation table.

Parameters:
inRela A pointer to the first entry in the relocation table.
outRela A buffer to hold the swapped output.
numEntries The number of entries in the relocation table.

void ELF_swapShdr ( const Elf32_Shdr *  inShdr,
Elf32_Shdr *  outShdr,
int  numEntries 
)

Byte swap an ELF file section header table.

Byte swaps an ELF section header table.

Parameters:
inShdr A pointer to the first entry in the section header table.
outShdr A buffer to hold the swapped output.
numEntries The number of entries in the section header table.

void ELF_swapSym ( const Elf32_Sym *  inSym,
Elf32_Sym *  outSym,
int  numEntries 
)

Byte swap an ELF file symbol table.

Byte swaps an ELF symbol table.

Parameters:
inSym A pointer to the first entry in the symbol table.
outSym A buffer to hold the swapped output.
numEntries The number of entries in the symbol table.


Generated on Wed Nov 21 22:22:31 2012 by  doxygen 1.5.8