GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ELF / V1-1-3 > elfreloc / mv2304
#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 |
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.
The type for _elfreloc_config.
int elfreloc | ( | const char * | inName, | |
const char * | outName | |||
) |
The VxWorks application entry point.
inName | The name of the input ELF file. | |
outName | The name of the processed output ELF file. |
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.
config | The application global config info. | |
inName | The input file name. | |
outName | The output file name. |
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.
argc | The number of command line arguments. | |
argv | Pointer to the commane line arg strings. |
0 | Success. | |
-1 | Failure. |
References elfreloc().
erconfig [static] |
Application global configuration information.