// skip STEXT symbols. Normal STEXT symbols are emitted by walking textp.
s := ctxt.Syms.Lookup("runtime.text", 0)
if s.Type == STEXT {
- put(ctxt, s, s.Name, TextSym, s.Value, nil)
+ // We've already included this symbol in ctxt.Textp
+ // if ctxt.DynlinkingGo() && Headtype == objabi.Hdarwin.
+ // See data.go:/textaddress
+ if !(ctxt.DynlinkingGo() && Headtype == objabi.Hdarwin) {
+ put(ctxt, s, s.Name, TextSym, s.Value, nil)
+ }
}
n := 0
s = ctxt.Syms.Lookup("runtime.etext", 0)
if s.Type == STEXT {
- put(ctxt, s, s.Name, TextSym, s.Value, nil)
+ // We've already included this symbol in ctxt.Textp
+ // if ctxt.DynlinkingGo() && Headtype == objabi.Hdarwin.
+ // See data.go:/textaddress
+ if !(ctxt.DynlinkingGo() && Headtype == objabi.Hdarwin) {
+ put(ctxt, s, s.Name, TextSym, s.Value, nil)
+ }
}
for _, s := range ctxt.Syms.Allsym {