GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ELF / V1-1-3 > elf_show / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

ELF_show.c File Reference

Function definitions for ELF dump library. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ELF/ELF_show.h>
#include <ELF/ELF_swap.h>
#include <ELF/elf.h>
#include <ELF_private.h>

Classes

struct  _ELF_Dump_Info

Typedefs

typedef struct _ELF_Dump_Info ELF_Dump_Info

Functions

static void ELF_showSection (const ELF_Dump_Info *info, const Elf32_Shdr *shdr)
static void ELF_showSymtab (const ELF_Dump_Info *info, const Elf32_Shdr *shdr)
static void ELF_showRela (const ELF_Dump_Info *info, const Elf32_Shdr *shdr)
static void ELF_showStrtab (const ELF_Dump_Info *info, const Elf32_Shdr *shdr)
int ELF_show (const void *file, int size)
 Show the contents of an ELF file.


Detailed Description

Function definitions for ELF dump library.

Author:
D.L. Wood
These functions work on ELF object file structures which are available already in memory (not file). The contents of the ELF structures are printed to stdout.

Typedef Documentation

The type for _ELF_Dump_Info.


Function Documentation

int ELF_show ( const void *  file,
int  size 
)

Show the contents of an ELF file.

The contents of the ELF file are printed to standard out.

Parameters:
file A pointer to an ELF file memory image.
size The size in bytes of the ELF memory image.
Return values:
0 Success.
-1 Failure.

References _ELF_Dump_Info::buf, _ELF_Dump_Info::ehdr, ELF_showSection(), ELF_swapEhdr(), ELF_swapShdr(), _ELF_Dump_Info::shtab, and _ELF_Dump_Info::strtab.

static void ELF_showRela ( const ELF_Dump_Info info,
const Elf32_Shdr *  shdr 
) [static]

Prints the contents of an ELF relocation table.

Parameters:
info ELF file addresses.
shdr The relocation table section header entry.

References _ELF_Dump_Info::buf, ELF_swapRela(), ELF_swapSym(), _ELF_Dump_Info::shtab, and _ELF_Dump_Info::strtab.

Referenced by ELF_showSection().

static void ELF_showSection ( const ELF_Dump_Info info,
const Elf32_Shdr *  shdr 
) [static]

Prints the generic attributes of an ELF section. Symbol and relocation tables generate more detailed output.

Parameters:
info ELF file addresses.
shdr A pointer to the section header entry for the target section.

References ELF_showRela(), ELF_showStrtab(), ELF_showSymtab(), and _ELF_Dump_Info::strtab.

Referenced by ELF_show().

static void ELF_showStrtab ( const ELF_Dump_Info info,
const Elf32_Shdr *  shdr 
) [static]

Prints the contents of an ELF string table.

Parameters:
info ELF file addresses.
shdr The relocation table section header entry.

References _ELF_Dump_Info::buf.

Referenced by ELF_showSection().

static void ELF_showSymtab ( const ELF_Dump_Info info,
const Elf32_Shdr *  shdr 
) [static]

Prints the contents of an ELF symbol table.

Parameters:
info ELF file addresses.
shdr The symbol table section header entry.

References _ELF_Dump_Info::buf, ELF_swapSym(), _ELF_Dump_Info::shtab, and _ELF_Dump_Info::strtab.

Referenced by ELF_showSection().


Generated on Fri Sep 30 19:21:40 2011 by  doxygen 1.5.8