mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/compile: mark stmp and stkobj symbols as static
Mark compiler-generated ".stmp_%d" and "<fn>.stkobj" symbols as AttrStatic, so as to tell the linker that they do not need to be inserted into its name lookup tables. Change-Id: I59ffd11659b2c54c2d0ad41275d05c3f919e3b88 Reviewed-on: https://go-review.googlesource.com/c/go/+/240497 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
59a702aa6a
commit
0434d40934
4 changed files with 11 additions and 4 deletions
|
|
@ -291,10 +291,8 @@ func addGCLocals() {
|
|||
}
|
||||
if x := s.Func.StackObjects; x != nil {
|
||||
attr := int16(obj.RODATA)
|
||||
if s.DuplicateOK() {
|
||||
attr |= obj.DUPOK
|
||||
}
|
||||
ggloblsym(x, int32(len(x.P)), attr)
|
||||
x.Set(obj.AttrStatic, true)
|
||||
}
|
||||
if x := s.Func.OpenCodedDeferInfo; x != nil {
|
||||
ggloblsym(x, int32(len(x.P)), obj.RODATA|obj.DUPOK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue