Changeset 2952 for trunk/kLdr/kLdr.h
- Timestamp:
- Jan 30, 2007, 4:02:06 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdr.h
r2948 r2952 32 32 #endif 33 33 34 /* 35 * kLdr depend on size_t, [u]intNN_t, [u]intptr_t and some related constants. 34 /* 35 * kLdr depend on size_t, [u]intNN_t, [u]intptr_t and some related constants. 36 36 * If KLDR_NO_KLDR_H_INCLUDES is defined, these has already been defined. 37 37 */ … … 53 53 # define UINT32_C(c) (c ## U) 54 54 # define UINT64_C(c) (c ## ULL) 55 # define INT16_C(c) (c) 56 # define INT32_C(c) (c) 57 # define INT64_C(c) (c ## LL) 55 58 # else 56 59 # include <stdint.h> … … 415 418 * Primarily a way for the user to specify selectors for the LX/LE and NE interpreters. */ 416 419 uint16_t SelFlat; 417 /** The 16-bit selector to use for the segment. 420 /** The 16-bit selector to use for the segment. 418 421 * Primarily a way for the user to specify selectors for the LX/LE and NE interpreters. */ 419 422 uint16_t Sel16bit; … … 448 451 449 452 450 /** @name Segment flags 453 /** @name Segment flags 451 454 * @{ */ 452 455 /** The segment is 16-bit. When not set the default of the target architecture is assumed. */ … … 476 479 /** The LX loader. */ 477 480 KLDRFMT_LX, 478 /** The mach-oloader. */481 /** The Mach-O loader. */ 479 482 KLDRFMT_MACHO, 480 /** The LXloader. */483 /** The PE loader. */ 481 484 KLDRFMT_PE, 482 485 /** The end of the valid format values (exclusive). */ … … 721 724 * @param idName The resource id. NIL_KLDRMOD_RSRC_NAME_ID if no id. 722 725 * @param pszName The resource name. NULL if no name. 723 * @param idLang The language id. 726 * @param idLang The language id. 724 727 * @param AddrRsrc The address value for the resource. 725 728 * @param cbRsrc The size of the resource. 726 729 * @param pvUser The user parameter specified to kLdrModEnumDbgInfo. 727 730 */ 728 typedef int FNKLDRENUMRSRC(PKLDRMOD pMod, uint32_t idType, const char *pszType, uint32_t idName, const char *pszName, 731 typedef int FNKLDRENUMRSRC(PKLDRMOD pMod, uint32_t idType, const char *pszType, uint32_t idName, const char *pszName, 729 732 uint32_t idLang, KLDRADDR AddrRsrc, KLDRSIZE cbRsrc, void *pvUser); 730 733 /** Pointer to a resource enumerator callback. */ … … 736 739 #define NIL_KLDRMOD_RSRC_TYPE_ID ( ~(uint32_t)0 ) 737 740 /** @name Language ID 738 * 739 * Except for the special IDs #defined here, the values are considered 741 * 742 * Except for the special IDs #defined here, the values are considered 740 743 * format specific for now since it's only used by the PE resources. 741 * 744 * 742 745 * @{ */ 743 746 /** NIL language ID. */ … … 767 770 768 771 int kLdrModQuerySymbol(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t iSymbol, 769 const char *pchSymbol, size_t cchSymbol, const char *pszVersion, 772 const char *pchSymbol, size_t cchSymbol, const char *pszVersion, 770 773 PFNKLDRMODGETIMPORT pfnGetForwarder, void *pvUser, PKLDRADDR puValue, uint32_t *pfKind); 771 774 int kLdrModEnumSymbols(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, … … 778 781 int kLdrModQueryResource(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t idType, const char *pszType, 779 782 uint32_t idName, const char *pszName, uint32_t idLang, PKLDRADDR pAddrRsrc, size_t *pcbRsrc); 780 int kLdrModEnumResources(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t idType, const char *pszType, 783 int kLdrModEnumResources(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t idType, const char *pszType, 781 784 uint32_t idName, const char *pszName, uint32_t idLang, PFNKLDRENUMRSRC pfnCallback, void *pvUser); 782 785 int kLdrModEnumDbgInfo(PKLDRMOD pMod, const void *pvBits, PFNKLDRENUMDBG pfnCallback, void *pvUser); … … 842 845 /** @copydoc kLdrModQuerySymbol */ 843 846 int (* pfnQuerySymbol)(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t iSymbol, 844 const char *pchSymbol, size_t cchSymbol, const char *pszVersion, 847 const char *pchSymbol, size_t cchSymbol, const char *pszVersion, 845 848 PFNKLDRMODGETIMPORT pfnGetForwarder, void *pvUser, PKLDRADDR puValue, uint32_t *pfKind); 846 849 /** @copydoc kLdrModEnumSymbols */ … … 861 864 uint32_t idName, const char *pszName, uint32_t idLang, PKLDRADDR pAddrRsrc, size_t *pcbRsrc); 862 865 /** @copydoc kLdrModEnumResources */ 863 int (* pfnEnumResources)(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t idType, const char *pszType, 866 int (* pfnEnumResources)(PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, uint32_t idType, const char *pszType, 864 867 uint32_t idName, const char *pszName, uint32_t idLang, PFNKLDRENUMRSRC pfnCallback, void *pvUser); 865 868 /** @copydoc kLdrModEnumDbgInfo */ … … 975 978 int kLdrDyldGetName(HKLDRMOD hMod, char *pszName, size_t cchName); 976 979 int kLdrDyldGetFilename(HKLDRMOD hMod, char *pszFilename, size_t cchFilename); 977 int kLdrDyldQuerySymbol(HKLDRMOD hMod, uint32_t uSymbolOrdinal, const char *pszSymbolName, 980 int kLdrDyldQuerySymbol(HKLDRMOD hMod, uint32_t uSymbolOrdinal, const char *pszSymbolName, 978 981 const char *pszSymbolVersion, uintptr_t *pValue, uint32_t *pfKind); 979 int kLdrDyldQueryResource(HKLDRMOD hMod, uint32_t idType, const char *pszType, uint32_t idName, 982 int kLdrDyldQueryResource(HKLDRMOD hMod, uint32_t idType, const char *pszType, uint32_t idName, 980 983 const char *pszName, uint32_t idLang, void **pvRsrc, size_t *pcbRsrc); 981 int kLdrDyldEnumResources(HKLDRMOD hMod, uint32_t idType, const char *pszType, uint32_t idName, 984 int kLdrDyldEnumResources(HKLDRMOD hMod, uint32_t idType, const char *pszType, uint32_t idName, 982 985 const char *pszName, uint32_t idLang, PFNKLDRENUMRSRC pfnCallback, void *pvUser); 983 986 … … 1231 1234 /** @} */ 1232 1235 1236 /** @name 1237 * @{ */ 1238 #define KLDR_ERR_MACHO_BASE (KLDR_ERR_LX_BASE + 12) 1239 /** Only native endian MACH-O files are supported. */ 1240 #define KLDR_ERR_MACHO_OTHER_ENDIAN_NOT_SUPPORTED (KLDR_ERR_MACHO_BASE + 0) 1241 /** 64-bit MACH-O files aren't supported yet. */ 1242 #define KLDR_ERR_MACHO_64BIT_NOT_SUPPORTED (KLDR_ERR_MACHO_BASE + 1) 1243 /** The MACH-O header is bad or contains new and unsupported features. */ 1244 #define KLDR_ERR_MACHO_BAD_HEADER (KLDR_ERR_MACHO_BASE + 2) 1245 /** The file type isn't supported. */ 1246 #define KLDR_ERR_MACHO_UNSUPPORTED_FILE_TYPE (KLDR_ERR_MACHO_BASE + 3) 1247 /** The machine (cputype / cpusubtype combination) isn't supported. */ 1248 #define KLDR_ERR_MACHO_UNSUPPORTED_MACHINE (KLDR_ERR_MACHO_BASE + 4) 1249 /** @} */ 1250 1233 1251 /** End of the valid kLdr status codes. */ 1234 1252 #define KLDR_ERR_END (KLDR_ERR_LX_BASE + 12)
Note:
See TracChangeset
for help on using the changeset viewer.