Commit 0d1a98e2 authored by David Crawshaw's avatar David Crawshaw

cmd/link: rename Hide to Hidden and make a bool

Change-Id: Ic99bd63c96b1eba5cc2b5cd2be3a575890a02996
Reviewed-on: https://go-review.googlesource.com/20103
Run-TryBot: David Crawshaw <crawshaw@golang.org>
Reviewed-by: 's avatarDave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 3601a1e7
......@@ -2037,16 +2037,16 @@ func Dwarfemitdebugsections() {
sect = addmachodwarfsect(sect, ".debug_info")
infosym = Linklookup(Ctxt, ".debug_info", 0)
infosym.Hide = 1
infosym.Hidden = true
abbrevsym = Linklookup(Ctxt, ".debug_abbrev", 0)
abbrevsym.Hide = 1
abbrevsym.Hidden = true
linesym = Linklookup(Ctxt, ".debug_line", 0)
linesym.Hide = 1
linesym.Hidden = true
framesym = Linklookup(Ctxt, ".debug_frame", 0)
framesym.Hide = 1
framesym.Hidden = true
}
}
......@@ -2223,16 +2223,16 @@ func dwarfaddshstrings(shstrtab *LSym) {
}
infosym = Linklookup(Ctxt, ".debug_info", 0)
infosym.Hide = 1
infosym.Hidden = true
abbrevsym = Linklookup(Ctxt, ".debug_abbrev", 0)
abbrevsym.Hide = 1
abbrevsym.Hidden = true
linesym = Linklookup(Ctxt, ".debug_line", 0)
linesym.Hide = 1
linesym.Hidden = true
framesym = Linklookup(Ctxt, ".debug_frame", 0)
framesym.Hide = 1
framesym.Hidden = true
}
}
......
......@@ -507,7 +507,7 @@ func deadcode() {
if strings.HasPrefix(s.Name, "go.weak.") {
s.Special = 1 // do not lay out in data segment
s.Reachable = true
s.Hide = 1
s.Hidden = true
}
}
......@@ -517,7 +517,7 @@ func deadcode() {
for s := Ctxt.Allsym; s != nil; s = s.Allsym {
if strings.HasPrefix(s.Name, "go.track.") {
s.Special = 1 // do not lay out in data segment
s.Hide = 1
s.Hidden = true
if s.Reachable {
buf.WriteString(s.Name[9:])
for p = s.Reachparent; p != nil; p = p.Reachparent {
......
......@@ -1905,7 +1905,7 @@ func genasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
}
for s := Ctxt.Allsym; s != nil; s = s.Allsym {
if s.Hide != 0 || ((s.Name == "" || s.Name[0] == '.') && s.Version == 0 && s.Name != ".rathole" && s.Name != ".TOC.") {
if s.Hidden || ((s.Name == "" || s.Name[0] == '.') && s.Version == 0 && s.Name != ".rathole" && s.Name != ".TOC.") {
continue
}
switch s.Type & obj.SMASK {
......
......@@ -50,7 +50,7 @@ type LSym struct {
Cgoexport uint8
Special uint8
Stkcheck uint8
Hide uint8
Hidden bool
Leaf uint8
Localentry uint8
Onlist uint8
......
......@@ -467,7 +467,7 @@ func symtab() {
}
if strings.HasPrefix(s.Name, "type.") && !DynlinkingGo() {
s.Hide = 1
s.Hidden = true
if UseRelro() && len(s.R) > 0 {
s.Type = obj.STYPERELRO
s.Outer = symtyperel
......@@ -480,31 +480,31 @@ func symtab() {
if strings.HasPrefix(s.Name, "go.typelink.") {
ntypelinks++
s.Type = obj.STYPELINK
s.Hide = 1
s.Hidden = true
s.Outer = symtypelink
}
if strings.HasPrefix(s.Name, "go.string.") {
s.Type = obj.SGOSTRING
s.Hide = 1
s.Hidden = true
s.Outer = symgostring
}
if strings.HasPrefix(s.Name, "runtime.gcbits.") {
s.Type = obj.SGCBITS
s.Hide = 1
s.Hidden = true
s.Outer = symgcbits
}
if strings.HasPrefix(s.Name, "go.func.") {
s.Type = obj.SGOFUNC
s.Hide = 1
s.Hidden = true
s.Outer = symgofunc
}
if strings.HasPrefix(s.Name, "gcargs.") || strings.HasPrefix(s.Name, "gclocals.") || strings.HasPrefix(s.Name, "gclocals·") {
s.Type = obj.SGOFUNC
s.Hide = 1
s.Hidden = true
s.Outer = symgofunc
s.Align = 4
liveness += (s.Size + int64(s.Align) - 1) &^ (int64(s.Align) - 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment