Date: Sun, 15 Aug 1999 12:12:21 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Goh Yong Kwang cc: djgpp AT delorie DOT com Subject: Re: How to create DXE? In-Reply-To: <7ou8oe$ctj$2@server.noris.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 13 Aug 1999, Goh Yong Kwang wrote: > How do we create DXE and how do we use them? I came across a function called > _dxe_load() and is not quite sure on how to use it. The usage of _dxe_load is described in the library reference (from the command line, type "info libc alpha _dxe" and read there). You create a DXE with a program named dxegen.exe, it is part of djdev202.zip package. Its only docs is a small file in djlsr202.zip, which I attach below. If you have further questions after reading this, please ask them here. ----------------------------------------------------------------------- DXE allows you to dynamically load code and data from a file and execute it. Limitations: you cannot do I/O (and some other functions) directly from a DXE loaded image. There is a single entry point (subroutine or data block returned). There are two parts to DXE - the generator and the loader. The DXE generator is a program with the usage: C:\> dxegen output.dxe symbol input.o [input2.o ... -lgcc -lc] output.dxe is the name you want to contain your dynamic load code. symbol is the procedure name (or data structure) you want a pointer to, remember to add the initial underscore for most symbols. The input.o is created with GCC from your source. Additional arguments on the command line (.o and .a files; or other ld options) are passed to ld to resolve references to build your code. The loader only adds around 300 bytes to your image, and the prototype is found in : void *dxe_load(char *filename); It takes a single argument which is the file on disk containing the dynamic execution code. It returns a pointer to the symbol you specified at DXE generation time.