github.com/goplus/igop@v0.25.0/pkg/debug/pe/go121_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.21
     4  // +build go1.21
     5  
     6  package pe
     7  
     8  import (
     9  	q "debug/pe"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "pe",
    20  		Path: "debug/pe",
    21  		Deps: map[string]string{
    22  			"bytes":            "bytes",
    23  			"compress/zlib":    "zlib",
    24  			"debug/dwarf":      "dwarf",
    25  			"encoding/binary":  "binary",
    26  			"errors":           "errors",
    27  			"fmt":              "fmt",
    28  			"internal/saferio": "saferio",
    29  			"io":               "io",
    30  			"os":               "os",
    31  			"strconv":          "strconv",
    32  			"strings":          "strings",
    33  			"unsafe":           "unsafe",
    34  		},
    35  		Interfaces: map[string]reflect.Type{},
    36  		NamedTypes: map[string]reflect.Type{
    37  			"COFFSymbol":           reflect.TypeOf((*q.COFFSymbol)(nil)).Elem(),
    38  			"COFFSymbolAuxFormat5": reflect.TypeOf((*q.COFFSymbolAuxFormat5)(nil)).Elem(),
    39  			"DataDirectory":        reflect.TypeOf((*q.DataDirectory)(nil)).Elem(),
    40  			"File":                 reflect.TypeOf((*q.File)(nil)).Elem(),
    41  			"FileHeader":           reflect.TypeOf((*q.FileHeader)(nil)).Elem(),
    42  			"FormatError":          reflect.TypeOf((*q.FormatError)(nil)).Elem(),
    43  			"ImportDirectory":      reflect.TypeOf((*q.ImportDirectory)(nil)).Elem(),
    44  			"OptionalHeader32":     reflect.TypeOf((*q.OptionalHeader32)(nil)).Elem(),
    45  			"OptionalHeader64":     reflect.TypeOf((*q.OptionalHeader64)(nil)).Elem(),
    46  			"Reloc":                reflect.TypeOf((*q.Reloc)(nil)).Elem(),
    47  			"Section":              reflect.TypeOf((*q.Section)(nil)).Elem(),
    48  			"SectionHeader":        reflect.TypeOf((*q.SectionHeader)(nil)).Elem(),
    49  			"SectionHeader32":      reflect.TypeOf((*q.SectionHeader32)(nil)).Elem(),
    50  			"StringTable":          reflect.TypeOf((*q.StringTable)(nil)).Elem(),
    51  			"Symbol":               reflect.TypeOf((*q.Symbol)(nil)).Elem(),
    52  		},
    53  		AliasTypes: map[string]reflect.Type{},
    54  		Vars:       map[string]reflect.Value{},
    55  		Funcs: map[string]reflect.Value{
    56  			"NewFile": reflect.ValueOf(q.NewFile),
    57  			"Open":    reflect.ValueOf(q.Open),
    58  		},
    59  		TypedConsts: map[string]igop.TypedConst{},
    60  		UntypedConsts: map[string]igop.UntypedConst{
    61  			"COFFSymbolSize":                                 {"untyped int", constant.MakeInt64(int64(q.COFFSymbolSize))},
    62  			"IMAGE_COMDAT_SELECT_ANY":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_COMDAT_SELECT_ANY))},
    63  			"IMAGE_COMDAT_SELECT_ASSOCIATIVE":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_COMDAT_SELECT_ASSOCIATIVE))},
    64  			"IMAGE_COMDAT_SELECT_EXACT_MATCH":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_COMDAT_SELECT_EXACT_MATCH))},
    65  			"IMAGE_COMDAT_SELECT_LARGEST":                    {"untyped int", constant.MakeInt64(int64(q.IMAGE_COMDAT_SELECT_LARGEST))},
    66  			"IMAGE_COMDAT_SELECT_NODUPLICATES":               {"untyped int", constant.MakeInt64(int64(q.IMAGE_COMDAT_SELECT_NODUPLICATES))},
    67  			"IMAGE_COMDAT_SELECT_SAME_SIZE":                  {"untyped int", constant.MakeInt64(int64(q.IMAGE_COMDAT_SELECT_SAME_SIZE))},
    68  			"IMAGE_DIRECTORY_ENTRY_ARCHITECTURE":             {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_ARCHITECTURE))},
    69  			"IMAGE_DIRECTORY_ENTRY_BASERELOC":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_BASERELOC))},
    70  			"IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT":             {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT))},
    71  			"IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR":           {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR))},
    72  			"IMAGE_DIRECTORY_ENTRY_DEBUG":                    {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_DEBUG))},
    73  			"IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT":             {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT))},
    74  			"IMAGE_DIRECTORY_ENTRY_EXCEPTION":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_EXCEPTION))},
    75  			"IMAGE_DIRECTORY_ENTRY_EXPORT":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_EXPORT))},
    76  			"IMAGE_DIRECTORY_ENTRY_GLOBALPTR":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_GLOBALPTR))},
    77  			"IMAGE_DIRECTORY_ENTRY_IAT":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_IAT))},
    78  			"IMAGE_DIRECTORY_ENTRY_IMPORT":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_IMPORT))},
    79  			"IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG":              {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG))},
    80  			"IMAGE_DIRECTORY_ENTRY_RESOURCE":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_RESOURCE))},
    81  			"IMAGE_DIRECTORY_ENTRY_SECURITY":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_SECURITY))},
    82  			"IMAGE_DIRECTORY_ENTRY_TLS":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_DIRECTORY_ENTRY_TLS))},
    83  			"IMAGE_DLLCHARACTERISTICS_APPCONTAINER":          {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_APPCONTAINER))},
    84  			"IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE":          {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE))},
    85  			"IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY":       {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY))},
    86  			"IMAGE_DLLCHARACTERISTICS_GUARD_CF":              {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_GUARD_CF))},
    87  			"IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA":       {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA))},
    88  			"IMAGE_DLLCHARACTERISTICS_NO_BIND":               {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_NO_BIND))},
    89  			"IMAGE_DLLCHARACTERISTICS_NO_ISOLATION":          {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_NO_ISOLATION))},
    90  			"IMAGE_DLLCHARACTERISTICS_NO_SEH":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_NO_SEH))},
    91  			"IMAGE_DLLCHARACTERISTICS_NX_COMPAT":             {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_NX_COMPAT))},
    92  			"IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE": {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE))},
    93  			"IMAGE_DLLCHARACTERISTICS_WDM_DRIVER":            {"untyped int", constant.MakeInt64(int64(q.IMAGE_DLLCHARACTERISTICS_WDM_DRIVER))},
    94  			"IMAGE_FILE_32BIT_MACHINE":                       {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_32BIT_MACHINE))},
    95  			"IMAGE_FILE_AGGRESIVE_WS_TRIM":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_AGGRESIVE_WS_TRIM))},
    96  			"IMAGE_FILE_BYTES_REVERSED_HI":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_BYTES_REVERSED_HI))},
    97  			"IMAGE_FILE_BYTES_REVERSED_LO":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_BYTES_REVERSED_LO))},
    98  			"IMAGE_FILE_DEBUG_STRIPPED":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_DEBUG_STRIPPED))},
    99  			"IMAGE_FILE_DLL":                                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_DLL))},
   100  			"IMAGE_FILE_EXECUTABLE_IMAGE":                    {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_EXECUTABLE_IMAGE))},
   101  			"IMAGE_FILE_LARGE_ADDRESS_AWARE":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_LARGE_ADDRESS_AWARE))},
   102  			"IMAGE_FILE_LINE_NUMS_STRIPPED":                  {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_LINE_NUMS_STRIPPED))},
   103  			"IMAGE_FILE_LOCAL_SYMS_STRIPPED":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_LOCAL_SYMS_STRIPPED))},
   104  			"IMAGE_FILE_MACHINE_AM33":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_AM33))},
   105  			"IMAGE_FILE_MACHINE_AMD64":                       {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_AMD64))},
   106  			"IMAGE_FILE_MACHINE_ARM":                         {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_ARM))},
   107  			"IMAGE_FILE_MACHINE_ARM64":                       {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_ARM64))},
   108  			"IMAGE_FILE_MACHINE_ARMNT":                       {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_ARMNT))},
   109  			"IMAGE_FILE_MACHINE_EBC":                         {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_EBC))},
   110  			"IMAGE_FILE_MACHINE_I386":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_I386))},
   111  			"IMAGE_FILE_MACHINE_IA64":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_IA64))},
   112  			"IMAGE_FILE_MACHINE_LOONGARCH32":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_LOONGARCH32))},
   113  			"IMAGE_FILE_MACHINE_LOONGARCH64":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_LOONGARCH64))},
   114  			"IMAGE_FILE_MACHINE_M32R":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_M32R))},
   115  			"IMAGE_FILE_MACHINE_MIPS16":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_MIPS16))},
   116  			"IMAGE_FILE_MACHINE_MIPSFPU":                     {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_MIPSFPU))},
   117  			"IMAGE_FILE_MACHINE_MIPSFPU16":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_MIPSFPU16))},
   118  			"IMAGE_FILE_MACHINE_POWERPC":                     {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_POWERPC))},
   119  			"IMAGE_FILE_MACHINE_POWERPCFP":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_POWERPCFP))},
   120  			"IMAGE_FILE_MACHINE_R4000":                       {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_R4000))},
   121  			"IMAGE_FILE_MACHINE_RISCV128":                    {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_RISCV128))},
   122  			"IMAGE_FILE_MACHINE_RISCV32":                     {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_RISCV32))},
   123  			"IMAGE_FILE_MACHINE_RISCV64":                     {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_RISCV64))},
   124  			"IMAGE_FILE_MACHINE_SH3":                         {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_SH3))},
   125  			"IMAGE_FILE_MACHINE_SH3DSP":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_SH3DSP))},
   126  			"IMAGE_FILE_MACHINE_SH4":                         {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_SH4))},
   127  			"IMAGE_FILE_MACHINE_SH5":                         {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_SH5))},
   128  			"IMAGE_FILE_MACHINE_THUMB":                       {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_THUMB))},
   129  			"IMAGE_FILE_MACHINE_UNKNOWN":                     {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_UNKNOWN))},
   130  			"IMAGE_FILE_MACHINE_WCEMIPSV2":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_MACHINE_WCEMIPSV2))},
   131  			"IMAGE_FILE_NET_RUN_FROM_SWAP":                   {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_NET_RUN_FROM_SWAP))},
   132  			"IMAGE_FILE_RELOCS_STRIPPED":                     {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_RELOCS_STRIPPED))},
   133  			"IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP":             {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP))},
   134  			"IMAGE_FILE_SYSTEM":                              {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_SYSTEM))},
   135  			"IMAGE_FILE_UP_SYSTEM_ONLY":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_FILE_UP_SYSTEM_ONLY))},
   136  			"IMAGE_SCN_CNT_CODE":                             {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_CNT_CODE))},
   137  			"IMAGE_SCN_CNT_INITIALIZED_DATA":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_CNT_INITIALIZED_DATA))},
   138  			"IMAGE_SCN_CNT_UNINITIALIZED_DATA":               {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_CNT_UNINITIALIZED_DATA))},
   139  			"IMAGE_SCN_LNK_COMDAT":                           {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_LNK_COMDAT))},
   140  			"IMAGE_SCN_MEM_DISCARDABLE":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_MEM_DISCARDABLE))},
   141  			"IMAGE_SCN_MEM_EXECUTE":                          {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_MEM_EXECUTE))},
   142  			"IMAGE_SCN_MEM_READ":                             {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_MEM_READ))},
   143  			"IMAGE_SCN_MEM_WRITE":                            {"untyped int", constant.MakeInt64(int64(q.IMAGE_SCN_MEM_WRITE))},
   144  			"IMAGE_SUBSYSTEM_EFI_APPLICATION":                {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_EFI_APPLICATION))},
   145  			"IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER":        {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER))},
   146  			"IMAGE_SUBSYSTEM_EFI_ROM":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_EFI_ROM))},
   147  			"IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER":             {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER))},
   148  			"IMAGE_SUBSYSTEM_NATIVE":                         {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_NATIVE))},
   149  			"IMAGE_SUBSYSTEM_NATIVE_WINDOWS":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_NATIVE_WINDOWS))},
   150  			"IMAGE_SUBSYSTEM_OS2_CUI":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_OS2_CUI))},
   151  			"IMAGE_SUBSYSTEM_POSIX_CUI":                      {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_POSIX_CUI))},
   152  			"IMAGE_SUBSYSTEM_UNKNOWN":                        {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_UNKNOWN))},
   153  			"IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION":       {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION))},
   154  			"IMAGE_SUBSYSTEM_WINDOWS_CE_GUI":                 {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_WINDOWS_CE_GUI))},
   155  			"IMAGE_SUBSYSTEM_WINDOWS_CUI":                    {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_WINDOWS_CUI))},
   156  			"IMAGE_SUBSYSTEM_WINDOWS_GUI":                    {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_WINDOWS_GUI))},
   157  			"IMAGE_SUBSYSTEM_XBOX":                           {"untyped int", constant.MakeInt64(int64(q.IMAGE_SUBSYSTEM_XBOX))},
   158  		},
   159  	})
   160  }