\section{util/dll-src/genlds.c File Reference}
\label{genlds_8c}\index{util/dll-src/genlds.c@{util/dll-src/genlds.c}}
Brick\-OS linker script generation. 

{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include $<$string.h$>$}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf symbol\_\-t}
\begin{CompactList}\small\item\em symbol type. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf MAX\_\-SYMBOLS}\ 65536
\begin{CompactList}\small\item\em max symbols, enough for the RCX \item\end{CompactList}\item 
\#define {\bf MAX\_\-SYMLEN}\ 256
\begin{CompactList}\small\item\em max symbol length. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned {\bf read\_\-symbols} (FILE $\ast$f, {\bf symbol\_\-t} $\ast${\bf symbols}, unsigned max, unsigned $\ast$ram)
\begin{CompactList}\small\item\em read the kernel symbols from a file \item\end{CompactList}\item 
void {\bf print\_\-symbols} (FILE $\ast$f, {\bf symbol\_\-t} $\ast${\bf symbols}, unsigned num\_\-symbols)
\begin{CompactList}\small\item\em print the kernel symbols in linker script format. \item\end{CompactList}\item 
void {\bf print\_\-header} (FILE $\ast$f, const char $\ast$now, const char $\ast$kernel\_\-name, unsigned ram, unsigned kernlen, unsigned ramlen)
\begin{CompactList}\small\item\em print the linker script header. \item\end{CompactList}\item 
void {\bf print\_\-footer} (FILE $\ast$f)
\begin{CompactList}\small\item\em print the linker script footer. \item\end{CompactList}\item 
int {\bf main} (int argc, char $\ast$argv[$\,$])
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
{\bf symbol\_\-t} {\bf symbols} [MAX\_\-SYMBOLS]
\begin{CompactList}\small\item\em the list of symbols \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Brick\-OS linker script generation. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}


Definition in file {\bf genlds.c}.

\subsection{Define Documentation}
\index{genlds.c@{genlds.c}!MAX_SYMBOLS@{MAX\_\-SYMBOLS}}
\index{MAX_SYMBOLS@{MAX\_\-SYMBOLS}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MAX\_\-SYMBOLS\ 65536}\label{genlds_8c_a0}


max symbols, enough for the RCX 



Definition at line 30 of file genlds.c.

Referenced by main().\index{genlds.c@{genlds.c}!MAX_SYMLEN@{MAX\_\-SYMLEN}}
\index{MAX_SYMLEN@{MAX\_\-SYMLEN}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MAX\_\-SYMLEN\ 256}\label{genlds_8c_a1}


max symbol length. 



Definition at line 31 of file genlds.c.

Referenced by read\_\-symbols().

\subsection{Function Documentation}
\index{genlds.c@{genlds.c}!main@{main}}
\index{main@{main}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int main (int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{genlds_8c_a7}




Definition at line 282 of file genlds.c.

References MAX\_\-SYMBOLS, NULL, print\_\-footer(), print\_\-header(), print\_\-symbols(), read\_\-symbols(), and symbols.\index{genlds.c@{genlds.c}!print_footer@{print\_\-footer}}
\index{print_footer@{print\_\-footer}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void print\_\-footer (FILE $\ast$ {\em f})\hspace{0.3cm}{\tt  [static]}}\label{genlds_8c_a6}


print the linker script footer. 



Definition at line 153 of file genlds.c.

Referenced by main().\index{genlds.c@{genlds.c}!print_header@{print\_\-header}}
\index{print_header@{print\_\-header}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void print\_\-header (FILE $\ast$ {\em f}, const char $\ast$ {\em now}, const char $\ast$ {\em kernel\_\-name}, unsigned {\em ram}, unsigned {\em kernlen}, unsigned {\em ramlen})\hspace{0.3cm}{\tt  [static]}}\label{genlds_8c_a5}


print the linker script header. 



Definition at line 92 of file genlds.c.

Referenced by main().\index{genlds.c@{genlds.c}!print_symbols@{print\_\-symbols}}
\index{print_symbols@{print\_\-symbols}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void print\_\-symbols (FILE $\ast$ {\em f}, {\bf symbol\_\-t} $\ast$ {\em symbols}, unsigned {\em num\_\-symbols})\hspace{0.3cm}{\tt  [static]}}\label{genlds_8c_a4}


print the kernel symbols in linker script format. 



Definition at line 84 of file genlds.c.

References symbols.

Referenced by main().\index{genlds.c@{genlds.c}!read_symbols@{read\_\-symbols}}
\index{read_symbols@{read\_\-symbols}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned read\_\-symbols (FILE $\ast$ {\em f}, {\bf symbol\_\-t} $\ast$ {\em symbols}, unsigned {\em max}, unsigned $\ast$ {\em ram})\hspace{0.3cm}{\tt  [static]}}\label{genlds_8c_a3}


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().

\subsection{Variable Documentation}
\index{genlds.c@{genlds.c}!symbols@{symbols}}
\index{symbols@{symbols}!genlds.c@{genlds.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf symbol\_\-t} {\bf symbols}[MAX\_\-SYMBOLS]}\label{genlds_8c_a2}


the list of symbols 



Definition at line 40 of file genlds.c.

Referenced by main(), print\_\-symbols(), and read\_\-symbols().