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


Interface   Data Structures   File List   Data Fields   Globals  

elfreloc.c File Reference

Function definitions for ELF relocation utility. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <ELF/elfreloc.h>
#include <ELF/elf.h>
#include <ELF/elfPpc.h>
#include <ELF_private.h>

Classes

struct  _elfreloc_config

Typedefs

typedef struct _elfreloc_config elfreloc_config

Functions

static int elfreloc_init (elfreloc_config *config, const char *inName, const char *outName)
int elfreloc (const char *inName, const char *outName)
int main (int argc, char **argv)

Variables

static elfreloc_config erconfig


Detailed Description

Function definitions for ELF relocation utility.

Author:
D.L. Wood
These functions implement the ELF object file relocation utility. The user provides an input file name and an output file name. After removing the local relocation entries, the stripped ELF object is written to output. All of the relevant size and index information in the section headers is adjusted to reflect the removals.

Typedef Documentation

The type for _elfreloc_config.


Function Documentation

int elfreloc ( const char *  inName,
const char *  outName 
)

The VxWorks application entry point.

Parameters:
inName The name of the input ELF file.
outName The name of the processed output ELF file.
Return values:
0 Success.
-1 Failure.

References _elfreloc_config::buf, ELF_loadVerify(), ELF_SEC_NAME_SYM, ELF_SEC_NAME_TEXT, ELF_SEC_NAME_TEXT_REL, ELF_secFindByName(), elfreloc_init(), and _elfreloc_config::out_fd.

Referenced by main().

static int elfreloc_init ( elfreloc_config config,
const char *  inName,
const char *  outName 
) [static]

Initializes the application resources.

Parameters:
config The application global config info.
inName The input file name.
outName The output file name.
Return values:
0 Success.
-1 Failure.

References _elfreloc_config::buf, _elfreloc_config::in_name, _elfreloc_config::out_fd, and _elfreloc_config::out_name.

Referenced by elfreloc().

int main ( int  argc,
char **  argv 
)

The UNIX application entry point.

Parameters:
argc The number of command line arguments.
argv Pointer to the commane line arg strings.
Return values:
0 Success.
-1 Failure.

References elfreloc().


Variable Documentation

erconfig [static]

Application global configuration information.


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