mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Initial import
This commit is contained in:
commit
c91b3c5006
14915 changed files with 590219 additions and 0 deletions
14
libc/nt/struct/acl.h
Normal file
14
libc/nt/struct/acl.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_ACL_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_ACL_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtAcl {
|
||||
uint8_t AclRevision;
|
||||
uint8_t Sbz1;
|
||||
uint16_t AclSize;
|
||||
uint16_t AceCount;
|
||||
uint16_t Sbz2;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_ACL_H_ */
|
12
libc/nt/struct/ansistring.h
Normal file
12
libc/nt/struct/ansistring.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_ANSISTRING_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_ANSISTRING_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtAnsiString {
|
||||
unsigned short Length;
|
||||
unsigned short MaximumLength;
|
||||
char *Buffer;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_ANSISTRING_H_ */
|
20
libc/nt/struct/byhandlefileinformation.h
Normal file
20
libc/nt/struct/byhandlefileinformation.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_BYHANDLEFILEINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_BYHANDLEFILEINFORMATION_H_
|
||||
#include "libc/nt/struct/filetime.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtByHandleFileInformation {
|
||||
uint32_t dwFileAttributes; /* ←NtFileFlagAndAttributes */
|
||||
struct NtFileTime ftCreationFileTime;
|
||||
struct NtFileTime ftLastAccessFileTime;
|
||||
struct NtFileTime ftLastWriteFileTime;
|
||||
uint32_t dwVolumeSerialNumber;
|
||||
uint32_t nFileSizeHigh;
|
||||
uint32_t nFileSizeLow;
|
||||
uint32_t nNumberOfLinks;
|
||||
uint32_t nFileIndexHigh;
|
||||
uint32_t nFileIndexLow;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_BYHANDLEFILEINFORMATION_H_ */
|
14
libc/nt/struct/charinfo.h
Normal file
14
libc/nt/struct/charinfo.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CHARINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CHARINFO_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtCharInfo {
|
||||
union {
|
||||
char16_t UnicodeChar;
|
||||
char AsciiChar;
|
||||
} Char;
|
||||
uint16_t Attributes;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CHARINFO_H_ */
|
11
libc/nt/struct/clientid.h
Normal file
11
libc/nt/struct/clientid.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CLIENTID_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CLIENTID_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtClientId {
|
||||
void *UniqueProcess;
|
||||
void *UniqueThread;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CLIENTID_H_ */
|
11
libc/nt/struct/consolecursorinfo.h
Normal file
11
libc/nt/struct/consolecursorinfo.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLECURSORINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLECURSORINFO_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtConsoleCursorInfo {
|
||||
uint32_t dwSize;
|
||||
bool32 bVisible;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLECURSORINFO_H_ */
|
16
libc/nt/struct/consolescreenbufferinfo.h
Normal file
16
libc/nt/struct/consolescreenbufferinfo.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFO_H_
|
||||
#include "libc/nt/struct/coord.h"
|
||||
#include "libc/nt/struct/smallrect.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtConsoleScreenBufferInfo {
|
||||
struct NtCoord dwSize;
|
||||
struct NtCoord dwCursorPosition;
|
||||
uint16_t wAttributes;
|
||||
struct NtSmallRect srWindow;
|
||||
struct NtCoord dwMaximumWindowSize;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFO_H_ */
|
20
libc/nt/struct/consolescreenbufferinfoex.h
Normal file
20
libc/nt/struct/consolescreenbufferinfoex.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFOEX_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFOEX_H_
|
||||
#include "libc/nt/struct/coord.h"
|
||||
#include "libc/nt/struct/smallrect.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtConsoleScreenBufferInfoEx {
|
||||
uint32_t cbSize; /* sizeof(struct NtConsoleScreenBufferInfoEx) */
|
||||
struct NtCoord dwSize;
|
||||
struct NtCoord dwCursorPosition;
|
||||
uint16_t wAttributes; /* kNt{Foreground,Background}... */
|
||||
struct NtSmallRect srWindow;
|
||||
struct NtCoord dwMaximumWindowSize;
|
||||
uint16_t wPopupAttributes;
|
||||
bool32 bFullscreenSupported;
|
||||
uint32_t ColorTable[16]; /* 0x00BBGGRR */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFOEX_H_ */
|
14
libc/nt/struct/consoleselectioninfo.h
Normal file
14
libc/nt/struct/consoleselectioninfo.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESELECTIONINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESELECTIONINFO_H_
|
||||
#include "libc/nt/struct/coord.h"
|
||||
#include "libc/nt/struct/smallrect.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtConsoleSelectionInfo {
|
||||
uint32_t dwFlags;
|
||||
struct NtCoord dwSelectionAnchor;
|
||||
struct NtSmallRect srSelection;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESELECTIONINFO_H_ */
|
59
libc/nt/struct/context.h
Normal file
59
libc/nt/struct/context.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CONTEXT_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CONTEXT_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtM128A {
|
||||
uint64_t Low;
|
||||
int64_t High;
|
||||
} aligned(16);
|
||||
|
||||
struct NtXmmSaveArea32 {
|
||||
uint16_t ControlWord;
|
||||
uint16_t StatusWord;
|
||||
uint8_t TagWord;
|
||||
uint8_t Reserved1;
|
||||
uint16_t ErrorOpcode;
|
||||
uint32_t ErrorOffset;
|
||||
uint16_t ErrorSelector;
|
||||
uint16_t Reserved2;
|
||||
uint32_t DataOffset;
|
||||
uint16_t DataSelector;
|
||||
uint16_t Reserved3;
|
||||
uint32_t MxCsr;
|
||||
uint32_t MxCsr_Mask;
|
||||
struct NtM128A FloatRegisters[8];
|
||||
struct NtM128A XmmRegisters[16];
|
||||
uint8_t Reserved4[96];
|
||||
};
|
||||
|
||||
struct NtContext {
|
||||
uint64_t P1Home, P2Home, P3Home, P4Home, P5Home, P6Home;
|
||||
uint32_t ContextFlags;
|
||||
uint32_t MxCsr;
|
||||
uint16_t SegCs, SegDs, SegEs, SegFs, SegGs, SegSs;
|
||||
uint32_t EFlags;
|
||||
uint64_t Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
|
||||
uint64_t Rax, Rcx, Rdx, Rbx, Rsp, Rbp, Rsi, Rdi;
|
||||
uint64_t R8, R9, R10, R11, R12, R13, R14, R15;
|
||||
uint64_t Rip;
|
||||
union {
|
||||
struct NtXmmSaveArea32 FltSave;
|
||||
struct NtXmmSaveArea32 FloatSave;
|
||||
struct {
|
||||
struct NtM128A Header[2];
|
||||
struct NtM128A Legacy[8];
|
||||
struct NtM128A Xmm0, Xmm1, Xmm2, Xmm3, Xmm4, Xmm5, Xmm6, Xmm7;
|
||||
struct NtM128A Xmm8, Xmm9, Xmm10, Xmm11, Xmm12, Xmm13, Xmm14, Xmm15;
|
||||
};
|
||||
};
|
||||
struct NtM128A VectorRegister[26];
|
||||
uint64_t VectorControl;
|
||||
uint64_t DebugControl;
|
||||
uint64_t LastBranchToRip;
|
||||
uint64_t LastBranchFromRip;
|
||||
uint64_t LastExceptionToRip;
|
||||
uint64_t LastExceptionFromRip;
|
||||
} aligned(16);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CONTEXT_H_ */
|
11
libc/nt/struct/coord.h
Normal file
11
libc/nt/struct/coord.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_ENUM_COORD_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_ENUM_COORD_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtCoord {
|
||||
int16_t X;
|
||||
int16_t Y;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_ENUM_COORD_H_ */
|
17
libc/nt/struct/criticalsection.h
Normal file
17
libc/nt/struct/criticalsection.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtCriticalSectionDebug;
|
||||
|
||||
struct NtCriticalSection {
|
||||
struct NtCriticalSectionDebug *DebugInfo;
|
||||
int32_t LockCount;
|
||||
int32_t RecursionCount;
|
||||
void *OwningThread;
|
||||
void *LockSemaphore;
|
||||
uintptr_t SpinCount;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTION_H_ */
|
19
libc/nt/struct/criticalsectiondebug.h
Normal file
19
libc/nt/struct/criticalsectiondebug.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTIONDEBUG_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTIONDEBUG_H_
|
||||
#include "libc/nt/struct/linkedlist.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtCriticalSection;
|
||||
|
||||
struct NtCriticalSectionDebug {
|
||||
uint16_t Type;
|
||||
uint16_t CreatorBackTraceIndex;
|
||||
struct NtCriticalSection *CriticalSection;
|
||||
struct NtLinkedList ProcessLocksList;
|
||||
uint32_t EntryCount;
|
||||
uint32_t ContentionCount;
|
||||
uint32_t Spare[2];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTIONDEBUG_H_ */
|
10
libc/nt/struct/exceptionframe.h
Normal file
10
libc/nt/struct/exceptionframe.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_EXCEPTIONFRAME_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_EXCEPTIONFRAME_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtExceptionFrame {
|
||||
struct NtExceptionFrame *Prev;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_EXCEPTIONFRAME_H_ */
|
10
libc/nt/struct/fileaccessinformation.h
Normal file
10
libc/nt/struct/fileaccessinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEACCESSINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEACCESSINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileAccessInformation {
|
||||
uint32_t AccessFlags;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEACCESSINFORMATION_H_ */
|
10
libc/nt/struct/filealignmentinformation.h
Normal file
10
libc/nt/struct/filealignmentinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEALIGNMENTINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEALIGNMENTINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileAlignmentInformation {
|
||||
uint32_t AlignmentRequirement;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEALIGNMENTINFORMATION_H_ */
|
27
libc/nt/struct/fileallinformation.h
Normal file
27
libc/nt/struct/fileallinformation.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLINFORMATION_H_
|
||||
#include "libc/nt/struct/fileaccessinformation.h"
|
||||
#include "libc/nt/struct/filealignmentinformation.h"
|
||||
#include "libc/nt/struct/filebasicinformation.h"
|
||||
#include "libc/nt/struct/fileeainformation.h"
|
||||
#include "libc/nt/struct/fileinternalinformation.h"
|
||||
#include "libc/nt/struct/filemodeinformation.h"
|
||||
#include "libc/nt/struct/filenameinformation.h"
|
||||
#include "libc/nt/struct/filepositioninformation.h"
|
||||
#include "libc/nt/struct/filestandardinformation.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileAllInformation {
|
||||
struct NtFileBasicInformation BasicInformation;
|
||||
struct NtFileStandardInformation StandardInformation;
|
||||
struct NtFileInternalInformation InternalInformation;
|
||||
struct NtFileEaInformation EaInformation;
|
||||
struct NtFileAccessInformation AccessInformation;
|
||||
struct NtFilePositionInformation PositionInformation;
|
||||
struct NtFileModeInformation ModeInformation;
|
||||
struct NtFileAlignmentInformation AlignmentInformation;
|
||||
struct NtFileNameInformation NameInformation;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLINFORMATION_H_ */
|
10
libc/nt/struct/fileallocationinformation.h
Normal file
10
libc/nt/struct/fileallocationinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLOCATIONINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLOCATIONINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileAllocationInformation {
|
||||
int64_t AllocationSize;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLOCATIONINFORMATION_H_ */
|
11
libc/nt/struct/fileattributetaginformation.h
Normal file
11
libc/nt/struct/fileattributetaginformation.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEATTRIBUTETAGINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEATTRIBUTETAGINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileAttributeTagInformation {
|
||||
uint32_t FileAttributes;
|
||||
uint32_t ReparseTag;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEATTRIBUTETAGINFORMATION_H_ */
|
14
libc/nt/struct/filebasicinfo.h
Normal file
14
libc/nt/struct/filebasicinfo.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFO_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileBasicInfo {
|
||||
int64_t CreationTime; /* in 100ns units */
|
||||
int64_t LastAccessTime; /* in 100ns units */
|
||||
int64_t LastWriteTime; /* in 100ns units */
|
||||
int64_t ChangeTime; /* in 100ns units */
|
||||
uint32_t FileAttributes; /* kNtFileAttributeXXX */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFO_H_ */
|
14
libc/nt/struct/filebasicinformation.h
Normal file
14
libc/nt/struct/filebasicinformation.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileBasicInformation {
|
||||
int64_t CreationTime; /* in 100ns units */
|
||||
int64_t LastAccessTime; /* in 100ns units */
|
||||
int64_t LastWriteTime; /* in 100ns units */
|
||||
int64_t ChangeTime; /* in 100ns units */
|
||||
uint32_t FileAttributes; /* kNtFileAttributeXXX */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFORMATION_H_ */
|
25
libc/nt/struct/filebothdirectoryinformation.h
Normal file
25
libc/nt/struct/filebothdirectoryinformation.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEBOTHDIRECTORYINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEBOTHDIRECTORYINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct NtFileBothDirectoryInformation {
|
||||
uint32_t NextEntryOffset;
|
||||
uint32_t FileIndex;
|
||||
int64_t CreationTime;
|
||||
int64_t LastAccessTime;
|
||||
int64_t LastWriteTime;
|
||||
int64_t ChangeTime;
|
||||
int64_t EndOfFile;
|
||||
int64_t AllocationSize;
|
||||
uint32_t FileAttributes;
|
||||
uint32_t FileNameLength;
|
||||
uint32_t EaSize;
|
||||
unsigned char ShortNameLength;
|
||||
char16_t ShortName[12];
|
||||
char16_t FileName[1];
|
||||
};
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEBOTHDIRECTORYINFORMATION_H_ */
|
15
libc/nt/struct/filecompressioninfo.h
Normal file
15
libc/nt/struct/filecompressioninfo.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILECOMPRESSIONINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILECOMPRESSIONINFO_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileCompressionInfo {
|
||||
int64_t CompressedFileSize;
|
||||
uint16_t CompressionFormat;
|
||||
uint8_t CompressionUnitShift;
|
||||
uint8_t ChunkShift;
|
||||
uint8_t ClusterShift;
|
||||
uint8_t Reserved[3];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILECOMPRESSIONINFO_H_ */
|
20
libc/nt/struct/filedirectoryinformation.h
Normal file
20
libc/nt/struct/filedirectoryinformation.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEDIRECTORYINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEDIRECTORYINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileDirectoryInformation {
|
||||
uint32_t NextEntryOffset;
|
||||
uint32_t FileIndex;
|
||||
int64_t CreationTime;
|
||||
int64_t LastAccessTime;
|
||||
int64_t LastWriteTime;
|
||||
int64_t ChangeTime;
|
||||
int64_t EndOfFile;
|
||||
int64_t AllocationSize;
|
||||
uint32_t FileAttributes;
|
||||
uint32_t FileNameLength;
|
||||
char16_t FileName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEDIRECTORYINFORMATION_H_ */
|
10
libc/nt/struct/filedispositioninformation.h
Normal file
10
libc/nt/struct/filedispositioninformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEDISPOSITIONINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEDISPOSITIONINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileDispositionInformation {
|
||||
bool32 DoDeleteFile;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEDISPOSITIONINFORMATION_H_ */
|
10
libc/nt/struct/fileeainformation.h
Normal file
10
libc/nt/struct/fileeainformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEEAINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEEAINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileEaInformation {
|
||||
uint32_t EaSize;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEEAINFORMATION_H_ */
|
10
libc/nt/struct/fileendoffileinformation.h
Normal file
10
libc/nt/struct/fileendoffileinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEENDOFFILEINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEENDOFFILEINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct FileEndOfFileInformation {
|
||||
int64_t EndOfFile;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEENDOFFILEINFORMATION_H_ */
|
21
libc/nt/struct/filefulldirectoryinformation.h
Normal file
21
libc/nt/struct/filefulldirectoryinformation.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLDIRECTORYINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLDIRECTORYINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileFullDirectoryInformation {
|
||||
uint32_t NextEntryOffset;
|
||||
uint32_t FileIndex;
|
||||
int64_t CreationTime;
|
||||
int64_t LastAccessTime;
|
||||
int64_t LastWriteTime;
|
||||
int64_t ChangeTime;
|
||||
int64_t EndOfFile;
|
||||
int64_t AllocationSize;
|
||||
uint32_t FileAttributes;
|
||||
uint32_t FileNameLength;
|
||||
uint32_t EaSize;
|
||||
char16_t FileName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLDIRECTORYINFORMATION_H_ */
|
14
libc/nt/struct/filefulleainformation.h
Normal file
14
libc/nt/struct/filefulleainformation.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLEAINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLEAINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileFullEaInformation {
|
||||
uint32_t NextEntryOffset;
|
||||
uint8_t Flags;
|
||||
uint8_t EaNameLength;
|
||||
uint16_t EaValueLength;
|
||||
char EaName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLEAINFORMATION_H_ */
|
10
libc/nt/struct/fileinternalinformation.h
Normal file
10
libc/nt/struct/fileinternalinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEINTERNALINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEINTERNALINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileInternalInformation {
|
||||
int64_t IndexNumber;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEINTERNALINFORMATION_H_ */
|
14
libc/nt/struct/filemailslotqueryinformation.h
Normal file
14
libc/nt/struct/filemailslotqueryinformation.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTQUERYINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTQUERYINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileMailslotQueryInformation {
|
||||
uint32_t MaximumMessageSize;
|
||||
uint32_t MailslotQuota;
|
||||
uint32_t NextMessageSize;
|
||||
uint32_t MessagesAvailable;
|
||||
int64_t ReadTimeout;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTQUERYINFORMATION_H_ */
|
10
libc/nt/struct/filemailslotsetinformation.h
Normal file
10
libc/nt/struct/filemailslotsetinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTSETINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTSETINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileMailslotSetInformation {
|
||||
int64_t ReadTimeout;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTSETINFORMATION_H_ */
|
10
libc/nt/struct/filemodeinformation.h
Normal file
10
libc/nt/struct/filemodeinformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEMODEINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEMODEINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileModeInformation {
|
||||
uint32_t Mode;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEMODEINFORMATION_H_ */
|
11
libc/nt/struct/filenameinformation.h
Normal file
11
libc/nt/struct/filenameinformation.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMEINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMEINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileNameInformation {
|
||||
uint32_t FileNameLength;
|
||||
char16_t FileName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMEINFORMATION_H_ */
|
13
libc/nt/struct/filenamesinformation.h
Normal file
13
libc/nt/struct/filenamesinformation.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMESINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMESINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileNamesInformation {
|
||||
uint32_t NextEntryOffset;
|
||||
uint32_t FileIndex;
|
||||
uint32_t FileNameLength;
|
||||
char16_t FileName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMESINFORMATION_H_ */
|
16
libc/nt/struct/filenetworkopeninformation.h
Normal file
16
libc/nt/struct/filenetworkopeninformation.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILENETWORKOPENINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILENETWORKOPENINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileNetworkOpenInformation {
|
||||
int64_t CreationTime;
|
||||
int64_t LastAccessTime;
|
||||
int64_t LastWriteTime;
|
||||
int64_t ChangeTime;
|
||||
int64_t AllocationSize;
|
||||
int64_t EndOfFile;
|
||||
uint32_t FileAttributes;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILENETWORKOPENINFORMATION_H_ */
|
19
libc/nt/struct/filepipelocalinformation.h
Normal file
19
libc/nt/struct/filepipelocalinformation.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEPIPELOCALINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEPIPELOCALINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFilePipeLocalInformation {
|
||||
uint32_t NamedPipeType;
|
||||
uint32_t NamedPipeConfiguration;
|
||||
uint32_t MaximumInstances;
|
||||
uint32_t CurrentInstances;
|
||||
uint32_t InboundQuota;
|
||||
uint32_t ReadDataAvailable;
|
||||
uint32_t OutboundQuota;
|
||||
uint32_t WriteQuotaAvailable;
|
||||
uint32_t NamedPipeState;
|
||||
uint32_t NamedPipeEnd;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEPIPELOCALINFORMATION_H_ */
|
10
libc/nt/struct/filepositioninformation.h
Normal file
10
libc/nt/struct/filepositioninformation.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEPOSITIONINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEPOSITIONINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFilePositionInformation {
|
||||
int64_t CurrentByteOffset;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEPOSITIONINFORMATION_H_ */
|
13
libc/nt/struct/filerenameinformation.h
Normal file
13
libc/nt/struct/filerenameinformation.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILERENAMEINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILERENAMEINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileRenameInformation {
|
||||
bool32 Replace;
|
||||
void *RootDir;
|
||||
uint32_t FileNameLength;
|
||||
char16_t FileName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILERENAMEINFORMATION_H_ */
|
11
libc/nt/struct/filesegmentelement.h
Normal file
11
libc/nt/struct/filesegmentelement.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILESEGMENTELEMENT_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILESEGMENTELEMENT_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
union NtFileSegmentElement {
|
||||
void *Buffer;
|
||||
uint64_t Alignment;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILESEGMENTELEMENT_H_ */
|
14
libc/nt/struct/filestandardinformation.h
Normal file
14
libc/nt/struct/filestandardinformation.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILESTANDARDINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILESTANDARDINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileStandardInformation {
|
||||
int64_t AllocationSize;
|
||||
int64_t EndOfFile;
|
||||
uint32_t NumberOfLinks;
|
||||
bool32 DeletePending;
|
||||
bool32 Directory;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILESTANDARDINFORMATION_H_ */
|
14
libc/nt/struct/filestreaminformation.h
Normal file
14
libc/nt/struct/filestreaminformation.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILESTREAMINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILESTREAMINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileStreamInformation {
|
||||
uint32_t NextEntryOffset;
|
||||
uint32_t StreamNameLength;
|
||||
int64_t StreamSize;
|
||||
int64_t StreamAllocationSize;
|
||||
char16_t StreamName[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILESTREAMINFORMATION_H_ */
|
11
libc/nt/struct/filetime.h
Normal file
11
libc/nt/struct/filetime.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_FILETIME_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_FILETIME_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileTime {
|
||||
uint32_t dwLowDateTime;
|
||||
uint32_t dwHighDateTime;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_FILETIME_H_ */
|
11
libc/nt/struct/filezerodatainformation.h
Normal file
11
libc/nt/struct/filezerodatainformation.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FILEZERODATAINFORMATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEZERODATAINFORMATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFileZeroDataInformation {
|
||||
uint64_t FileOffset;
|
||||
uint64_t BeyondFinalZero;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FILEZERODATAINFORMATION_H_ */
|
20
libc/nt/struct/fpodata.h
Normal file
20
libc/nt/struct/fpodata.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_FPODATA_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_FPODATA_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtFpoData {
|
||||
/* TODO(jart): No bitfields. */
|
||||
uint32_t ulOffStart;
|
||||
uint32_t cbProcSize;
|
||||
uint32_t cdwLocals;
|
||||
uint16_t cdwParams;
|
||||
uint16_t cbProlog : 8;
|
||||
uint16_t cbRegs : 3;
|
||||
uint16_t fHasSEH : 1;
|
||||
uint16_t fUseBP : 1;
|
||||
uint16_t reserved : 1;
|
||||
uint16_t cbFrame : 2;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_FPODATA_H_ */
|
13
libc/nt/struct/genericmapping.h
Normal file
13
libc/nt/struct/genericmapping.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_GENERICMAPPING_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_GENERICMAPPING_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtGenericMapping {
|
||||
unsigned int GenericRead;
|
||||
unsigned int GenericWrite;
|
||||
unsigned int GenericExecute;
|
||||
unsigned int GenericAll;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_GENERICMAPPING_H_ */
|
16
libc/nt/struct/imagearchivememberheader.h
Normal file
16
libc/nt/struct/imagearchivememberheader.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEARCHIVEMEMBERHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEARCHIVEMEMBERHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageArchiveMemberHeader {
|
||||
uint8_t Name[16];
|
||||
uint8_t Date[12];
|
||||
uint8_t UserID[6];
|
||||
uint8_t GroupID[6];
|
||||
uint8_t Mode[8];
|
||||
uint8_t Size[10];
|
||||
uint8_t EndHeader[2];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEARCHIVEMEMBERHEADER_H_ */
|
49
libc/nt/struct/imageauxsymbol.h
Normal file
49
libc/nt/struct/imageauxsymbol.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOL_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOL_H_
|
||||
#include "libc/nt/pedef.h"
|
||||
#include "libc/nt/struct/imageauxsymboltokendef.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
union NtImageAuxSymbol {
|
||||
struct {
|
||||
uint32_t TagIndex;
|
||||
union {
|
||||
struct {
|
||||
uint16_t Linenumber;
|
||||
uint16_t Size;
|
||||
} LnSz;
|
||||
uint32_t TotalSize;
|
||||
} Misc;
|
||||
union {
|
||||
struct {
|
||||
uint32_t PointerToLinenumber;
|
||||
uint32_t PointerToNextFunction;
|
||||
} Function;
|
||||
struct {
|
||||
uint16_t Dimension[4];
|
||||
} Array;
|
||||
} FcnAry;
|
||||
uint16_t TvIndex;
|
||||
} Sym;
|
||||
struct {
|
||||
uint8_t Name[kNtImageSizeofSymbol];
|
||||
} File;
|
||||
struct {
|
||||
uint32_t Length;
|
||||
uint16_t NumberOfRelocations;
|
||||
uint16_t NumberOfLinenumbers;
|
||||
uint32_t CheckSum;
|
||||
uint16_t Number;
|
||||
uint8_t Selection;
|
||||
uint8_t bReserved;
|
||||
uint16_t HighNumber;
|
||||
} Section;
|
||||
struct NtImageAuxSymbolTokenDef TokenDef;
|
||||
struct {
|
||||
uint32_t crc;
|
||||
uint8_t rgbReserved[14];
|
||||
} CRC;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOL_H_ */
|
38
libc/nt/struct/imageauxsymbolex.h
Normal file
38
libc/nt/struct/imageauxsymbolex.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOLEX_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOLEX_H_
|
||||
#include "libc/nt/struct/imageauxsymboltokendef.h"
|
||||
#include "libc/nt/struct/imagesymbolex.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
union NtImageAuxSymbolEx {
|
||||
struct {
|
||||
uint32_t WeakDefaultSymIndex;
|
||||
uint32_t WeakSearchType;
|
||||
uint8_t rgbReserved[12];
|
||||
} Sym;
|
||||
struct {
|
||||
uint8_t Name[sizeof(struct NtImageSymbolEx)];
|
||||
} File;
|
||||
struct {
|
||||
uint32_t Length;
|
||||
uint16_t NumberOfRelocations;
|
||||
uint16_t NumberOfLinenumbers;
|
||||
uint32_t CheckSum;
|
||||
uint16_t Number;
|
||||
uint8_t Selection;
|
||||
uint8_t bReserved;
|
||||
uint16_t HighNumber;
|
||||
uint8_t rgbReserved[2];
|
||||
} Section;
|
||||
struct {
|
||||
struct NtImageAuxSymbolTokenDef TokenDef;
|
||||
uint8_t rgbReserved[2];
|
||||
};
|
||||
struct {
|
||||
uint32_t crc;
|
||||
uint8_t rgbReserved[16];
|
||||
} CRC;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOLEX_H_ */
|
13
libc/nt/struct/imageauxsymboltokendef.h
Normal file
13
libc/nt/struct/imageauxsymboltokendef.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOLTOKENDEF_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOLTOKENDEF_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageAuxSymbolTokenDef {
|
||||
uint8_t bAuxType;
|
||||
uint8_t bReserved;
|
||||
uint32_t SymbolTableIndex;
|
||||
uint8_t rgbReserved[12];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEAUXSYMBOLTOKENDEF_H_ */
|
11
libc/nt/struct/imagebaserelocation.h
Normal file
11
libc/nt/struct/imagebaserelocation.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBASERELOCATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBASERELOCATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageBaseRelocation {
|
||||
uint32_t VirtualAddress;
|
||||
uint32_t SizeOfBlock;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBASERELOCATION_H_ */
|
12
libc/nt/struct/imageboundforwarderref.h
Normal file
12
libc/nt/struct/imageboundforwarderref.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBOUNDFORWARDERREF_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBOUNDFORWARDERREF_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageBoundForwarderRef {
|
||||
uint32_t TimeDateStamp;
|
||||
uint16_t OffsetModuleName;
|
||||
uint16_t Reserved;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBOUNDFORWARDERREF_H_ */
|
12
libc/nt/struct/imageboundimportdescriptor.h
Normal file
12
libc/nt/struct/imageboundimportdescriptor.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBOUNDIMPORTDESCRIPTOR_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBOUNDIMPORTDESCRIPTOR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageBoundImportDescriptor {
|
||||
uint32_t TimeDateStamp;
|
||||
uint16_t OffsetModuleName;
|
||||
uint16_t NumberOfModuleForwarderRefs;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEBOUNDIMPORTDESCRIPTOR_H_ */
|
14
libc/nt/struct/imageceruntimefunctionentry.h
Normal file
14
libc/nt/struct/imageceruntimefunctionentry.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGECERUNTIMEFUNCTIONENTRY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGECERUNTIMEFUNCTIONENTRY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageCeRuntimeFunctionEntry {
|
||||
uint32_t FuncStart;
|
||||
uint32_t PrologLen : 8;
|
||||
uint32_t FuncLen : 22;
|
||||
uint32_t ThirtyTwoBit : 1;
|
||||
uint32_t ExceptionFlag : 1;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGECERUNTIMEFUNCTIONENTRY_H_ */
|
17
libc/nt/struct/imagecoffsymbolsheader.h
Normal file
17
libc/nt/struct/imagecoffsymbolsheader.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGECOFFSYMBOLSHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGECOFFSYMBOLSHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageCoffSymbolsHeader {
|
||||
uint32_t NumberOfSymbols;
|
||||
uint32_t LvaToFirstSymbol;
|
||||
uint32_t NumberOfLinenumbers;
|
||||
uint32_t LvaToFirstLinenumber;
|
||||
uint32_t RvaToFirstByteOfCode;
|
||||
uint32_t RvaToLastByteOfCode;
|
||||
uint32_t RvaToFirstByteOfData;
|
||||
uint32_t RvaToLastByteOfData;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGECOFFSYMBOLSHEADER_H_ */
|
11
libc/nt/struct/imagedatadirectory.h
Normal file
11
libc/nt/struct/imagedatadirectory.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDATADIRECTORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDATADIRECTORY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDataDirectory {
|
||||
uint32_t VirtualAddress;
|
||||
uint32_t Size;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDATADIRECTORY_H_ */
|
17
libc/nt/struct/imagedebugdirectory.h
Normal file
17
libc/nt/struct/imagedebugdirectory.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDEBUGDIRECTORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDEBUGDIRECTORY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDebugDirectory {
|
||||
uint32_t Characteristics;
|
||||
uint32_t TimeDateStamp;
|
||||
uint16_t MajorVersion;
|
||||
uint16_t MinorVersion;
|
||||
uint32_t Type;
|
||||
uint32_t SizeOfData;
|
||||
uint32_t AddressOfRawData;
|
||||
uint32_t PointerToRawData;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDEBUGDIRECTORY_H_ */
|
14
libc/nt/struct/imagedebugmisc.h
Normal file
14
libc/nt/struct/imagedebugmisc.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDEBUGMISC_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDEBUGMISC_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDebugMisc {
|
||||
uint32_t DataType;
|
||||
uint32_t Length;
|
||||
bool32 Unicode;
|
||||
uint8_t Reserved[3];
|
||||
uint8_t Data[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDEBUGMISC_H_ */
|
23
libc/nt/struct/imagedelayloaddescriptor.h
Normal file
23
libc/nt/struct/imagedelayloaddescriptor.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDELAYLOADDESCRIPTOR_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDELAYLOADDESCRIPTOR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDelayloadDescriptor {
|
||||
union {
|
||||
uint32_t AllAttributes;
|
||||
struct {
|
||||
uint32_t RvaBased : 1;
|
||||
uint32_t ReservedAttributes : 31;
|
||||
};
|
||||
} Attributes;
|
||||
uint32_t DllNameRVA;
|
||||
uint32_t ModuleHandleRVA;
|
||||
uint32_t ImportAddressTableRVA;
|
||||
uint32_t ImportNameTableRVA;
|
||||
uint32_t BoundImportAddressTableRVA;
|
||||
uint32_t UnloadInformationTableRVA;
|
||||
uint32_t TimeDateStamp;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDELAYLOADDESCRIPTOR_H_ */
|
28
libc/nt/struct/imagedosheader.h
Normal file
28
libc/nt/struct/imagedosheader.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDOSHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDOSHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDosHeader {
|
||||
uint16_t e_magic;
|
||||
uint16_t e_cblp;
|
||||
uint16_t e_cp;
|
||||
uint16_t e_crlc;
|
||||
uint16_t e_cparhdr;
|
||||
uint16_t e_minalloc;
|
||||
uint16_t e_maxalloc;
|
||||
uint16_t e_ss;
|
||||
uint16_t e_sp;
|
||||
uint16_t e_csum;
|
||||
uint16_t e_ip;
|
||||
uint16_t e_cs;
|
||||
uint16_t e_lfarlc;
|
||||
uint16_t e_ovno;
|
||||
uint16_t e_res[4];
|
||||
uint16_t e_oemid;
|
||||
uint16_t e_oeminfo;
|
||||
uint16_t e_res2[10];
|
||||
uint32_t e_lfanew;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDOSHEADER_H_ */
|
13
libc/nt/struct/imagedynamicrelocation.h
Normal file
13
libc/nt/struct/imagedynamicrelocation.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATION_H_
|
||||
#include "libc/nt/struct/imagebaserelocation.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDynamicRelocation {
|
||||
uint64_t Symbol;
|
||||
uint32_t BaseRelocSize;
|
||||
struct NtImageBaseRelocation BaseRelocations[0];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATION_H_ */
|
13
libc/nt/struct/imagedynamicrelocationtable.h
Normal file
13
libc/nt/struct/imagedynamicrelocationtable.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATIONTABLE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATIONTABLE_H_
|
||||
#include "libc/nt/struct/imagedynamicrelocation.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDynamicRelocationTable {
|
||||
uint32_t Version;
|
||||
uint32_t Size;
|
||||
struct NtImageDynamicRelocation DynamicRelocations[0];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATIONTABLE_H_ */
|
15
libc/nt/struct/imagedynamicrelocationv2.h
Normal file
15
libc/nt/struct/imagedynamicrelocationv2.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATIONV2_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATIONV2_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageDynamicRelocationV2 {
|
||||
uint32_t HeaderSize;
|
||||
uint32_t FixupInfoSize;
|
||||
uint64_t Symbol;
|
||||
uint32_t SymbolGroup;
|
||||
uint32_t Flags;
|
||||
uint8_t FixupInfo[0];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEDYNAMICRELOCATIONV2_H_ */
|
23
libc/nt/struct/imageenclaveconfig.h
Normal file
23
libc/nt/struct/imageenclaveconfig.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEENCLAVECONFIG_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEENCLAVECONFIG_H_
|
||||
#include "libc/nt/pedef.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageEnclaveConfig {
|
||||
uint32_t Size;
|
||||
uint32_t MinimumRequiredConfigSize;
|
||||
uint32_t PolicyFlags;
|
||||
uint32_t NumberOfImports;
|
||||
uint32_t ImportList;
|
||||
uint32_t ImportEntrySize;
|
||||
uint8_t FamilyID[kNtImageEnclaveShortIdLength];
|
||||
uint8_t ImageID[kNtImageEnclaveShortIdLength];
|
||||
uint32_t ImageVersion;
|
||||
uint32_t SecurityVersion;
|
||||
uint64_t EnclaveSize;
|
||||
uint32_t NumberOfThreads;
|
||||
uint32_t EnclaveFlags;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEENCLAVECONFIG_H_ */
|
17
libc/nt/struct/imageenclaveimport.h
Normal file
17
libc/nt/struct/imageenclaveimport.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEENCLAVEIMPORT_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEENCLAVEIMPORT_H_
|
||||
#include "libc/nt/pedef.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageEnclaveImport {
|
||||
uint32_t MatchType;
|
||||
uint32_t MinimumSecurityVersion;
|
||||
uint8_t UniqueOrAuthorID[kNtImageEnclaveLongIdLength];
|
||||
uint8_t FamilyID[kNtImageEnclaveShortIdLength];
|
||||
uint8_t ImageID[kNtImageEnclaveShortIdLength];
|
||||
uint32_t ImportName;
|
||||
uint32_t Reserved;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEENCLAVEIMPORT_H_ */
|
16
libc/nt/struct/imageepiloguedynamicrelocationheader.h
Normal file
16
libc/nt/struct/imageepiloguedynamicrelocationheader.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEEPILOGUEDYNAMICRELOCATIONHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEEPILOGUEDYNAMICRELOCATIONHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageEpilogueDynamicRelocationHeader {
|
||||
uint32_t EpilogueCount;
|
||||
uint8_t EpilogueByteCount;
|
||||
uint8_t BranchDescriptorElementSize;
|
||||
uint16_t BranchDescriptorCount;
|
||||
/* uint8_t BranchDescriptors[...]; */
|
||||
/* uint8_t BranchDescriptorBitMap[...]; */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEEPILOGUEDYNAMICRELOCATIONHEADER_H_ \
|
||||
*/
|
20
libc/nt/struct/imageexportdirectory.h
Normal file
20
libc/nt/struct/imageexportdirectory.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEEXPORTDIRECTORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEEXPORTDIRECTORY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageExportDirectory {
|
||||
uint32_t Characteristics;
|
||||
uint32_t TimeDateStamp;
|
||||
uint16_t MajorVersion;
|
||||
uint16_t MinorVersion;
|
||||
uint32_t Name;
|
||||
uint32_t Base;
|
||||
uint32_t NumberOfFunctions;
|
||||
uint32_t NumberOfNames;
|
||||
uint32_t AddressOfFunctions;
|
||||
uint32_t AddressOfNames;
|
||||
uint32_t AddressOfNameOrdinals;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEEXPORTDIRECTORY_H_ */
|
16
libc/nt/struct/imagefileheader.h
Normal file
16
libc/nt/struct/imagefileheader.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEFILEHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEFILEHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageFileHeader {
|
||||
uint16_t Machine;
|
||||
uint16_t NumberOfSections;
|
||||
uint32_t TimeDateStamp;
|
||||
uint32_t PointerToSymbolTable;
|
||||
uint32_t NumberOfSymbols;
|
||||
uint16_t SizeOfOptionalHeader;
|
||||
uint16_t Characteristics;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEFILEHEADER_H_ */
|
17
libc/nt/struct/imagehotpatchbase.h
Normal file
17
libc/nt/struct/imagehotpatchbase.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHBASE_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHBASE_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageHotPatchBase {
|
||||
uint32_t SequenceNumber;
|
||||
uint32_t Flags;
|
||||
uint32_t OriginalTimeDateStamp;
|
||||
uint32_t OriginalCheckSum;
|
||||
uint32_t CodeIntegrityInfo;
|
||||
uint32_t CodeIntegritySize;
|
||||
uint32_t PatchTable;
|
||||
uint32_t BufferOffset;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHBASE_H_ */
|
11
libc/nt/struct/imagehotpatchhashes.h
Normal file
11
libc/nt/struct/imagehotpatchhashes.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHHASHES_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHHASHES_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageHotPatchHashes {
|
||||
uint8_t SHA256[32];
|
||||
uint8_t SHA1[20];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHHASHES_H_ */
|
15
libc/nt/struct/imagehotpatchinfo.h
Normal file
15
libc/nt/struct/imagehotpatchinfo.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHINFO_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHINFO_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageHotPatchInfo {
|
||||
uint32_t Version;
|
||||
uint32_t Size;
|
||||
uint32_t SequenceNumber;
|
||||
uint32_t BaseImageList;
|
||||
uint32_t BaseImageCount;
|
||||
uint32_t BufferOffset;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEHOTPATCHINFO_H_ */
|
11
libc/nt/struct/imageimportbyname.h
Normal file
11
libc/nt/struct/imageimportbyname.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTBYNAME_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTBYNAME_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageImportByName {
|
||||
uint16_t Hint;
|
||||
char Name[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTBYNAME_H_ */
|
17
libc/nt/struct/imageimportdescriptor.h
Normal file
17
libc/nt/struct/imageimportdescriptor.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTDESCRIPTOR_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTDESCRIPTOR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageImportDescriptor {
|
||||
union {
|
||||
uint32_t Characteristics;
|
||||
uint32_t OriginalFirstThunk;
|
||||
};
|
||||
uint32_t TimeDateStamp;
|
||||
uint32_t ForwarderChain;
|
||||
uint32_t Name;
|
||||
uint32_t FirstThunk;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEIMPORTDESCRIPTOR_H_ */
|
14
libc/nt/struct/imagelinenumber.h
Normal file
14
libc/nt/struct/imagelinenumber.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELINENUMBER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELINENUMBER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageLinenumber {
|
||||
union {
|
||||
uint32_t SymbolTableIndex;
|
||||
uint32_t VirtualAddress;
|
||||
} Type;
|
||||
uint16_t Linenumber;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELINENUMBER_H_ */
|
13
libc/nt/struct/imageloadconfigcodeintegrity.h
Normal file
13
libc/nt/struct/imageloadconfigcodeintegrity.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELOADCONFIGCODEINTEGRITY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELOADCONFIGCODEINTEGRITY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageLoadConfigCodeIntegrity {
|
||||
uint16_t Flags;
|
||||
uint16_t Catalog;
|
||||
uint32_t CatalogOffset;
|
||||
uint32_t Reserved;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELOADCONFIGCODEINTEGRITY_H_ */
|
51
libc/nt/struct/imageloadconfigdirectory.h
Normal file
51
libc/nt/struct/imageloadconfigdirectory.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELOADCONFIGDIRECTORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELOADCONFIGDIRECTORY_H_
|
||||
#include "libc/nt/struct/imageloadconfigcodeintegrity.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageLoadConfigDirectory {
|
||||
uint32_t Size;
|
||||
uint32_t TimeDateStamp;
|
||||
uint16_t MajorVersion;
|
||||
uint16_t MinorVersion;
|
||||
uint32_t GlobalFlagsClear;
|
||||
uint32_t GlobalFlagsSet;
|
||||
uint32_t CriticalSectionDefaultTimeout;
|
||||
uint64_t DeCommitFreeBlockThreshold;
|
||||
uint64_t DeCommitTotalFreeThreshold;
|
||||
uint64_t LockPrefixTable;
|
||||
uint64_t MaximumAllocationSize;
|
||||
uint64_t VirtualMemoryThreshold;
|
||||
uint64_t ProcessAffinityMask;
|
||||
uint32_t ProcessHeapFlags;
|
||||
uint16_t CSDVersion;
|
||||
uint16_t DependentLoadFlags;
|
||||
uint64_t EditList;
|
||||
uint64_t SecurityCookie;
|
||||
uint64_t SEHandlerTable;
|
||||
uint64_t SEHandlerCount;
|
||||
uint64_t GuardCFCheckFunctionPointer;
|
||||
uint64_t GuardCFDispatchFunctionPointer;
|
||||
uint64_t GuardCFFunctionTable;
|
||||
uint64_t GuardCFFunctionCount;
|
||||
uint32_t GuardFlags;
|
||||
struct NtImageLoadConfigCodeIntegrity CodeIntegrity;
|
||||
uint64_t GuardAddressTakenIatEntryTable;
|
||||
uint64_t GuardAddressTakenIatEntryCount;
|
||||
uint64_t GuardLongJumpTargetTable;
|
||||
uint64_t GuardLongJumpTargetCount;
|
||||
uint64_t DynamicValueRelocTable;
|
||||
uint64_t CHPEMetadataPointer;
|
||||
uint64_t GuardRFFailureRoutine;
|
||||
uint64_t GuardRFFailureRoutineFunctionPointer;
|
||||
uint32_t DynamicValueRelocTableOffset;
|
||||
uint16_t DynamicValueRelocTableSection;
|
||||
uint16_t Reserved2;
|
||||
uint64_t GuardRFVerifyStackPointerFunctionPointer;
|
||||
uint32_t HotPatchTableOffset;
|
||||
uint32_t Reserved3;
|
||||
uint64_t EnclaveConfigurationPointer;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGELOADCONFIGDIRECTORY_H_ */
|
14
libc/nt/struct/imagentheaders.h
Normal file
14
libc/nt/struct/imagentheaders.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGENTHEADERS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGENTHEADERS_H_
|
||||
#include "libc/nt/struct/imagefileheader.h"
|
||||
#include "libc/nt/struct/imageoptionalheader.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageNtHeaders {
|
||||
uint32_t Signature;
|
||||
struct NtImageFileHeader FileHeader;
|
||||
struct NtImageOptionalHeader OptionalHeader;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGENTHEADERS_H_ */
|
41
libc/nt/struct/imageoptionalheader.h
Normal file
41
libc/nt/struct/imageoptionalheader.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEOPTIONALHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEOPTIONALHEADER_H_
|
||||
#include "libc/nt/pedef.h"
|
||||
#include "libc/nt/struct/imagedatadirectory.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageOptionalHeader {
|
||||
uint16_t Magic;
|
||||
uint8_t MajorLinkerVersion;
|
||||
uint8_t MinorLinkerVersion;
|
||||
uint32_t SizeOfCode;
|
||||
uint32_t SizeOfInitializedData;
|
||||
uint32_t SizeOfUninitializedData;
|
||||
uint32_t AddressOfEntryPoint;
|
||||
uint32_t BaseOfCode;
|
||||
uint64_t ImageBase;
|
||||
uint32_t SectionAlignment;
|
||||
uint32_t FileAlignment;
|
||||
uint16_t MajorOperatingSystemVersion;
|
||||
uint16_t MinorOperatingSystemVersion;
|
||||
uint16_t MajorImageVersion;
|
||||
uint16_t MinorImageVersion;
|
||||
uint16_t MajorSubsystemVersion;
|
||||
uint16_t MinorSubsystemVersion;
|
||||
uint32_t Win32VersionValue;
|
||||
uint32_t SizeOfImage;
|
||||
uint32_t SizeOfHeaders;
|
||||
uint32_t CheckSum;
|
||||
uint16_t Subsystem;
|
||||
uint16_t DllCharacteristics;
|
||||
uint64_t SizeOfStackReserve;
|
||||
uint64_t SizeOfStackCommit;
|
||||
uint64_t SizeOfHeapReserve;
|
||||
uint64_t SizeOfHeapCommit;
|
||||
uint32_t LoaderFlags;
|
||||
uint32_t NumberOfRvaAndSizes;
|
||||
struct NtImageDataDirectory DataDirectory[kNtImageNumberofDirectoryEntries];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEOPTIONALHEADER_H_ */
|
12
libc/nt/struct/imageprologuedynamicrelocationheader.h
Normal file
12
libc/nt/struct/imageprologuedynamicrelocationheader.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEPROLOGUEDYNAMICRELOCATIONHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEPROLOGUEDYNAMICRELOCATIONHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImagePrologueDynamicRelocationHeader {
|
||||
uint8_t PrologueByteCount;
|
||||
uint8_t PrologueBytes[0];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEPROLOGUEDYNAMICRELOCATIONHEADER_H_ \
|
||||
*/
|
15
libc/nt/struct/imagerelocation.h
Normal file
15
libc/nt/struct/imagerelocation.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERELOCATION_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERELOCATION_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageRelocation {
|
||||
union {
|
||||
uint32_t VirtualAddress;
|
||||
uint32_t RelocCount;
|
||||
};
|
||||
uint32_t SymbolTableIndex;
|
||||
uint16_t Type;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERELOCATION_H_ */
|
13
libc/nt/struct/imageresourcedataentry.h
Normal file
13
libc/nt/struct/imageresourcedataentry.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDATAENTRY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDATAENTRY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageResourceDataEntry {
|
||||
uint32_t OffsetToData;
|
||||
uint32_t Size;
|
||||
uint32_t CodePage;
|
||||
uint32_t Reserved;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDATAENTRY_H_ */
|
15
libc/nt/struct/imageresourcedirectory.h
Normal file
15
libc/nt/struct/imageresourcedirectory.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRECTORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRECTORY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageResourceDirectory {
|
||||
uint32_t Characteristics;
|
||||
uint32_t TimeDateStamp;
|
||||
uint16_t MajorVersion;
|
||||
uint16_t MinorVersion;
|
||||
uint16_t NumberOfNamedEntries;
|
||||
uint16_t NumberOfIdEntries;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRECTORY_H_ */
|
25
libc/nt/struct/imageresourcedirectoryentry.h
Normal file
25
libc/nt/struct/imageresourcedirectoryentry.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRECTORYENTRY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRECTORYENTRY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageResourceDirectoryEntry {
|
||||
/* TODO(jart): No bitfields. */
|
||||
union {
|
||||
struct {
|
||||
uint32_t NameOffset : 31;
|
||||
uint32_t NameIsString : 1;
|
||||
};
|
||||
uint32_t Name;
|
||||
uint16_t Id;
|
||||
};
|
||||
union {
|
||||
uint32_t OffsetToData;
|
||||
struct {
|
||||
uint32_t OffsetToDirectory : 31;
|
||||
uint32_t DataIsDirectory : 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRECTORYENTRY_H_ */
|
11
libc/nt/struct/imageresourcedirstring.h
Normal file
11
libc/nt/struct/imageresourcedirstring.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRSTRING_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRSTRING_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageResourceDirString {
|
||||
uint16_t Length;
|
||||
char16_t NameString[1];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERESOURCEDIRSTRING_H_ */
|
22
libc/nt/struct/imageromoptionalheader.h
Normal file
22
libc/nt/struct/imageromoptionalheader.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEROMOPTIONALHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEROMOPTIONALHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageRomOptionalHeader {
|
||||
uint16_t Magic;
|
||||
uint8_t MajorLinkerVersion;
|
||||
uint8_t MinorLinkerVersion;
|
||||
uint32_t SizeOfCode;
|
||||
uint32_t SizeOfInitializedData;
|
||||
uint32_t SizeOfUninitializedData;
|
||||
uint32_t AddressOfEntryPoint;
|
||||
uint32_t BaseOfCode;
|
||||
uint32_t BaseOfData;
|
||||
uint32_t BaseOfBss;
|
||||
uint32_t GprMask;
|
||||
uint32_t CprMask[4];
|
||||
uint32_t GpValue;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGEROMOPTIONALHEADER_H_ */
|
15
libc/nt/struct/imageruntimefunctionentry.h
Normal file
15
libc/nt/struct/imageruntimefunctionentry.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERUNTIMEFUNCTIONENTRY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERUNTIMEFUNCTIONENTRY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageRuntimeFunctionEntry {
|
||||
uint32_t BeginAddress;
|
||||
uint32_t EndAddress;
|
||||
union {
|
||||
uint32_t UnwindInfoAddress;
|
||||
uint32_t UnwindData;
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGERUNTIMEFUNCTIONENTRY_H_ */
|
23
libc/nt/struct/imagesectionheader.h
Normal file
23
libc/nt/struct/imagesectionheader.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESECTIONHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESECTIONHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
#include "libc/nt/pedef.h"
|
||||
|
||||
struct NtImageSectionHeader {
|
||||
uint8_t Name[kNtImageSizeofShortName];
|
||||
union {
|
||||
uint32_t PhysicalAddress;
|
||||
uint32_t VirtualSize;
|
||||
} Misc;
|
||||
uint32_t VirtualAddress;
|
||||
uint32_t SizeOfRawData;
|
||||
uint32_t PointerToRawData;
|
||||
uint32_t PointerToRelocations;
|
||||
uint32_t PointerToLinenumbers;
|
||||
uint16_t NumberOfRelocations;
|
||||
uint16_t NumberOfLinenumbers;
|
||||
uint32_t Characteristics;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESECTIONHEADER_H_ */
|
22
libc/nt/struct/imageseparatedebugheader.h
Normal file
22
libc/nt/struct/imageseparatedebugheader.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESEPARATEDEBUGHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESEPARATEDEBUGHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageSeparateDebugHeader {
|
||||
uint16_t Signature;
|
||||
uint16_t Flags;
|
||||
uint16_t Machine;
|
||||
uint16_t Characteristics;
|
||||
uint32_t TimeDateStamp;
|
||||
uint32_t CheckSum;
|
||||
uint32_t ImageBase;
|
||||
uint32_t SizeOfImage;
|
||||
uint32_t NumberOfSections;
|
||||
uint32_t ExportedNamesSize;
|
||||
uint32_t DebugDirectorySize;
|
||||
uint32_t SectionAlignment;
|
||||
uint32_t Reserved[2];
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESEPARATEDEBUGHEADER_H_ */
|
22
libc/nt/struct/imagesymbol.h
Normal file
22
libc/nt/struct/imagesymbol.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESYMBOL_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESYMBOL_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageSymbol {
|
||||
union {
|
||||
uint8_t ShortName[8];
|
||||
struct {
|
||||
uint32_t Short;
|
||||
uint32_t Long;
|
||||
} Name;
|
||||
uint32_t LongName[2];
|
||||
} N;
|
||||
uint32_t Value;
|
||||
uint16_t SectionNumber;
|
||||
uint16_t Type;
|
||||
uint8_t StorageClass;
|
||||
uint8_t NumberOfAuxSymbols;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESYMBOL_H_ */
|
22
libc/nt/struct/imagesymbolex.h
Normal file
22
libc/nt/struct/imagesymbolex.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESYMBOLEX_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESYMBOLEX_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageSymbolEx {
|
||||
union {
|
||||
uint8_t ShortName[8];
|
||||
struct {
|
||||
uint32_t Short;
|
||||
uint32_t Long;
|
||||
} Name;
|
||||
uint32_t LongName[2];
|
||||
} N;
|
||||
uint32_t Value;
|
||||
int32_t SectionNumber;
|
||||
uint16_t Type;
|
||||
uint8_t StorageClass;
|
||||
uint8_t NumberOfAuxSymbols;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGESYMBOLEX_H_ */
|
15
libc/nt/struct/imagethunkdata.h
Normal file
15
libc/nt/struct/imagethunkdata.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGETHUNKDATA_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGETHUNKDATA_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageThunkData {
|
||||
union {
|
||||
uint64_t ForwarderString;
|
||||
uint64_t Function;
|
||||
uint64_t Ordinal;
|
||||
uint64_t AddressOfData;
|
||||
} u1;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGETHUNKDATA_H_ */
|
15
libc/nt/struct/imagetlsdirectory.h
Normal file
15
libc/nt/struct/imagetlsdirectory.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMAGETLSDIRECTORY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMAGETLSDIRECTORY_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImageTlsDirectory {
|
||||
uint64_t StartAddressOfRawData;
|
||||
uint64_t EndAddressOfRawData;
|
||||
uint64_t AddressOfIndex;
|
||||
uint64_t AddressOfCallBacks;
|
||||
uint32_t SizeOfZeroFill;
|
||||
uint32_t Characteristics;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMAGETLSDIRECTORY_H_ */
|
23
libc/nt/struct/importobjectheader.h
Normal file
23
libc/nt/struct/importobjectheader.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IMPORTOBJECTHEADER_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IMPORTOBJECTHEADER_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtImportObjectHeader {
|
||||
/* TODO(jart): No bitfields. */
|
||||
uint16_t Sig1;
|
||||
uint16_t Sig2;
|
||||
uint16_t Version;
|
||||
uint16_t Machine;
|
||||
uint32_t TimeDateStamp;
|
||||
uint32_t SizeOfData;
|
||||
union {
|
||||
uint16_t Ordinal;
|
||||
uint16_t Hint;
|
||||
};
|
||||
uint16_t Type : 2;
|
||||
uint16_t NameType : 3;
|
||||
uint16_t Reserved : 11;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IMPORTOBJECTHEADER_H_ */
|
49
libc/nt/struct/inputrecord.h
Normal file
49
libc/nt/struct/inputrecord.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_INPUTRECORD_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_INPUTRECORD_H_
|
||||
#include "libc/nt/struct/coord.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtKeyEventRecord {
|
||||
bool32 bKeyDown;
|
||||
uint16_t wRepeatCount;
|
||||
uint16_t wVirtualKeyCode;
|
||||
uint16_t wVirtualScanCode;
|
||||
union {
|
||||
int16_t UnicodeChar;
|
||||
char AsciiChar;
|
||||
} uChar;
|
||||
unsigned int dwControlKeyState;
|
||||
};
|
||||
|
||||
struct NtMouseEventRecord {
|
||||
struct NtCoord dwMousePosition;
|
||||
uint32_t dwButtonState;
|
||||
uint32_t dwControlKeyState;
|
||||
uint32_t dwEventFlags;
|
||||
};
|
||||
|
||||
struct NtWindowBufferSizeRecord {
|
||||
struct NtCoord dwSize;
|
||||
};
|
||||
|
||||
struct NtMenuEventRecord {
|
||||
uint32_t dwCommandId;
|
||||
};
|
||||
|
||||
struct NtFocusEventRecord {
|
||||
bool32 bSetFocus;
|
||||
};
|
||||
|
||||
struct NtInputRecord {
|
||||
uint16_t EventType;
|
||||
union {
|
||||
struct NtKeyEventRecord KeyEvent;
|
||||
struct NtMouseEventRecord MouseEvent;
|
||||
struct NtWindowBufferSizeRecord WindowBufferSizeEvent;
|
||||
struct NtMenuEventRecord MenuEvent;
|
||||
struct NtFocusEventRecord FocusEvent;
|
||||
} Event;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_INPUTRECORD_H_ */
|
15
libc/nt/struct/iocounters.h
Normal file
15
libc/nt/struct/iocounters.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IOCOUNTERS_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IOCOUNTERS_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtIoCounters {
|
||||
uint64_t ReadOperationCount;
|
||||
uint64_t WriteOperationCount;
|
||||
uint64_t OtherOperationCount;
|
||||
uint64_t ReadTransferCount;
|
||||
uint64_t WriteTransferCount;
|
||||
uint64_t OtherTransferCount;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IOCOUNTERS_H_ */
|
15
libc/nt/struct/iostatusblock.h
Normal file
15
libc/nt/struct/iostatusblock.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_IOSTATUSBLOCK_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_IOSTATUSBLOCK_H_
|
||||
#include "libc/nt/enum/status.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtIoStatusBlock {
|
||||
union {
|
||||
NtStatus Status;
|
||||
void *Pointer; /* reserved for internal use */
|
||||
};
|
||||
uint32_t *Information; /* request dependent */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_IOSTATUSBLOCK_H_ */
|
13
libc/nt/struct/kernelusertimes.h
Normal file
13
libc/nt/struct/kernelusertimes.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_KERNELUSERTIMES_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_KERNELUSERTIMES_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtKernelUserTimes {
|
||||
uint64_t CreateFileTime;
|
||||
uint64_t ExitFileTime;
|
||||
int64_t KernelTime;
|
||||
int64_t UserTime;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_KERNELUSERTIMES_H_ */
|
16
libc/nt/struct/ldr.h
Normal file
16
libc/nt/struct/ldr.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_LDR_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_LDR_H_
|
||||
#include "libc/nt/struct/linkedlist.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtLdr {
|
||||
uint32_t SizeOfThis; /* msdn:reserved */
|
||||
uint32_t IsInitialized; /* msdn:reserved */
|
||||
void *SsHandle; /* msdn:reserved */
|
||||
struct NtLinkedList InLoadOrderModuleList; /* msdn:reserved */
|
||||
struct NtLinkedList /*∩NtLdrDataTableEntry*/ InMemoryOrderModuleList;
|
||||
struct NtLinkedList InInitOrderModuleList; /* msdn:reserved */
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_LDR_H_ */
|
44
libc/nt/struct/ldrdatatableentry.h
Normal file
44
libc/nt/struct/ldrdatatableentry.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_LDRDATATABLEENTRY_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_LDRDATATABLEENTRY_H_
|
||||
#include "libc/nt/struct/linkedlist.h"
|
||||
#include "libc/nt/struct/unicodestring.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct NtLdrDataTableEntry {
|
||||
struct NtLinkedList InLoadOrderLinks; /* msdn:reserved */
|
||||
struct NtLinkedList InMemoryOrderLinks;
|
||||
struct NtLinkedList InInitOrderLinks; /* msdn:reserved */
|
||||
void *DllBase;
|
||||
void *EntryPoint;
|
||||
union {
|
||||
uint32_t SizeOfImage;
|
||||
unsigned char SizeOfImagePadding[__SIZEOF_POINTER__];
|
||||
};
|
||||
struct NtUnicodeString FullDllName;
|
||||
struct NtUnicodeString BaseDllName;
|
||||
uint32_t Flags;
|
||||
uint16_t Load_Count;
|
||||
uint16_t TlsIndex;
|
||||
union {
|
||||
struct NtLinkedList HashLinks;
|
||||
struct {
|
||||
void *SectionPointer;
|
||||
uint32_t CheckSum;
|
||||
};
|
||||
};
|
||||
union {
|
||||
void *LoadedImports;
|
||||
uint32_t TimeDateStamp;
|
||||
};
|
||||
void *EntryPointActivationContext;
|
||||
void *PatchInformation;
|
||||
struct NtLinkedList ForwarderLinks;
|
||||
struct NtLinkedList ServiceTagLinks;
|
||||
struct NtLinkedList StaticLinks;
|
||||
void *ContextInformation;
|
||||
uintptr_t OriginalBase;
|
||||
int64_t LoadTime;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_LDRDATATABLEENTRY_H_ */
|
14
libc/nt/struct/linkedlist.h
Normal file
14
libc/nt/struct/linkedlist.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_STRUCT_LINKEDLIST_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_STRUCT_LINKEDLIST_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
/**
|
||||
* Dynamic linked list overlay.
|
||||
*/
|
||||
struct NtLinkedList {
|
||||
struct NtLinkedList *Next;
|
||||
struct NtLinkedList *Prev;
|
||||
};
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_STRUCT_LINKEDLIST_H_ */
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue