From 9658b7ef83ae9c34f4a52680e7102d958577d5bb Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Thu, 7 Apr 2016 14:27:15 -0400 Subject: [PATCH] cmd/link: hide go.dwarf symbols Fixes #15179 Change-Id: I0f70b7ae1682eafaece7f22d8e76f0aa806f3ec9 Reviewed-on: https://go-review.googlesource.com/21589 Run-TryBot: David Crawshaw Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/link/internal/ld/dwarf.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go index db8961676c4..4741020a6d0 100644 --- a/src/cmd/link/internal/ld/dwarf.go +++ b/src/cmd/link/internal/ld/dwarf.go @@ -509,6 +509,7 @@ func newdie(parent *DWDie, abbrev int, name string, version int) *DWDie { if name != "" && (abbrev <= DW_ABRV_VARIABLE || abbrev >= DW_ABRV_NULLTYPE) { if abbrev != DW_ABRV_VARIABLE || version == 0 { die.sym = Linklookup(Ctxt, infoprefix+name, version) + die.sym.Attr |= AttrHidden die.sym.Type = obj.SDWARFINFO } } @@ -814,6 +815,7 @@ func dotypedef(parent *DWDie, name string, def *DWDie) { } def.sym = Linklookup(Ctxt, def.sym.Name+".def", 0) + def.sym.Attr |= AttrHidden def.sym.Type = obj.SDWARFINFO // The typedef entry must be created after the def,