main.c File Reference

Contains the programs entry point and flow control. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "list.h"
#include "objectFile.h"

Include dependency graph for main.c:

Go to the source code of this file.

Defines

#define SO_LINKER   "ld"
 The default linker.
#define SO_DUMPER   "objdump"
 The object file dumper.
#define SO_DPARAM   "-rh"
 Parameters for the dumper.
#define SO_DFILE   ".-"
 Temporary file for the dumper.
#define SO_REMOVER   "objcopy"
 Object copy tool.
#define SO_RRMV   "-R"
 Parameter to remove sections.
#define SO_PIPE   ">"
 Pipe symbol.
#define SO_DUMP_CMDLN   1
#define SO_DUMP_DISCARTED   2
#define SO_DUMP_USED   4
#define SO_OBJECTS   8
#define SO_HELP   16
#define SO_DUMP_MAP   32
#define SO_DNRM   64
#define SO_COLLECT   128
#define SO_SC(tar, txt)

Functions

int main (int argc, const char *argv[])

Variables

static const char * hlp


Detailed Description

Contains the programs entry point and flow control.

Author:
Dorian Weber

Definition in file main.c.


Define Documentation

#define SO_COLLECT   128

Definition at line 55 of file main.c.

#define SO_DFILE   ".-"

Temporary file for the dumper.

Definition at line 27 of file main.c.

#define SO_DNRM   64

Definition at line 54 of file main.c.

#define SO_DPARAM   "-rh"

Parameters for the dumper.

Definition at line 26 of file main.c.

#define SO_DUMP_CMDLN   1

Definition at line 48 of file main.c.

#define SO_DUMP_DISCARTED   2

Definition at line 49 of file main.c.

#define SO_DUMP_MAP   32

Definition at line 53 of file main.c.

#define SO_DUMP_USED   4

Definition at line 50 of file main.c.

#define SO_DUMPER   "objdump"

The object file dumper.

Definition at line 25 of file main.c.

#define SO_HELP   16

Definition at line 52 of file main.c.

#define SO_LINKER   "ld"

The default linker.

Definition at line 24 of file main.c.

#define SO_OBJECTS   8

Definition at line 51 of file main.c.

#define SO_PIPE   ">"

Pipe symbol.

Definition at line 30 of file main.c.

#define SO_REMOVER   "objcopy"

Object copy tool.

Definition at line 28 of file main.c.

#define SO_RRMV   "-R"

Parameter to remove sections.

Definition at line 29 of file main.c.

#define SO_SC ( tar,
txt   ) 

Value:

{\
  const char* data = txt;\
  while ((*tar = *data++))\
    ++tar;\
}

Definition at line 58 of file main.c.


Function Documentation

int main ( int  argc,
const char *  argv[] 
)

Definition at line 65 of file main.c.


Variable Documentation

const char* hlp [static]

Initial value:

 "Usage: deadstrip [options] file...\n"
    "Options:\n"
    "  --help                display this HELP\n"
    "  --dcmd                Dumps the ComManD line\n"
    "  --ddis                Dumps DIScarted sections\n"
    "  --duse                Dumps USEd sections\n"
    "  --dmap                Dump the dependency MAP\n"
    "  --linker <filename>   use alternative LINKER (default: "SO_LINKER")\n"
    "  --dnrm                Do Not ReMove any sections\n"
    "  --save <item>         SAVE an item and its dependencies\n"
    "    > just pass the decorated variable/function name, not the section\n"
    "    > the main function gets saved by default\n"
    "\n"
    "Version 1.1\n"
    "Last compiled on "__DATE__".\n"

Definition at line 32 of file main.c.


Generated on Fri Jun 5 15:31:57 2009 for DeadStrip Utility by  doxygen 1.5.8