XFLAT Shared Library Support Tools

<<Index>>

Table of Contents


XFLAT Tools Overview

The Makefile in the xflat/tools directory builds five PC-based tools. The primary tools are:

xflat-ld uses lower level sub-processes to accomplish it task. Normally, you will not have to interact with these tools directory. These include:

These tools and their interrelationships are discussed below.

xflat-gcc

xflat-gcc is a very simple "wrapper" program. This program provides some some wrapper logic for gcc: It simply inserts the files in xflat/arch-include into the standard include path. This allows header files in xflat/arch-include to replace certain header files normally included by gcc. This replacement is necessary to support sharing of global variables between different xFLT modules in a manner that is complete transparent to the user application.

The xflat-gcc command line parameters are simply those of gcc.

xflat-ld

xflat-ld is another, relatively simple "wrapper" program that combines of the operations of the lower level sub-process, ldelflib and ldelf2xflt (see below). xflat-ld is a replacement tool for GNU ld. It accepts a subset of the GNU ld command line arguments. For most uses, it has the same "look and feel" as GNU ld; differing in that it generates xFLT binaries.

If you type ./xflat-ld --help you will the current usage for the tool. At present, this is:

Sample Makefile

The "Hello, World!" example resides in xflat/tests/hello. The Makefile in that directory builds hello using the low level tools, ldelflib and ldelf2xflt. The following Makefile is functionally equivalent, but illustrates how the make is simplified by xflat-gcc and xflat-ld.

readxflat

The readxflat is analogous to dump_flat but significantly more complex. It reads an xFLT binary and prints information about the content of the binary.

If you type 'readxflat' you will get the current usage of for the tool. At present, this usage for a litte-endian target:

When compiled for a big-endian target, the behavior of the -b option is slightly different:

ldelflib

ldelflib is a post processing tool that receives a partially linked set of objects as its input and generates a source code file. This source code file contains all of the logic necessary to support shared libraries.

ldelflib is managed by the wrapper, xflat-ld. You should not normally have to interact with it directly. If you type 'ldelflib' you will get the current usage of for the tool. At present, this is:

ldelf2xflt

ldelf2xflt is a derivative of flat's ldelf2flt. It has been extended to "understand" the special logic and symbology of the special source file generated by ldelflib. Given a partially linked ELF file (one that includes the assembled source generated by ldelflib), this tool will generate an xFLT program or shared library, ready for execution on the target machine.

ldelf2xlft is managed by the wrapper, xflat-ld. You should not normally have to interact with it directly. If you type 'ldelf2xlft' you will get the current usage of for the tool. At present, this is:


<<Table of Contents>>
<<Index>>

Copyright 2002 by Cadenux, LLC. All rights reserved.