home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / plbin.zip / pl / include / dld.h next >
C/C++ Source or Header  |  1992-05-26  |  2KB  |  53 lines

  1. /* Error codes */
  2.  
  3. #define DLD_ENOFILE    1        /* cannot open file */
  4. #define DLD_EBADMAGIC    2        /* bad magic number */
  5. #define DLD_EBADHEADER    3        /* failure reading header */
  6. #define DLD_ENOTEXT    4        /* premature eof in text section */
  7. #define DLD_ENOSYMBOLS    5        /* premature end of file in symbols */
  8. #define DLD_ENOSTRINGS    6        /* bad string table */
  9. #define DLD_ENOTXTRELOC    7        /* premature eof in text relocation */
  10. #define DLD_ENODATA    8        /* premature eof in data section */
  11. #define DLD_ENODATRELOC    9        /* premature eof in data relocation */
  12. #define DLD_EMULTDEFS    10        /* multiple definitions of symbol */
  13. #define DLD_EBADLIBRARY    11        /* malformed library archive */
  14. #define DLD_EBADCOMMON    12        /* common block not supported */
  15. #define DLD_EBADOBJECT    13        /* malformed input file (not rel or
  16.                        archive) */
  17. #define DLD_EBADRELOC    14        /* bad relocation info */
  18. #define DLD_ENOMEMORY    15        /* virtual memory exhausted */
  19. #define DLD_EUNDEFSYM    16        /* undefined symbol */
  20.  
  21. extern int dld_errno;            /* error code returned by dld */
  22.  
  23. extern int dld_init ();            /* initialize the dld routines */
  24. extern int dld_link ();            /* dynamically link and load an object
  25.                        file */
  26. extern unsigned long
  27.     dld_get_symbol ();            /* return the address of the named
  28.                        identifier  */
  29. extern unsigned long
  30.     dld_get_func ();            /* return the address of the named
  31.                        function */
  32. extern unsigned long
  33.     dld_get_bare_symbol ();        /* same as dld_get_symbol except that
  34.                        no underscore (_) is prepended.  Use
  35.                        to locate symbols defined by
  36.                        assembly routines. */
  37. extern int dld_unlink_by_file ();   /* unlink a file */
  38. extern int dld_unlink_by_symbol (); /* unlink the module that define the
  39.                        given symbol */
  40.  
  41. extern int
  42.     dld_function_executable_p ();   /* return true if the named C function
  43.                        is executable */
  44.  
  45. extern int
  46.     dld_list_undefined ();        /* List undefined symbols on stderr */
  47.  
  48. extern char *
  49.     dld_find_function ();        /* find a function name from an address */
  50.  
  51. extern long
  52.     dld_text_start ();            /* find text start address of a file */
  53.