GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ELF / V1-1-3 > elf_show / rhel4-32
#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. |
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.
The type for _ELF_Dump_Info.
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.
file | A pointer to an ELF file memory image. | |
size | The size in bytes of the ELF memory image. |
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.
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.
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.
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.
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().