mirror of
https://github.com/golang/go.git
synced 2025-05-18 22:04:38 +00:00
[dev.link] cmd/link: delete some deadcode
Change-Id: Ic4ca89ced19bf91e3d3ee10b7522d7ebe6b7c7fb Reviewed-on: https://go-review.googlesource.com/c/go/+/234116 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
b97212d1f1
commit
7f872be02f
@ -349,9 +349,6 @@ func findchild(die *dwarf.DWDie, name string) *dwarf.DWDie {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Used to avoid string allocation when looking up dwarf symbols
|
||||
var prefixBuf = []byte(dwarf.InfoPrefix)
|
||||
|
||||
// find looks up the loader symbol for the DWARF DIE generated for the
|
||||
// type with the specified name.
|
||||
func (d *dwctxt2) find(name string) loader.Sym {
|
||||
@ -1157,10 +1154,6 @@ func expandFile(fname string) string {
|
||||
return expandGoroot(fname)
|
||||
}
|
||||
|
||||
func expandFileSym(l *loader.Loader, fsym loader.Sym) string {
|
||||
return expandFile(l.SymName(fsym))
|
||||
}
|
||||
|
||||
func (d *dwctxt2) writelines(unit *sym.CompilationUnit, ls loader.Sym) {
|
||||
|
||||
is_stmt := uint8(1) // initially = recommended default_is_stmt = 1, tracks is_stmt toggles.
|
||||
@ -2105,20 +2098,6 @@ func (d *dwctxt2) collectlocs(units []*sym.CompilationUnit) dwarfSecInfo {
|
||||
return dwarfSecInfo{syms: append([]loader.Sym{locsym}, syms...)}
|
||||
}
|
||||
|
||||
/*
|
||||
* Elf.
|
||||
*/
|
||||
func (d *dwctxt2) dwarfaddshstrings(ctxt *Link, shstrtab loader.Sym) {
|
||||
panic("not yet implemented")
|
||||
}
|
||||
|
||||
// dwarfcompress compresses the DWARF sections. Relocations are applied
|
||||
// on the fly. After this, dwarfp will contain a different (new) set of
|
||||
// symbols, and sections may have been replaced.
|
||||
func (d *dwctxt2) dwarfcompress(ctxt *Link) {
|
||||
panic("not yet implemented")
|
||||
}
|
||||
|
||||
// getPkgFromCUSym returns the package name for the compilation unit
|
||||
// represented by s.
|
||||
// The prefix dwarf.InfoPrefix+".pkg." needs to be removed in order to get
|
||||
|
@ -121,9 +121,6 @@ type ArchSyms struct {
|
||||
DynStr2 loader.Sym
|
||||
}
|
||||
|
||||
const BeforeLoadlibFull = 1
|
||||
const AfterLoadlibFull = 2
|
||||
|
||||
// mkArchSym is a helper for setArchSyms, to set up a special symbol.
|
||||
func (ctxt *Link) mkArchSym(name string, ver int, ls *loader.Sym) {
|
||||
*ls = ctxt.loader.LookupOrCreateSym(name, ver)
|
||||
@ -136,8 +133,7 @@ func (ctxt *Link) mkArchSymVec(name string, ver int, ls []loader.Sym) {
|
||||
}
|
||||
|
||||
// setArchSyms sets up the ArchSyms structure, and must be called before
|
||||
// relocations are applied. This function is invoked twice, once prior
|
||||
// to loadlibfull(), and once after the work of loadlibfull is complete.
|
||||
// relocations are applied.
|
||||
func (ctxt *Link) setArchSyms() {
|
||||
ctxt.mkArchSym(".got", 0, &ctxt.GOT2)
|
||||
ctxt.mkArchSym(".plt", 0, &ctxt.PLT2)
|
||||
|
@ -93,7 +93,6 @@ type Link struct {
|
||||
|
||||
// Elf symtab variables.
|
||||
numelfsym int // starts at 0, 1 is reserved
|
||||
elfbind int
|
||||
}
|
||||
|
||||
type cgodata struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user