github.com/goplus/gossa@v0.3.25/pkg/debug/pe/go115_export.go (about)

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