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


Interface   Data Structures   File List   Data Fields   Globals  

ELF_private.h File Reference

Definitions for shared private ELF package utilities. More...

#include <ELF/elf.h>

Defines

#define ELF_SEC_NAME_TEXT   ".text"
#define ELF_SEC_NAME_TEXT_REL   ".rela.text"
#define ELF_SEC_NAME_DATA   ".data"
#define ELF_SEC_NAME_DATA_REL   ".rela.data"
#define ELF_SEC_NAME_RODATA   ".rodata"
#define ELF_SEC_NAME_RODATA_REL   ".rela.rodata"
#define ELF_SEC_NAME_BSS   ".bss"
#define ELF_SEC_NAME_SYM   ".symtab"
#define ELF_SEC_NAME_STR   ".strtab"
#define ELF_SEC_NAME_SEC_STR   ".shstrtab"

Functions

int ELF_loadVerify (const void *file)
 Verify ELF object format.
Elf32_Shdr * ELF_secFindByName (const char *name, const Elf32_Ehdr *ehdr, const Elf32_Shdr *shdr, const char *strTable)
 Find a section header by name.


Detailed Description

Definitions for shared private ELF package utilities.

Author:
D.L. Wood

Define Documentation

#define ELF_SEC_NAME_BSS   ".bss"

The name of the uninitialized data section.

#define ELF_SEC_NAME_DATA   ".data"

The name of the data section.

#define ELF_SEC_NAME_DATA_REL   ".rela.data"

The name of the data relocation section.

#define ELF_SEC_NAME_RODATA   ".rodata"

The name of the read-only data section.

#define ELF_SEC_NAME_RODATA_REL   ".rela.rodata"

The name of the read-only data relocation section.

#define ELF_SEC_NAME_SEC_STR   ".shstrtab"

The name of the section header string section.

#define ELF_SEC_NAME_STR   ".strtab"

The name of the symbol table string section.

#define ELF_SEC_NAME_SYM   ".symtab"

The name of the symbol table section.

Referenced by elfreloc().

#define ELF_SEC_NAME_TEXT   ".text"

The name of the text section.

Referenced by elfreloc().

#define ELF_SEC_NAME_TEXT_REL   ".rela.text"

The name of the text relocation section.

Referenced by elfreloc().


Function Documentation

int ELF_loadVerify ( const void *  file  ) 

Verify ELF object format.

The contents of the file buffer are checked to verify if it contains an ELF file of the proper format for loading.

Parameters:
file A pointer to an ELF file image.
Return values:
0 Success.
-1 The file is not in the proper format for loading.

Referenced by elfreloc().

Elf32_Shdr * ELF_secFindByName ( const char *  name,
const Elf32_Ehdr *  ehdr,
const Elf32_Shdr *  shdr,
const char *  strTable 
)

Find a section header by name.

Searches the section header table at shdr to find a section name match with name.

Parameters:
name The name of the section.
ehdr A pointer to the ELF file header.
shdr A pointer to the ELF file section header table.
strTable A pointer to the section header string table.
Returns:
A pointer to the section header entry, or NULL if the section could not be found.

Referenced by elfreloc().


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