forked from pkujhd/goloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdymcode.1.8.go
99 lines (88 loc) · 1.96 KB
/
dymcode.1.8.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// +build go1.8
// +build !go1.9
package goloader
import (
"cmd/objfile/goobj"
)
const (
R_PCREL = 15
// R_TLS_LE, used on 386, amd64, and ARM, resolves to the offset of the
// thread-local symbol from the thread local base and is used to implement the
// "local exec" model for tls access (r.Sym is not set on intel platforms but is
// set to a TLS symbol -- runtime.tlsg -- in the linker when externally linking).
R_TLS_LE = 16
// R_METHODOFF resolves to a 32-bit offset from the beginning of the section
// holding the data being relocated to the referenced symbol.
// It is a variant of R_ADDROFF used when linking from the uncommonType of a
// *rtype, and may be set to zero by the linker if it determines the method
// text is unreachable by the linked program.
R_METHODOFF = 24
//not used, only adapter golang 1.16
R_USEIFACE = 0x10000000 - 3
R_USEIFACEMETHOD = 0x10000000 - 2
R_ADDRCUOFF = 0x10000000 - 1
)
const (
Sxxx = iota
STEXT
SELFRXSECT
STYPE
SSTRING
SGOSTRING
SGOFUNC
SGCBITS
SRODATA
SFUNCTAB
SELFROSECT
SMACHOPLT
STYPERELRO
SSTRINGRELRO
SGOSTRINGRELRO
SGOFUNCRELRO
SGCBITSRELRO
SRODATARELRO
SFUNCTABRELRO
STYPELINK
SITABLINK
SSYMTAB
SPCLNTAB
SELFSECT
SMACHO
SMACHOGOT
SWINDOWS
SELFGOT
SNOPTRDATA
SINITARR
SDATA
SBSS
SNOPTRBSS
STLSBSS
SXREF
SMACHOSYMSTR
SMACHOSYMTAB
SMACHOINDIRECTPLT
SMACHOINDIRECTGOT
SFILE
SFILEPATH
SCONST
SDYNIMPORT
SHOSTOBJ
SDWARFSECT
SDWARFINFO
)
func (linker *Linker) addStackObject(funcname string, symbolMap map[string]uintptr) (err error) {
return nil
}
func (linker *Linker) addDeferReturn(_func *_func) (err error) {
return nil
}
type inlinedCall struct{}
func initInline(objFunc *goobj.Func, Func *FuncInfo, pkgpath string, fd *readAtSeeker) (err error) {
return nil
}
func (linker *Linker) addInlineTree(_func *_func, objsym *ObjSymbol) (err error) {
return nil
}
func (linker *Linker) _buildModule(codeModule *CodeModule) {
codeModule.module.filetab = linker.filetab
}