mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: update comment for PLT/GOT helper functions
PLT and GOT are used more than on PE. Update the comment. Change-Id: Iaddb326680a7709a1442675a38c021331be32472 Reviewed-on: https://go-review.googlesource.com/c/go/+/314929 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
eb3fe28d70
commit
d80da19fc9
1 changed files with 4 additions and 4 deletions
|
|
@ -1446,7 +1446,7 @@ func (l *Loader) SetSymLocalElfSym(i Sym, es int32) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SymPlt returns the plt value for pe symbols.
|
// SymPlt returns the PLT offset of symbol s.
|
||||||
func (l *Loader) SymPlt(s Sym) int32 {
|
func (l *Loader) SymPlt(s Sym) int32 {
|
||||||
if v, ok := l.plt[s]; ok {
|
if v, ok := l.plt[s]; ok {
|
||||||
return v
|
return v
|
||||||
|
|
@ -1454,7 +1454,7 @@ func (l *Loader) SymPlt(s Sym) int32 {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetPlt sets the plt value for pe symbols.
|
// SetPlt sets the PLT offset of symbol i.
|
||||||
func (l *Loader) SetPlt(i Sym, v int32) {
|
func (l *Loader) SetPlt(i Sym, v int32) {
|
||||||
if i >= Sym(len(l.objSyms)) || i == 0 {
|
if i >= Sym(len(l.objSyms)) || i == 0 {
|
||||||
panic("bad symbol for SetPlt")
|
panic("bad symbol for SetPlt")
|
||||||
|
|
@ -1466,7 +1466,7 @@ func (l *Loader) SetPlt(i Sym, v int32) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SymGot returns the got value for pe symbols.
|
// SymGot returns the GOT offset of symbol s.
|
||||||
func (l *Loader) SymGot(s Sym) int32 {
|
func (l *Loader) SymGot(s Sym) int32 {
|
||||||
if v, ok := l.got[s]; ok {
|
if v, ok := l.got[s]; ok {
|
||||||
return v
|
return v
|
||||||
|
|
@ -1474,7 +1474,7 @@ func (l *Loader) SymGot(s Sym) int32 {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetGot sets the got value for pe symbols.
|
// SetGot sets the GOT offset of symbol i.
|
||||||
func (l *Loader) SetGot(i Sym, v int32) {
|
func (l *Loader) SetGot(i Sym, v int32) {
|
||||||
if i >= Sym(len(l.objSyms)) || i == 0 {
|
if i >= Sym(len(l.objSyms)) || i == 0 {
|
||||||
panic("bad symbol for SetGot")
|
panic("bad symbol for SetGot")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue