Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

convert.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
#include <srecload.h>
#include <lx.h>
#include <getopt.h>

Go to the source code of this file.

Defines

#define DEFAULT_STACK_SIZE   1024
 default program stack size
#define RELOC_MAX   16384
 maximum number of relocations
#define HAVE_GETOPT_LONG   1

Functions

void lx_from_images (lx_t *lx, image_t *img, unsigned short stack_size)
 build BrickOS executable from images
int main (int argc, char **argv)
 the user main()

Variables

const struct option long_options []
 long command-line options
int verbose_flag = 0
 display some diagnostics if non-zero


Define Documentation

#define DEFAULT_STACK_SIZE   1024
 

default program stack size

Definition at line 43 of file convert.c.

#define HAVE_GETOPT_LONG   1
 

Definition at line 50 of file convert.c.

#define RELOC_MAX   16384
 

maximum number of relocations

Definition at line 44 of file convert.c.

Referenced by lx_from_images().


Function Documentation

void lx_from_images lx_t lx,
image_t img,
unsigned short  stack_size
 

build BrickOS executable from images

the segment sizes and start offset need to be set already.

Definition at line 76 of file convert.c.

References lx_t::base, image_t::base, lx_t::bss_size, image_t::bss_size, lx_t::data_size, image_t::data_size, exit(), malloc(), memcpy(), lx_t::num_relocs, lx_t::offset, image_t::offset, lx_t::reloc, RELOC_MAX, lx_t::stack_size, image_t::text, lx_t::text, lx_t::text_size, image_t::text_size, and lx_t::version.

Referenced by main().

int main int  argc,
char **  argv
 

the user main()

Definition at line 165 of file convert.c.

References lx_t::base, lx_t::bss_size, lx_t::data_size, exit(), image_load(), long_options, lx_from_images(), lx_write(), lx_t::num_relocs, lx_t::offset, lx_t::stack_size, lx_t::text_size, verbose_flag, and lx_t::version.


Variable Documentation

const struct option long_options[] [static]
 

Initial value:

{
  {"stack"  ,required_argument,0,'s'},
  {"verbose",no_argument      ,0,'v'},
  {"display",no_argument      ,0,'d'},
  {0        ,0                ,0,0  }
}
long command-line options

Definition at line 57 of file convert.c.

Referenced by main().

int verbose_flag = 0
 

display some diagnostics if non-zero

Definition at line 70 of file convert.c.

Referenced by main().


Generated on Fri Feb 25 08:02:45 2005 for brickos by  doxygen 1.3.9.1