🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2976

Re: Combining program and data in an executable.

#2976
From: Duncan Murdoch
Date: Fri, 09 Nov 1990 14:03
20 lines
1625 bytes
In article <290@sc2a.unige.ch> fisher@sc2a.unige.ch (Markus Fischer) writes:
>In article <1990Nov6.133618.23396@jarvis.csri.toronto.edu>, west@turing.toronto.edu (Tom West) writes:
>>   I have a program that acts upon data currently stored in a file.  I would
>> like to somehow be able to combine the program with the data, so that a 
>> separate data file would not be necessary.  (i.e. spreadsheet data with a 
>> viewer builtin.)  Is there any way that one can do this?
>> [...]
>
>Of course, a hacker might provide us a program creating directly the object
>module, without having to recompile it, but the above solution is more
>portable.  After this step, compile the module, modify the file-io of your
>program into direct memory read, and link the whole thing.

I don't know about Turbo C, but Borland supplies this program with Turbo 
Pascal:  it's called BINOBJ, and converts any file into an object file, with
an external of some sort pointing to the start of the data.  (I think it's
set up as an entry point, but I'm not sure; in any case, you reference it
using the "address of" operator @.)

Duncan Murdoch
Technical Details
Message-ID: <1990Nov9.140338.1704@maytag.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!maytag!watstat.waterloo.edu!dmurdoch
References: <1990Nov6.133618.23396@jarvis.csri.toronto.edu> <290@sc2a.unige.ch>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!maytag!watstat.waterloo.edu!dmurdoch
From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch)
Subject: Re: Combining program and data in an executable.
Message-ID: <1990Nov9.140338.1704@maytag.waterloo.edu>
Sender: daemon@maytag.waterloo.edu (Admin)
Organization: University of Waterloo
References: <1990Nov6.133618.23396@jarvis.csri.toronto.edu> <290@sc2a.unige.ch>
Date: Fri, 9 Nov 90 14:03:38 GMT
Lines: 21