XFLAT Directory Structure

<<Index>>

Directory Content
xflat/arch-include This directory contains header files that intended be included only by the user space target applications. Compare to xflat/sys-include.
xflat/kernel/binfmt This directory contains kernel plug-in modules that enable the kernel to recognized xFLT binary files. These plug-ins are installed via:

    insmod binfmt_xflat

If an xFLT program fails to execute, one possibility is that you may have forgotten to install this module.

xflat/kernel/binfmt/linux-2.0 This directory provides the binfmt_xflat module for the linux-2.0.x kernel.
xflat/kernel/binfmt/linux-2.4 This directory provides the binfmt_xflat module for the linux-2.4.x kernel.
xflat/kernel/binfmt/linux-2.6 This directory provides the binfmt_xflat module for the linux-2.6.x kernel.
xflat/kernel/patches This directory provides various patches to (1) incorporate XFALT signal handling into the Linux kernel, and (2) to install the binfmt_xflat source files into the kernel tree (vs. building binfmt_xflat outside of the kernel source tree as a kernel module).
xflat/Documentation Miscellaneous documentation for the Shared Library support software.
xflat/gcc Miscellaneous information about compiler support issues.
xflat/ldso The xflat dynamic loader.
xflat/ldso/xflat-ldso The directory xflat-ldso contains the xflat dynamic loader for the target architecture. This is the loader that is installed in the target machine's file system.
xflat/ldso/simldso The directory simldso contains a test harness that can be used to execute all most of the binfmt_xflat logic and most of the ld-xflat.so logic on the host machine -- everything up to the point where control is handed off to the application's _start entry point. Look at the scripts dohello and dohello-nolibc for information on using the simulator.
xflat/libc Includes: (1) A makefile that will build the xflat C library, libc-xflat.so.1, from whatever version of libc you are currently using, and (2) special C startup files (crt0.o) for xflat shared libraries.
xflat/sys-include This directory contains header files that are only for inclusion by host-based programs and by target system code. Note that this directory simply contains links to a subset of the header files in xflat/arch-include
xflat/tests Contains several subdirectories that provide both tests and examples of the xflat shared library support.
xflat/tests/thunk This test builds a *flat* executable but forces an xflat-style "thunk" layer between two flat functions. This allows you to use the flat tool chain to debug the lowest level xflat thunk assembly language. Could be useful! But, this test does not currently execute due to compiler issues! (see xflat/gcc/README).
xflat/tests/hello-nolibc This test generates its output via kernel syscalls. As a result, it can be used before you have a working libc-xflat.so. This test will verify that:

  • binfmt_xflat and ld-xflat.so can load and start an xflat program.

  • That the stack received by the application is valid (argc, argv, envp), and

  • It attempts one very highly instrumented shared library call (into a function exported by ld-xflat.so). The call, however, is redirected to other logic that dumps all of the registers and provides diagnostic information.
xflat/tests/hello The standard hello world program that talks to the console via libc-xflat.so using printf statements. This demonstrates:

  • Basic shared library operations, and

  • That the stack received by the application is valid (argc, argv, envp).
xflat/tests/errno Provides a tests of access to global variables exported from the libc shared library: stdout, stderr, errno.
xflat/tests/fcnptr Provides of test of the logic to pass function pointers between modules and to perform callbacks using these function pointers from within a shared library. this test does not currently execute due to compiler issues! (see xflat/gcc/README).
xflat/xflatlib This directory contains common xFLT logic -- the xflatlib. This library of routines is used to standardize access to xFLT files. This library is used by the xflat/binfmt kernel modules, by the xFLT dynamic loader in xflat/ldso/xflat-ldso, and by the simulation in xflat/ldso/simldso.

<<Index>>

Copyright 2002 by Cadenux, LLC. All rights reserved.