ELF to bFLT (binary flat) converter for no-mmu Linux targets
C Shell M4 Makefile C++
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6d80ab6 Mar 20, 2017
Failed to load latest commit information.
tests start a testsuite Dec 24, 2015
travis travis: drop unused TARGETS variable Mar 1, 2017
.gitignore start a testsuite Dec 24, 2015
.travis.yml enable travis builds w/github Dec 24, 2015
LICENSE.TXT Use new FSF address in GPL notices Jan 14, 2016
Makefile.in Symlink required binutils/BFD headers to local dir Mar 17, 2017
README.md README: update file listing Jan 14, 2016
compress.c Unify the duplicated windows and other system fallback logic in stubs.h Jul 7, 2009
compress.h when debugging a flat loader problem involving relocs, i found it very Nov 2, 2008
config.guess autotools: regenerate Dec 18, 2015
config.sub autotools: regenerate Dec 18, 2015
configure Symlink required binutils/BFD headers to local dir Mar 17, 2017
configure.ac Symlink required binutils/BFD headers to local dir Mar 17, 2017
e1-elf2flt.ld Find attached the patch for the elf2flt utility. Except the elf2flt.c… Nov 11, 2003
elf2flt.c elf2flt: clean up elf headers dependencies Mar 1, 2017
elf2flt.ld.in allow to build arm flat binaries Mar 19, 2016
flat.h the flat.h header uses things like uint32_t but does not pull in the Jul 6, 2009
flthdr.c flthdr: drop unused mkstemp define Sep 13, 2016
install-sh autotools: regenerate Dec 18, 2015
ld-elf2flt.c elf2flt/ld-elf2flt: clean up build time warnings Dec 18, 2015
ld-elf2flt.in Due to shell portability issues (which is to say shell scripts are not Jul 12, 2009
stubs.c Due to shell portability issues (which is to say shell scripts are not Jul 12, 2009
stubs.h Make varargs debug macros GCC-2.x compatible. Jan 22, 2010



Build Status

Copyright (C) 2001-2003, SnapGear (www.snapgear.com) David McCullough ucdevel@gmail.com Greg Ungerer gerg@uclinux.org

This is Free Software, under the GNU Public License v2 or greater. See LICENSE.TXT for more details.

Elf2flt with PIC, ZFLAT and full reloc support. Currently supported targets include: m68k/ColdFire, ARM, Sparc, NEC v850, MicroBlaze, h8300, SuperH, and Blackfin.


You need an appropriate libbfd.a and libiberty.a for your target to build this tool. They are normally part of the binutils package.

To compile elf2flt do:

./configure --target=<ARCH> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
make install

The argument to configure specifies what the target architecture is. This should be the same target as you used to build the binutils and gcc cross development tools. The --with-libbfd and --with-libiberty arguments specify where the libbfd.a and libiberty.a library files are to use.


  • README.md - this file
  • configure - autoconf configuration shell script
  • configure.ac - original autoconf file
  • config.* - autoconf support scripts
  • Makefile.in - Makefile template used by configure
  • elf2flt.c - the source
  • flthdr.c - flat header manipulation program
  • flat.h - header from uClinux kernel sources
  • elf2flt.ld - an example linker script that works for C/C++ and uClinux
  • ld-elf2flt - A linker replacement that implements a -elf2flt option for the linker and runs elf2flt automatically for you. It auto detects PIC/non-PIC code and adjusts its option accordingly. It uses the environment variable FLTFLAGS when running elf2flt. It runs /.../-ld.real to do the actual linking.
  • stubs.c - Support for various functions that your OS might be missing.


The ld-elf2flt produces 2 files as output. The binary flat file X, and X.gdb which is used for debugging and PIC purposes.

The -p option requires an elf executable linked at address 0. The elf2flt.ld provided will generate the correct format binary when linked with the real linker with no -r option for the linker.

The -r flag can be added to PIC builds to get contiguous code/data. This is good for loading application symbols into gdb (add-symbol-file XXX.gdb).


You can use the github site to file issues and send pull requests, and the uclinux-dev@uclinux.org mailing list to contact the developers.