\hypertarget{elfreloc_8c}{
\section{elfreloc.c File Reference}
\label{elfreloc_8c}\index{elfreloc.c@{elfreloc.c}}
}
Function definitions for ELF relocation utility.  


{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$fcntl.h$>$}\par
{\tt \#include $<$sys/types.h$>$}\par
{\tt \#include $<$sys/stat.h$>$}\par
{\tt \#include $<$ELF/elfreloc.h$>$}\par
{\tt \#include $<$ELF/elf.h$>$}\par
{\tt \#include $<$ELF/elfPpc.h$>$}\par
{\tt \#include $<$ELF\_\-private.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__elfreloc__config}{\_\-elfreloc\_\-config}
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef struct \hyperlink{struct__elfreloc__config}{\_\-elfreloc\_\-config} \hyperlink{elfreloc_8c_3a4eef8b53b7a668a8efed25f8bb55a0}{elfreloc\_\-config}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static int \hyperlink{elfreloc_8c_dd4b6837e7112203a04d480427f9f7b6}{elfreloc\_\-init} (\hyperlink{struct__elfreloc__config}{elfreloc\_\-config} $\ast$config, const char $\ast$inName, const char $\ast$outName)
\item 
int \hyperlink{elfreloc_8c_c61782949e7afef29c51414662e8d805}{elfreloc} (const char $\ast$inName, const char $\ast$outName)
\item 
int \hyperlink{elfreloc_8c_3c04138a5bfe5d72780bb7e82a18e627}{main} (int argc, char $\ast$$\ast$argv)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static \hyperlink{struct__elfreloc__config}{elfreloc\_\-config} \hyperlink{elfreloc_8c_41f356d7b401db3a20cfbbcc4400b436}{erconfig}
\end{CompactItemize}


\subsection{Detailed Description}
Function definitions for ELF relocation utility. 

\begin{Desc}
\item[Author:]D.L. Wood\end{Desc}
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. 

\subsection{Typedef Documentation}
\hypertarget{elfreloc_8c_3a4eef8b53b7a668a8efed25f8bb55a0}{
\index{elfreloc.c@{elfreloc.c}!elfreloc\_\-config@{elfreloc\_\-config}}
\index{elfreloc\_\-config@{elfreloc\_\-config}!elfreloc.c@{elfreloc.c}}
\subsubsection[{elfreloc\_\-config}]{\setlength{\rightskip}{0pt plus 5cm}{\bf elfreloc\_\-config}}}
\label{elfreloc_8c_3a4eef8b53b7a668a8efed25f8bb55a0}


The type for \hyperlink{struct__elfreloc__config}{\_\-elfreloc\_\-config}. 

\subsection{Function Documentation}
\hypertarget{elfreloc_8c_c61782949e7afef29c51414662e8d805}{
\index{elfreloc.c@{elfreloc.c}!elfreloc@{elfreloc}}
\index{elfreloc@{elfreloc}!elfreloc.c@{elfreloc.c}}
\subsubsection[{elfreloc}]{\setlength{\rightskip}{0pt plus 5cm}int elfreloc (const char $\ast$ {\em inName}, \/  const char $\ast$ {\em outName})}}
\label{elfreloc_8c_c61782949e7afef29c51414662e8d805}


The VxWorks application entry point.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em inName}]The name of the input ELF file. \item[{\em outName}]The name of the processed output ELF file.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Success. \item[{\em -1}]Failure. \end{description}
\end{Desc}


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().\hypertarget{elfreloc_8c_dd4b6837e7112203a04d480427f9f7b6}{
\index{elfreloc.c@{elfreloc.c}!elfreloc\_\-init@{elfreloc\_\-init}}
\index{elfreloc\_\-init@{elfreloc\_\-init}!elfreloc.c@{elfreloc.c}}
\subsubsection[{elfreloc\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}static int elfreloc\_\-init ({\bf elfreloc\_\-config} $\ast$ {\em config}, \/  const char $\ast$ {\em inName}, \/  const char $\ast$ {\em outName})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{elfreloc_8c_dd4b6837e7112203a04d480427f9f7b6}


Initializes the application resources.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em config}]The application global config info. \item[{\em inName}]The input file name. \item[{\em outName}]The output file name.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Success. \item[{\em -1}]Failure. \end{description}
\end{Desc}


References \_\-elfreloc\_\-config::buf, \_\-elfreloc\_\-config::in\_\-name, \_\-elfreloc\_\-config::out\_\-fd, and \_\-elfreloc\_\-config::out\_\-name.

Referenced by elfreloc().\hypertarget{elfreloc_8c_3c04138a5bfe5d72780bb7e82a18e627}{
\index{elfreloc.c@{elfreloc.c}!main@{main}}
\index{main@{main}!elfreloc.c@{elfreloc.c}}
\subsubsection[{main}]{\setlength{\rightskip}{0pt plus 5cm}int main (int {\em argc}, \/  char $\ast$$\ast$ {\em argv})}}
\label{elfreloc_8c_3c04138a5bfe5d72780bb7e82a18e627}


The UNIX application entry point.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em argc}]The number of command line arguments. \item[{\em argv}]Pointer to the commane line arg strings.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Success. \item[{\em -1}]Failure. \end{description}
\end{Desc}


References elfreloc().

\subsection{Variable Documentation}
\hypertarget{elfreloc_8c_41f356d7b401db3a20cfbbcc4400b436}{
\index{elfreloc.c@{elfreloc.c}!erconfig@{erconfig}}
\index{erconfig@{erconfig}!elfreloc.c@{elfreloc.c}}
\subsubsection[{erconfig}]{\setlength{\rightskip}{0pt plus 5cm}{\bf erconfig}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{elfreloc_8c_41f356d7b401db3a20cfbbcc4400b436}


Application global configuration information. 