Related to that, here's my PHP library for inserting stuff into a ROM according to a list of free space. It is the little brother of the system I have in
Chronotools.
It does automatic tail-head merging of partially/wholly identical pieces of data, linking of inter-object references, and attempts to organize the potentially thousands of pieces into the given stripes of free space in a manner that results in most optimal filling.
It is aware of restrictions like "this object must be stored in a pre-defined location" or "these 200 objects must be placed in the same memory bank, whatever that may be".
Source code / download:
http://bisqwit.iki.fi/src/romlinker_php.zip
The field of use for this library is in ROM hacking. I used it in the creation of my
Finnish translation patch of Simon's Quest.
See inc/linker.php , which contains phpDocumentor compatible documentation.