forked from pkujhd/goloader
-
Notifications
You must be signed in to change notification settings - Fork 4
/
const.go
42 lines (36 loc) · 963 Bytes
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package goloader
import (
"unsafe"
)
// size
const (
PtrSize = 4 << (^uintptr(0) >> 63)
Uint32Size = int(unsafe.Sizeof(uint32(0)))
IntSize = int(unsafe.Sizeof(int(0)))
UInt64Size = int(unsafe.Sizeof(uint64(0)))
_FuncSize = int(unsafe.Offsetof(_func{}.nfuncdata)) + int(unsafe.Sizeof(_func{}.nfuncdata))
FindFuncBucketSize = int(unsafe.Sizeof(findfuncbucket{}))
InvalidHandleValue = ^uintptr(0)
InvalidOffset = int(-1)
PageSize = 1 << 12 //4096
)
const (
EmptyString = ""
DefaultPkgPath = "main"
ZeroByte = byte(0x00)
)
const (
TLSNAME = "(TLS)"
)
// runtime symbol
const (
RuntimeDeferReturn = "runtime.deferreturn"
)
// string match prefix/suffix
const (
FileSymPrefix = "gofile.."
MainPkgPrefix = "main."
OsStdout = "os.Stdout"
FirstModulePrefix = "firstmodule."
DefaultStringContainerSize = 1024 * 1024 * 16
)