home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / dxe / dxegen.doc < prev    next >
Encoding:
Text File  |  1995-04-21  |  1.1 KB  |  27 lines

  1. DXE allows you to dynamically load code and data from a file and execute it.
  2. Limitations:  you cannot do I/O (and some other functions) directly from a
  3. DXE loaded image.  There is a single entry point (subroutine or data block
  4. returned).
  5.  
  6. There are two parts to DXE - the generator and the loader.  
  7.  
  8. The DXE generator is a program with the usage:
  9.  
  10.   C:\> dxegen output.dxe symbol input.o [input2.o ... -lgcc -lc]
  11.  
  12. output.dxe is the name you want to contain your dynamic load code.
  13. symbol is the procedure name (or data structure) you want a pointer to,
  14. remember to add the initial underscore for most symbols.
  15. The input.o is created with GCC from your source.  Additional arguments
  16. on the command line (.o and .a files; or other ld options) are passed to
  17. ld to resolve references to build your code.
  18.  
  19. The loader only adds around 300 bytes to your image, and the prototype 
  20. is found in <sys/dxe.h>:
  21.  
  22.   void *dxe_load(char *filename);
  23.  
  24. It takes a single argument which is the file on disk containing the dynamic
  25. execution code.  It returns a pointer to the symbol you specified at DXE
  26. generation time.
  27.