Quote:
Originally Posted by Emufr3ak
After some research I discovered that Amos has commands to embedd binary files. With the method PLIST a binary can be loaded into memory. This code can get executed using the Call method. There is a caveat however. Amos only loads the first hunk.
|
Ok... so PLIST doesn't load a binary but the first hunk from an executable file or object file? That's an important difference, because then I assume it will also process the relocations for you.
Quote:
do a crosscompile for the c code. I do not have full control over the hunks there. How can I workaround this?
|
Usually a C compiler (and linker) can be convinced to create a minimum of two sections (using small-code and small-data model), but a single section is difficult with common tools.
Cowcat already mentioned vlink, which might be the solution here. I have some options for merging code sections, all data and bss sections for small-data, and merging all sections of the same type. Adding another option for merging all sections was a matter of 5 minutes.
Tomorrow's vlink snapshot at
http://sun.hasenbraten.de/vlink/index.php?view=source can do that with the new -mall option.
I don't know if your C developers have the knowledge to replace the GNU-linker with vlink to generate an executable. But vlink also works directly on executables and can convert them (while emitting some warnings). For example:
vlink -bamigahunk -mall -o newexe oldexe
.
Or does PLIST need an object file? I have no experience with Amos at all. Is there even an Amos compiler which can create object files from your Amos source?