Question: I am looking for recommendations for a tool that will let me construct a binary image out of a series of smaller images.

I have an embedded system with a flash ROM that I program using a single image. That image consists of a series of smaller objects (data, compiled code, etc) placed at specific offsets. The build system I inherited uses a disturbing amalgam of old 16-bit DOS utilities to hack the image together. I was hoping to find a modern tool that would do the job in a less arcane (and less bug-prone) manner.

The tool needs to be able to run from a config file. That is, I specify that file A.bin needs to be placed at offset 4KB, file B.bin needs to be placed at offset 16KB, etc etc in a configuration file so that the tool does not require repeated manual command-line invocations. This is mainly because we have another system that will be auto-generating these config files.

The tool also needs to be open source (or at a minimum, cross-platform). We have developers using Windows and automated build systems using Linux and the tool would need to work on both.

I have debated hacking together my own utility in C, but before I went through all the trouble developing and debugging I wanted to ask and see if someone knew of a tool that was already out there that I missed.

**Edit:** Cygwin-related tools are unfortunately not an option for us. One of our critical build tools will crash if it is run on a system with Cygwin installed (I think it uses a specific, older cygwin DLL but that's an entirely different fiasco unto itself).

Answer: 
[dd](http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html) would be definitively your best friend.

Use cygwin for windows users.
The Elfweaver utility that is distributed with OKL4 may be appropriate for you. From the manual:
"Elfweaver is a tool that may be used to manipulate ELF files. Elfweaver is written as a Python 2.3 application that only uses cross-platform libraries. Therefore Elfweaver should run on Linux, Mac-OS X and Windows. The main functionality of Elfweaver is that it allows the user to merge multiple ELF files into a single ELF file"
<http://wiki.ok-labs.com/downloads/release-3.0/okl4-ref-manual-3.0.pdf>

If you think that looks suitable, you can get the tool along with the okl4 source code from the OKL4 website.