Mail Archives: djgpp/1997/08/16/23:34:21
TW wrote:
>
> The binary files I want to add to the exe-file is just small data-files
> wich I want to access by pointers. For example sprite-objects, fonts,
> palettes etc.
As you don't want to use the bin2h you have to write your own
converter. Here are some ideas from how it can be done:
Your converter should examine at first the size of the
binary files. Then create an assembler source file
which contains only a global data symbol with the
needed size of the binary file. Then run gas to compile
the file (which produces the .o file) and now you have
to analize the header information of the .o file to
get the fileposition where the dummy data is hold and
then simply copy the data from the binary file to that
location. Now you have a normal object file with a
global data symbol which can be used by your program.
BTW: These are aonly some ideas from me. Please do not
ask me for details, because I have not the time for it.
This time should be invested by you.
Robert
--
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post: Am Berg 3, D-09573 Dittmannsdorf *
* e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE *
* WWW: http://www.tu-chemnitz.de/~rho *
*****************************************************************
- Raw text -