Changeset 2854 for trunk/kLdr/kLdr.h
- Timestamp:
- Nov 3, 2006, 4:39:12 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdr.h
r2851 r2854 341 341 /** Variable free to use for the kLdr user. */ 342 342 void *pvUser; 343 /** The segment name. */ 344 const char *pszName; 343 /** The segment name. (Might not be zero terminated!) */ 344 const char *pchName; 345 /** The length of the segment name. */ 346 uint32_t cchName; 345 347 /** The size of the segment. */ 346 348 KLDRSIZE cb; 347 /** The link time load address. */ 349 /** The required segment alignment. */ 350 KLDRADDR Alignment; 351 /** The link address. 352 * Set to NIL_KLDRADDR if the segment isn't supposed to be mapped. */ 348 353 KLDRADDR LinkAddress; 349 354 /** The address the segment was mapped at by kLdrModMap(). … … 569 574 * Not meant for calling directly thru! */ 570 575 PCKLDRMODOPS pOps; 576 /** Pointer to the read instance. (Can be NULL after kLdrModDone().)*/ 577 PKLDRRDR pRdr; 571 578 /** The module data. */ 572 579 void *pvData; … … 617 624 /** Weak symbol. */ 618 625 #define KLDRSYMKIND_WEAK 0x00000100 626 /** Forwarder symbol. */ 627 #define KLDRSYMKIND_FORWARDER 0x00000200 619 628 /** @} */ 620 629 … … 691 700 692 701 int kLdrModQuerySymbol(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t uSymbol, 693 const char *pszSymbol, PKLDRADDR puValue, uint32_t *pfKind); 694 int kLdrModEnumSymbols(PKLDRMOD pMod, uint32_t fFlags, const void *pvBits, KLDRADDR BaseAddress, 695 PFNKLDRMODENUMSYMS pfnCallback, void *pvUser); 702 const char *pszSymbol, PFNKLDRMODGETIMPORT pfnGetForwarder, void *pvUser, 703 PKLDRADDR puValue, uint32_t *pfKind); 704 int kLdrModEnumSymbols(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, 705 uint32_t fFlags, PFNKLDRMODENUMSYMS pfnCallback, void *pvUser); 696 706 int kLdrModGetImport(PKLDRMOD pMod, void *pvBits, uint32_t iImport, const char *pszName, size_t cchName); 697 707 int32_t kLdrModNumberOfImports(PKLDRMOD pMod, void *pvBits); … … 761 771 /** @copydoc kLdrModQuerySymbol */ 762 772 int (* pfnQuerySymbol)(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t uSymbol, 763 const char *pszSymbol, PKLDRADDR puValue, uint32_t *pfKind); 773 const char *pszSymbol, PFNKLDRMODGETIMPORT pfnGetForwarder, void *pvUser, 774 PKLDRADDR puValue, uint32_t *pfKind); 764 775 /** @copydoc kLdrModEnumSymbols */ 765 int (* pfnEnumSymbols)(PKLDRMOD pMod, uint32_t fFlags, const void *pvBits, KLDRADDR BaseAddress,776 int (* pfnEnumSymbols)(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t fFlags, 766 777 PFNKLDRMODENUMSYMS pfnCallback, void *pvUser); 767 778 /** @copydoc kLdrModGetImport */ … … 1016 1027 /** Symbol not found. */ 1017 1028 #define KLDR_ERR_SYMBOL_NOT_FOUND (KLDR_ERR_BASE + 46) 1018 1029 /** A forward symbol was encountered but the caller didn't provide any means to resolve it. */ 1030 #define KLDR_ERR_FORWARDER_SYMBOL (KLDR_ERR_BASE + 47) 1019 1031 /** Encountered a bad fixup. */ 1020 1032 #define KLDR_ERR_BAD_FIXUP (KLDR_ERR_BASE + 48) 1021 1022 1033 /** A memory allocation failed. */ 1023 #define KLDR_ERR_NO_MEMORY (KLDR_ERR_BASE + 64) 1034 #define KLDR_ERR_NO_MEMORY (KLDR_ERR_BASE + 49) 1035 1036 1037 /** @name kLdrModPE status codes 1038 * @{ */ 1039 #define KLDR_ERR_BASE_PE (KLDR_ERR_BASE + 96) 1040 /** The machine isn't supported by the interpreter. */ 1041 #define KLDR_ERR_PE_UNSUPPORTED_MACHINE (KLDR_ERR_BASE_PE + 0) 1042 /** The file handler isn't valid. */ 1043 #define KLDR_ERR_PE_BAD_FILE_HEADER (KLDR_ERR_BASE_PE + 1) 1044 /** The the optional headers isn't valid. */ 1045 #define KLDR_ERR_PE_BAD_OPTIONAL_HEADER (KLDR_ERR_BASE_PE + 2) 1046 /** One of the section headers aren't valid. */ 1047 #define KLDR_ERR_PE_BAD_SECTION_HEADER (KLDR_ERR_BASE_PE + 3) 1048 /** Bad forwarder entry. */ 1049 #define KLDR_ERR_PE_BAD_FORWARDER (KLDR_ERR_BASE_PE + 4) 1050 /** Forwarder module not found in the import descriptor table. */ 1051 #define KLDR_ERR_PE_FORWARDER_IMPORT_NOT_FOUND (KLDR_ERR_BASE_PE + 5) 1052 /** @} */ 1053 1024 1054 1025 1055 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.