Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!math.fu-berlin.de!uniol!unido!rwthinf!ikki!wolfram From: wolfram@ikki.informatik.rwth-aachen.de (Wolfram Roesler) Newsgroups: comp.sys.atari.st.tech Subject: Re: How store extra data at the end of an executable? Message-ID: Date: 9 Apr 91 13:01:55 GMT References: <5796@mcrware.UUCP> Sender: news@rwthinf.UUCP Lines: 22 erik@mcrware.UUCP (Erik Johnson) writes: >Here is what I would like to do. I would like to append a picture file to the >end of my executable file. In this case, the extra data is a picture file that >is the menu for my program. Once a program is loaded into memory, is it closed >and all file offset information lost, or is there a way I can start reading >data from the file where the program data left off. Although I havent tried, it should be possible to simply append the picure data to the end of the file without disturbing the program. The location of the picture can be located by looking at the program header, or by simply loading the last 32K or whatever. After program load, the entire program file should be in memory and should remain there during program execution (I dont know what will happen to relocation info, though, but I cant imagine it will be freed). Look at the program's basepage, and you will find some pointers to the text, data and bss segments of the program plus the lengths of these segments. The picture data should be just behind. for more info, consult the documentation of the basepage structure. Good luck Okami-san