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

genlds.c File Reference

BrickOS linker script generation. More...

#include <stdio.h>
#include <time.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  symbol_t
 symbol type. More...

Defines

#define MAX_SYMBOLS   65536
 max symbols, enough for the RCX
#define MAX_SYMLEN   256
 max symbol length.

Functions

unsigned read_symbols (FILE *f, symbol_t *symbols, unsigned max, unsigned *ram)
 read the kernel symbols from a file
void print_symbols (FILE *f, symbol_t *symbols, unsigned num_symbols)
 print the kernel symbols in linker script format.
void print_header (FILE *f, const char *now, const char *kernel_name, unsigned ram, unsigned kernlen, unsigned ramlen)
 print the linker script header.
void print_footer (FILE *f)
 print the linker script footer.
int main (int argc, char *argv[])

Variables

symbol_t symbols [MAX_SYMBOLS]
 the list of symbols


Detailed Description

BrickOS linker script generation.

Author:
Markus L. Noga <markus@noga.de>

Definition in file genlds.c.


Define Documentation

#define MAX_SYMBOLS   65536
 

max symbols, enough for the RCX

Definition at line 30 of file genlds.c.

Referenced by main().

#define MAX_SYMLEN   256
 

max symbol length.

Definition at line 31 of file genlds.c.

Referenced by read_symbols().


Function Documentation

int main int  argc,
char *  argv[]
 

Definition at line 282 of file genlds.c.

References MAX_SYMBOLS, NULL, print_footer(), print_header(), print_symbols(), read_symbols(), and symbols.

void print_footer FILE *  f  )  [static]
 

print the linker script footer.

Definition at line 153 of file genlds.c.

Referenced by main().

void print_header FILE *  f,
const char *  now,
const char *  kernel_name,
unsigned  ram,
unsigned  kernlen,
unsigned  ramlen
[static]
 

print the linker script header.

Definition at line 92 of file genlds.c.

Referenced by main().

void print_symbols FILE *  f,
symbol_t symbols,
unsigned  num_symbols
[static]
 

print the kernel symbols in linker script format.

Definition at line 84 of file genlds.c.

References symbols.

Referenced by main().

unsigned read_symbols FILE *  f,
symbol_t symbols,
unsigned  max,
unsigned *  ram
[static]
 

read the kernel symbols from a file

Definition at line 43 of file genlds.c.

References symbol_t::addr, MAX_SYMLEN, strcmp(), and symbols.

Referenced by main().


Variable Documentation

symbol_t symbols[MAX_SYMBOLS]
 

the list of symbols

Definition at line 40 of file genlds.c.

Referenced by main(), print_symbols(), and read_symbols().


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