[dev.link] cmd/link: demote DWARF line symbols to anonymous aux

Convert DWARF .debug_line symbols to anonymous aux syms, so as
to save space in object files and reduce the number of symbols
that have to be added to the linker's lookup tables.

Change-Id: I5b350f036e21a7a7128cb08148ab7c243aaf0d0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/223018
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Than McIntosh 2020-03-11 11:16:19 -04:00
parent c44af2d4a2
commit ad92148058
5 changed files with 8 additions and 12 deletions

View file

@ -219,7 +219,9 @@ func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym,
if s.WasInlined() {
s.Func.dwarfAbsFnSym = ctxt.DwFixups.AbsFuncDwarfSym(s)
}
s.Func.dwarfDebugLinesSym = ctxt.LookupDerived(s, dwarf.DebugLinesPrefix+s.Name)
s.Func.dwarfDebugLinesSym = &LSym{
Type: objabi.SDWARFLINES,
}
}
return s.Func.dwarfInfoSym, s.Func.dwarfLocSym, s.Func.dwarfRangesSym, s.Func.dwarfAbsFnSym, s.Func.dwarfDebugLinesSym
}